Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
516 changes: 267 additions & 249 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
41 changes: 41 additions & 0 deletions .yarn/versions/a67284fa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
releases:
"@yarnpkg/builder": patch
"@yarnpkg/core": patch
"@yarnpkg/doctor": patch
"@yarnpkg/eslint-config": minor
"@yarnpkg/fslib": patch
"@yarnpkg/libzip": patch
"@yarnpkg/plugin-nm": patch
"@yarnpkg/plugin-pnp": patch
"@yarnpkg/pnp": patch
"@yarnpkg/pnpify": patch

declined:
- "@yarnpkg/plugin-compat"
- "@yarnpkg/plugin-constraints"
- "@yarnpkg/plugin-dlx"
- "@yarnpkg/plugin-essentials"
- "@yarnpkg/plugin-exec"
- "@yarnpkg/plugin-file"
- "@yarnpkg/plugin-git"
- "@yarnpkg/plugin-github"
- "@yarnpkg/plugin-http"
- "@yarnpkg/plugin-init"
- "@yarnpkg/plugin-interactive-tools"
- "@yarnpkg/plugin-jsr"
- "@yarnpkg/plugin-link"
- "@yarnpkg/plugin-npm"
- "@yarnpkg/plugin-npm-cli"
- "@yarnpkg/plugin-pack"
- "@yarnpkg/plugin-patch"
- "@yarnpkg/plugin-pnpm"
- "@yarnpkg/plugin-stage"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/plugin-version"
- "@yarnpkg/plugin-workspace-tools"
- vscode-zipfs
- "@yarnpkg/cli"
- "@yarnpkg/extensions"
- "@yarnpkg/nm"
- "@yarnpkg/sdks"
- "@yarnpkg/shell"
1 change: 1 addition & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default [
// Generated compressed hooks
`packages/yarnpkg-pnp/sources/hook.js`,
`packages/yarnpkg-pnp/sources/esm-loader/built-loader.js`,
`packages/yarnpkg-pnp/sources/hook.raw.js`,
// Minimize the diff with upstream
`packages/yarnpkg-pnp/sources/node`,
`packages/yarnpkg-pnp/sources/loader/node-options*`,
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"@eslint/config-inspector": "^0.5.0",
"@types/jest": "^28.1.6",
"@types/micromatch": "^4.0.1",
"@types/node": "^18.17.15",
"@types/node": "^18.19.124",
"@types/semver": "^7.1.0",
"@yarnpkg/cli": "workspace:^",
"@yarnpkg/core": "workspace:^",
Expand All @@ -24,7 +24,7 @@
"jest": "^29.2.1",
"pirates": "^4.0.5",
"tslib": "^2.4.0",
"typescript": "^5.5.2"
"typescript": "^5.9.2"
},
"resolutions": {
"ink@^3.2.0": "patch:ink@npm%3A3.2.0#~/.yarn/patches/ink-npm-3.2.0-2f1df5b094.patch",
Expand Down
4 changes: 2 additions & 2 deletions packages/docusaurus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
"three": "^0.145.0",
"tslib": "^2.4.0",
"typedoc": "^0.25.7",
"typescript": "^5.5.2",
"typescript": "^5.9.2",
"unist-util-visit-parents": "^6.0.1",
"usehooks-ts": "^3.1.1",
"webpack": "^5.88.2"
Expand All @@ -82,7 +82,7 @@
"@types/markdown-it": "^12.2.3",
"@types/marked": "^5.0.0",
"@types/mdast": "^4.0.3",
"@types/node": "^18.19.15",
"@types/node": "^18.19.124",
"@types/react": "^18.2.54",
"@types/react-instantsearch-dom": "^6",
"@types/react-modal": "^3",
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
"./react": "./react.js"
},
"dependencies": {
"@stylistic/eslint-plugin": "^3.1.0",
"@stylistic/eslint-plugin": "^5.3.1",
"@stylistic/eslint-plugin-jsx": "^3.1.0",
"@typescript-eslint/eslint-plugin": "^8.24.0",
"@typescript-eslint/parser": "^8.24.0",
"@typescript-eslint/eslint-plugin": "^8.42.0",
"@typescript-eslint/parser": "^8.42.0",
"eslint-plugin-arca": "^0.16.0",
"eslint-plugin-react": "^7.37.4",
"globals": "^15.15.0",
Expand All @@ -36,7 +36,7 @@
},
"devDependencies": {
"eslint": "^9.20.1",
"typescript": "^5.5.2"
"typescript": "^5.9.2"
},
"stableVersion": "3.0.1"
}
2 changes: 1 addition & 1 deletion packages/eslint-config/rules/style.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default [

'@stylistic/comma-spacing': 2,

'@stylistic/func-call-spacing': 2,
'@stylistic/function-call-spacing': 2,

'@stylistic/indent': [`error`, 2, {
SwitchCase: 1,
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-nm/sources/NodeModulesLinker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,8 @@ class NodeModulesInstaller implements Installer {
private customData: {
store: Map<LocatorHash, CustomPackageData>;
} = {
store: new Map(),
};
store: new Map(),
};

attachCustomData(customData: any) {
this.customData = customData;
Expand Down
4 changes: 2 additions & 2 deletions packages/plugin-pnp/sources/PnpLinker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ export class PnpInstaller implements Installer {
private customData: {
store: Map<LocatorHash, CustomPackageData>;
} = {
store: new Map(),
};
store: new Map(),
};

attachCustomData(customData: any) {
this.customData = customData;
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-builder/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"devDependencies": {
"@types/semver": "^7.1.0",
"@yarnpkg/monorepo": "workspace:^",
"typescript": "^5.5.2"
"typescript": "^5.9.2"
},
"scripts": {
"postpack": "rm -rf lib",
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@types/cross-spawn": "6.0.0",
"@types/diff": "^5.0.0",
"@types/micromatch": "^4.0.1",
"@types/node": "^18.17.15",
"@types/node": "^18.19.124",
"@types/tar": "^4.0.4",
"@yarnpkg/cli": "workspace:^",
"@yarnpkg/plugin-link": "workspace:^",
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-core/sources/Project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2745,7 +2745,7 @@ function emitPeerDependencyWarnings(project: Project, report: Report) {
} (${
formatUtils.pretty(project.configuration, warning.hash, formatUtils.Type.CODE)
}), requested by ${
structUtils.prettyIdent(project.configuration, warning.node.requests.values().next().value.requester)
structUtils.prettyIdent(project.configuration, warning.node.requests.values().next().value!.requester)
}${otherPackages}.`);
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-doctor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"micromatch": "^4.0.2",
"p-limit": "^2.2.0",
"tslib": "^2.4.0",
"typescript": "^5.5.2"
"typescript": "^5.9.2"
},
"devDependencies": {
"@types/micromatch": "^4.0.1",
Expand Down
14 changes: 8 additions & 6 deletions packages/yarnpkg-fslib/sources/FakeFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ export type BigIntStats = NodeBigIntStats & {
crc?: number;
};

export type Dirent<T extends Path> = Omit<NodeDirent, `name` | `path`> & {
export type Dirent<T extends Path> = Omit<NodeDirent, `name` | `path` | `parentPath`> & {
name: Filename;
/** @deprecated */
path: T;
parentPath: T;
};

export type DirentNoPath = Omit<NodeDirent, `name` | `path`> & {
export type DirentNoPath = Omit<NodeDirent, `name` | `path` | `parentPath`> & {
name: Filename;
};

Expand Down Expand Up @@ -293,13 +295,13 @@ export abstract class FakeFS<P extends Path> {
abstract lutimesPromise(p: P, atime: Date | string | number, mtime: Date | string | number): Promise<void>;
abstract lutimesSync(p: P, atime: Date | string | number, mtime: Date | string | number): void;

abstract readFilePromise(p: FSPath<P>, encoding?: null): Promise<Buffer>;
abstract readFilePromise(p: FSPath<P>, encoding?: null): Promise<NonSharedBuffer>;
abstract readFilePromise(p: FSPath<P>, encoding: BufferEncoding): Promise<string>;
abstract readFilePromise(p: FSPath<P>, encoding?: BufferEncoding | null): Promise<Buffer | string>;
abstract readFilePromise(p: FSPath<P>, encoding?: BufferEncoding | null): Promise<NonSharedBuffer | string>;

abstract readFileSync(p: FSPath<P>, encoding?: null): Buffer;
abstract readFileSync(p: FSPath<P>, encoding?: null): NonSharedBuffer;
abstract readFileSync(p: FSPath<P>, encoding: BufferEncoding): string;
abstract readFileSync(p: FSPath<P>, encoding?: BufferEncoding | null): Buffer | string;
abstract readFileSync(p: FSPath<P>, encoding?: BufferEncoding | null): NonSharedBuffer | string;

abstract readlinkPromise(p: P): Promise<P>;
abstract readlinkSync(p: P): P;
Expand Down
8 changes: 4 additions & 4 deletions packages/yarnpkg-fslib/sources/MountFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -800,9 +800,9 @@ export class MountFS<MountedFS extends MountableFS> extends BasePortableFakeFS {
});
}

readFilePromise(p: FSPath<PortablePath>, encoding?: null): Promise<Buffer>;
readFilePromise(p: FSPath<PortablePath>, encoding?: null): Promise<NonSharedBuffer>;
readFilePromise(p: FSPath<PortablePath>, encoding: BufferEncoding): Promise<string>;
readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Promise<Buffer | string>;
readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Promise<NonSharedBuffer | string>;
async readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null) {
return this.makeCallPromise(p, async () => {
return await this.baseFs.readFilePromise(p, encoding);
Expand All @@ -811,9 +811,9 @@ export class MountFS<MountedFS extends MountableFS> extends BasePortableFakeFS {
});
}

readFileSync(p: FSPath<PortablePath>, encoding?: null): Buffer;
readFileSync(p: FSPath<PortablePath>, encoding?: null): NonSharedBuffer;
readFileSync(p: FSPath<PortablePath>, encoding: BufferEncoding): string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Buffer | string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): NonSharedBuffer | string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null) {
return this.makeCallSync(p, () => {
return this.baseFs.readFileSync(p, encoding);
Expand Down
8 changes: 4 additions & 4 deletions packages/yarnpkg-fslib/sources/NodeFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,19 +463,19 @@ export class NodeFS extends BasePortableFakeFS {
return this.realFs.symlinkSync(npath.fromPortablePath(target.replace(/\/+$/, ``) as PortablePath), npath.fromPortablePath(p), type);
}

readFilePromise(p: FSPath<PortablePath>, encoding?: null): Promise<Buffer>;
readFilePromise(p: FSPath<PortablePath>, encoding?: null): Promise<NonSharedBuffer>;
readFilePromise(p: FSPath<PortablePath>, encoding: BufferEncoding): Promise<string>;
readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Promise<Buffer | string>;
readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Promise<NonSharedBuffer | string>;
async readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null) {
return await new Promise<any>((resolve, reject) => {
const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
this.realFs.readFile(fsNativePath, encoding, this.makeCallback(resolve, reject));
});
}

readFileSync(p: FSPath<PortablePath>, encoding?: null): Buffer;
readFileSync(p: FSPath<PortablePath>, encoding?: null): NonSharedBuffer;
readFileSync(p: FSPath<PortablePath>, encoding: BufferEncoding): string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Buffer | string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): NonSharedBuffer | string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null) {
const fsNativePath = typeof p === `string` ? npath.fromPortablePath(p) : p;
return this.realFs.readFileSync(fsNativePath, encoding);
Expand Down
8 changes: 4 additions & 4 deletions packages/yarnpkg-fslib/sources/ProxiedFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,16 @@ export abstract class ProxiedFS<P extends Path, IP extends Path> extends FakeFS<
return this.baseFs.symlinkSync(mappedTarget, mappedP, type);
}

async readFilePromise(p: FSPath<P>, encoding?: null): Promise<Buffer>;
async readFilePromise(p: FSPath<P>, encoding?: null): Promise<NonSharedBuffer>;
async readFilePromise(p: FSPath<P>, encoding: BufferEncoding): Promise<string>;
async readFilePromise(p: FSPath<P>, encoding?: BufferEncoding | null): Promise<Buffer | string>;
async readFilePromise(p: FSPath<P>, encoding?: BufferEncoding | null): Promise<NonSharedBuffer | string>;
async readFilePromise(p: FSPath<P>, encoding?: BufferEncoding | null) {
return this.baseFs.readFilePromise(this.fsMapToBase(p), encoding);
}

readFileSync(p: FSPath<P>, encoding?: null): Buffer;
readFileSync(p: FSPath<P>, encoding?: null): NonSharedBuffer;
readFileSync(p: FSPath<P>, encoding: BufferEncoding): string;
readFileSync(p: FSPath<P>, encoding?: BufferEncoding | null): Buffer | string;
readFileSync(p: FSPath<P>, encoding?: BufferEncoding | null): NonSharedBuffer | string;
readFileSync(p: FSPath<P>, encoding?: BufferEncoding | null) {
return this.baseFs.readFileSync(this.fsMapToBase(p), encoding);
}
Expand Down
13 changes: 8 additions & 5 deletions packages/yarnpkg-libzip/sources/ZipFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ export class ZipFS extends BasePortableFakeFS {
}


private setFileSource(p: PortablePath, content: string | Buffer | ArrayBuffer | DataView) {
private setFileSource(p: PortablePath, content: string | NodeJS.ArrayBufferView) {
const buffer = Buffer.isBuffer(content) ? content : Buffer.from(content as any);

const target = ppath.relative(PortablePath.root, p);
Expand Down Expand Up @@ -1271,9 +1271,9 @@ export class ZipFS extends BasePortableFakeFS {
this.symlinkCount += 1;
}

readFilePromise(p: FSPath<PortablePath>, encoding?: null): Promise<Buffer>;
readFilePromise(p: FSPath<PortablePath>, encoding?: null): Promise<NonSharedBuffer>;
readFilePromise(p: FSPath<PortablePath>, encoding: BufferEncoding): Promise<string>;
readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Promise<Buffer | string>;
readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Promise<NonSharedBuffer | string>;
async readFilePromise(p: FSPath<PortablePath>, encoding?: BufferEncoding | null) {
// This is messed up regarding the TS signatures
if (typeof encoding === `object`)
Expand All @@ -1284,9 +1284,9 @@ export class ZipFS extends BasePortableFakeFS {
return encoding ? data.toString(encoding) : data;
}

readFileSync(p: FSPath<PortablePath>, encoding?: null): Buffer;
readFileSync(p: FSPath<PortablePath>, encoding?: null): NonSharedBuffer;
readFileSync(p: FSPath<PortablePath>, encoding: BufferEncoding): string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): Buffer | string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null): NonSharedBuffer | string;
readFileSync(p: FSPath<PortablePath>, encoding?: BufferEncoding | null) {
// This is messed up regarding the TS signatures
if (typeof encoding === `object`)
Expand Down Expand Up @@ -1362,6 +1362,7 @@ export class ZipFS extends BasePortableFakeFS {
return Object.assign(this.statImpl(`lstat`, ppath.join(p, name)), {
name,
path: PortablePath.dot,
parentPath: PortablePath.dot,
});
});

Expand All @@ -1376,6 +1377,7 @@ export class ZipFS extends BasePortableFakeFS {
entries.push(Object.assign(this.statImpl(`lstat`, ppath.join(p, subPath, child)), {
name: child,
path: subPath,
parentPath: subPath,
}));
}
}
Expand All @@ -1401,6 +1403,7 @@ export class ZipFS extends BasePortableFakeFS {
return Object.assign(this.statImpl(`lstat`, ppath.join(p, name)), {
name,
path: undefined,
parentPath: undefined,
});
});
} else {
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-pnp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"./package.json": "./package.json"
},
"dependencies": {
"@types/node": "^18.17.15",
"@types/node": "^18.19.124",
"@yarnpkg/fslib": "workspace:^"
},
"devDependencies": {
Expand Down
3 changes: 2 additions & 1 deletion packages/yarnpkg-pnp/sources/esm-loader/hooks/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ if (!findPnpApi) {
// @ts-expect-error - reason TBS
const require = createRequire(import.meta.url);

const pnpApi = require(`./.pnp.cjs`);
// We call structuredClone to prevent TS from digging into the PnP file
const pnpApi = require(structuredClone(`./.pnp.cjs`));
pnpApi.setup();

findPnpApi = (esmModule as any).findPnpApi;
Expand Down
2 changes: 1 addition & 1 deletion packages/yarnpkg-pnp/sources/loader/applyPatch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export type ApplyPatchOptions = {
declare global {
module NodeJS {
interface Process {
dlopen: (module: Object, filename: string, flags?: number) => void;
dlopen: (module: object, filename: string, flags?: number) => void;
}
}
}
Expand Down
Loading
Loading