@yarnpkg/plugin-pnp 3.1.0-rc.5 → 3.1.2-rc.1
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 +4 -4
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +9 -9
package/lib/PnpLinker.js
CHANGED
|
@@ -231,8 +231,8 @@ class PnpInstaller {
|
|
|
231
231
|
// Nothing to transform
|
|
232
232
|
}
|
|
233
233
|
isEsmEnabled() {
|
|
234
|
-
if (this.opts.project.configuration.sources.has(`
|
|
235
|
-
return this.opts.project.configuration.get(`
|
|
234
|
+
if (this.opts.project.configuration.sources.has(`pnpEnableEsmLoader`))
|
|
235
|
+
return this.opts.project.configuration.get(`pnpEnableEsmLoader`);
|
|
236
236
|
if (this.isESMLoaderRequired)
|
|
237
237
|
return true;
|
|
238
238
|
for (const workspace of this.opts.project.workspaces) {
|
|
@@ -274,7 +274,7 @@ class PnpInstaller {
|
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
276
|
if (this.isEsmEnabled()) {
|
|
277
|
-
this.opts.report.reportWarning(core_2.MessageName.UNNAMED, `ESM support for PnP uses the experimental loader API and is
|
|
277
|
+
this.opts.report.reportWarning(core_2.MessageName.UNNAMED, `ESM support for PnP uses the experimental loader API and is therefore experimental`);
|
|
278
278
|
await fslib_1.xfs.changeFilePromise(pnpPath.esmLoader, (0, pnp_1.getESMLoaderTemplate)(), {
|
|
279
279
|
automaticNewlines: true,
|
|
280
280
|
mode: 0o644,
|
|
@@ -330,7 +330,7 @@ class PnpInstaller {
|
|
|
330
330
|
return dependencyMeta.unplugged;
|
|
331
331
|
if (FORCED_UNPLUG_PACKAGES.has(pkg.identHash))
|
|
332
332
|
return true;
|
|
333
|
-
if (pkg.conditions
|
|
333
|
+
if (pkg.conditions != null)
|
|
334
334
|
return true;
|
|
335
335
|
if (customPackageData.manifest.preferUnplugged !== null)
|
|
336
336
|
return customPackageData.manifest.preferUnplugged;
|
package/lib/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ declare module '@yarnpkg/core' {
|
|
|
17
17
|
pnpMode: string;
|
|
18
18
|
pnpShebang: string;
|
|
19
19
|
pnpIgnorePatterns: Array<string>;
|
|
20
|
-
|
|
20
|
+
pnpEnableEsmLoader: boolean;
|
|
21
21
|
pnpEnableInlining: boolean;
|
|
22
22
|
pnpFallbackMode: string;
|
|
23
23
|
pnpUnpluggedFolder: PortablePath;
|
package/lib/index.js
CHANGED
|
@@ -76,7 +76,7 @@ const plugin = {
|
|
|
76
76
|
default: [],
|
|
77
77
|
isArray: true,
|
|
78
78
|
},
|
|
79
|
-
|
|
79
|
+
pnpEnableEsmLoader: {
|
|
80
80
|
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.`,
|
|
81
81
|
type: core_1.SettingsType.BOOLEAN,
|
|
82
82
|
default: false,
|
package/package.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yarnpkg/plugin-pnp",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2-rc.1",
|
|
4
4
|
"license": "BSD-2-Clause",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@types/semver": "^7.1.0",
|
|
8
|
-
"@yarnpkg/fslib": "^2.6.0
|
|
9
|
-
"@yarnpkg/plugin-stage": "^3.1.
|
|
10
|
-
"@yarnpkg/pnp": "^3.1.
|
|
8
|
+
"@yarnpkg/fslib": "^2.6.0",
|
|
9
|
+
"@yarnpkg/plugin-stage": "^3.1.1",
|
|
10
|
+
"@yarnpkg/pnp": "^3.1.1-rc.1",
|
|
11
11
|
"clipanion": "^3.0.1",
|
|
12
12
|
"micromatch": "^4.0.2",
|
|
13
13
|
"semver": "^7.1.2",
|
|
14
14
|
"tslib": "^1.13.0"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
|
-
"@yarnpkg/cli": "^3.
|
|
18
|
-
"@yarnpkg/core": "^3.
|
|
17
|
+
"@yarnpkg/cli": "^3.2.0-rc.1",
|
|
18
|
+
"@yarnpkg/core": "^3.2.0-rc.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/micromatch": "^4.0.1",
|
|
22
|
-
"@yarnpkg/cli": "^3.
|
|
23
|
-
"@yarnpkg/core": "^3.
|
|
22
|
+
"@yarnpkg/cli": "^3.2.0-rc.1",
|
|
23
|
+
"@yarnpkg/core": "^3.2.0-rc.1"
|
|
24
24
|
},
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
@@ -41,6 +41,6 @@
|
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=12 <14 || 14.2 - 14.9 || >14.10.0"
|
|
43
43
|
},
|
|
44
|
-
"stableVersion": "3.
|
|
44
|
+
"stableVersion": "3.1.1",
|
|
45
45
|
"typings": "./lib/index.d.ts"
|
|
46
46
|
}
|