@yarnpkg/plugin-pnp 4.0.7 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/PnpLinker.js +2 -3
- package/lib/index.d.ts +3 -0
- package/lib/index.js +14 -0
- package/package.json +6 -6
package/lib/PnpLinker.js
CHANGED
|
@@ -200,9 +200,6 @@ class PnpInstaller {
|
|
|
200
200
|
discardFromLookup: false,
|
|
201
201
|
});
|
|
202
202
|
}
|
|
203
|
-
this.packageRegistry.set(null, new Map([
|
|
204
|
-
[null, this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)],
|
|
205
|
-
]));
|
|
206
203
|
const pnpFallbackMode = this.opts.project.configuration.get(`pnpFallbackMode`);
|
|
207
204
|
const dependencyTreeRoots = this.opts.project.workspaces.map(({ anchoredLocator }) => ({ name: core_1.structUtils.stringifyIdent(anchoredLocator), reference: anchoredLocator.reference }));
|
|
208
205
|
const enableTopLevelFallback = pnpFallbackMode !== `none`;
|
|
@@ -211,6 +208,7 @@ class PnpInstaller {
|
|
|
211
208
|
const ignorePattern = core_1.miscUtils.buildIgnorePattern([`.yarn/sdks/**`, ...this.opts.project.configuration.get(`pnpIgnorePatterns`)]);
|
|
212
209
|
const packageRegistry = this.packageRegistry;
|
|
213
210
|
const shebang = this.opts.project.configuration.get(`pnpShebang`);
|
|
211
|
+
const pnpZipBackend = this.opts.project.configuration.get(`pnpZipBackend`);
|
|
214
212
|
if (pnpFallbackMode === `dependencies-only`)
|
|
215
213
|
for (const pkg of this.opts.project.storedPackages.values())
|
|
216
214
|
if (this.opts.project.tryWorkspaceByLocator(pkg))
|
|
@@ -222,6 +220,7 @@ class PnpInstaller {
|
|
|
222
220
|
fallbackExclusionList,
|
|
223
221
|
fallbackPool,
|
|
224
222
|
ignorePattern,
|
|
223
|
+
pnpZipBackend,
|
|
225
224
|
packageRegistry,
|
|
226
225
|
shebang,
|
|
227
226
|
});
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Hooks as CoreHooks, Plugin, Project } from '@yarnpkg/core';
|
|
2
2
|
import { PortablePath } from '@yarnpkg/fslib';
|
|
3
3
|
import { Hooks as StageHooks } from '@yarnpkg/plugin-stage';
|
|
4
|
+
import { PnpZipBackend } from '@yarnpkg/pnp';
|
|
4
5
|
import UnplugCommand from './commands/unplug';
|
|
5
6
|
import * as jsInstallUtils from './jsInstallUtils';
|
|
6
7
|
import * as pnpUtils from './pnpUtils';
|
|
@@ -18,12 +19,14 @@ declare module '@yarnpkg/core' {
|
|
|
18
19
|
nodeLinker: string;
|
|
19
20
|
winLinkType: string;
|
|
20
21
|
pnpMode: string;
|
|
22
|
+
minizip: boolean;
|
|
21
23
|
pnpShebang: string;
|
|
22
24
|
pnpIgnorePatterns: Array<string>;
|
|
23
25
|
pnpEnableEsmLoader: boolean;
|
|
24
26
|
pnpEnableInlining: boolean;
|
|
25
27
|
pnpFallbackMode: string;
|
|
26
28
|
pnpUnpluggedFolder: PortablePath;
|
|
29
|
+
pnpZipBackend: PnpZipBackend;
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
32
|
declare const plugin: Plugin<CoreHooks & StageHooks>;
|
package/lib/index.js
CHANGED
|
@@ -68,6 +68,11 @@ const plugin = {
|
|
|
68
68
|
type: core_1.SettingsType.STRING,
|
|
69
69
|
default: `pnp`,
|
|
70
70
|
},
|
|
71
|
+
minizip: {
|
|
72
|
+
description: `Whether Yarn should use minizip to extract archives`,
|
|
73
|
+
type: core_1.SettingsType.BOOLEAN,
|
|
74
|
+
default: false,
|
|
75
|
+
},
|
|
71
76
|
winLinkType: {
|
|
72
77
|
description: `Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.`,
|
|
73
78
|
type: core_1.SettingsType.STRING,
|
|
@@ -93,6 +98,15 @@ const plugin = {
|
|
|
93
98
|
default: [],
|
|
94
99
|
isArray: true,
|
|
95
100
|
},
|
|
101
|
+
pnpZipBackend: {
|
|
102
|
+
description: `Whether to use the experimental js implementation for the ZipFS`,
|
|
103
|
+
type: core_1.SettingsType.STRING,
|
|
104
|
+
values: [
|
|
105
|
+
`libzip`,
|
|
106
|
+
`js`,
|
|
107
|
+
],
|
|
108
|
+
default: `libzip`,
|
|
109
|
+
},
|
|
96
110
|
pnpEnableEsmLoader: {
|
|
97
111
|
description: `If true, Yarn will generate an ESM loader (\`.pnp.loader.mjs\`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.`,
|
|
98
112
|
type: core_1.SettingsType.BOOLEAN,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarnpkg/plugin-pnp",
|
|
3
|
-
"version": "4.0
|
|
3
|
+
"version": "4.1.0",
|
|
4
4
|
"license": "BSD-2-Clause",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"exports": {
|
|
@@ -10,19 +10,19 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@yarnpkg/fslib": "^3.1.2",
|
|
12
12
|
"@yarnpkg/plugin-stage": "^4.0.1",
|
|
13
|
-
"@yarnpkg/pnp": "^4.0
|
|
13
|
+
"@yarnpkg/pnp": "^4.1.0",
|
|
14
14
|
"clipanion": "^4.0.0-rc.2",
|
|
15
15
|
"micromatch": "^4.0.2",
|
|
16
16
|
"tslib": "^2.4.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
-
"@yarnpkg/cli": "^4.
|
|
20
|
-
"@yarnpkg/core": "^4.
|
|
19
|
+
"@yarnpkg/cli": "^4.9.0",
|
|
20
|
+
"@yarnpkg/core": "^4.4.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@types/micromatch": "^4.0.1",
|
|
24
|
-
"@yarnpkg/cli": "^4.
|
|
25
|
-
"@yarnpkg/core": "^4.
|
|
24
|
+
"@yarnpkg/cli": "^4.9.0",
|
|
25
|
+
"@yarnpkg/core": "^4.4.0"
|
|
26
26
|
},
|
|
27
27
|
"repository": {
|
|
28
28
|
"type": "git",
|