Skip to content

Commit fe834db

Browse files
authored
Renames pnpEnableExperimentalEsm into pnpEnableEsmLoader (#3635)
1 parent 8a11db0 commit fe834db

File tree

6 files changed

+31
-8
lines changed

6 files changed

+31
-8
lines changed

.yarn/versions/84ac6b01.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/plugin-pnp": patch
4+
5+
declined:
6+
- "@yarnpkg/plugin-compat"
7+
- "@yarnpkg/plugin-constraints"
8+
- "@yarnpkg/plugin-dlx"
9+
- "@yarnpkg/plugin-essentials"
10+
- "@yarnpkg/plugin-init"
11+
- "@yarnpkg/plugin-interactive-tools"
12+
- "@yarnpkg/plugin-nm"
13+
- "@yarnpkg/plugin-npm-cli"
14+
- "@yarnpkg/plugin-pack"
15+
- "@yarnpkg/plugin-patch"
16+
- "@yarnpkg/plugin-pnpm"
17+
- "@yarnpkg/plugin-stage"
18+
- "@yarnpkg/plugin-typescript"
19+
- "@yarnpkg/plugin-version"
20+
- "@yarnpkg/plugin-workspace-tools"
21+
- "@yarnpkg/builder"
22+
- "@yarnpkg/core"
23+
- "@yarnpkg/doctor"

.yarnrc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ changesetIgnorePatterns:
33

44
enableGlobalCache: false
55

6-
pnpEnableExperimentalEsm: false
6+
pnpEnableEsmLoader: false
77

88
immutablePatterns:
99
- .pnp.*

packages/acceptance-tests/pkg-tests-specs/sources/pnp-esm.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ describe(`Plug'n'Play - ESM`, () => {
273273
makeTemporaryEnv(
274274
{ },
275275
{
276-
pnpEnableExperimentalEsm: true,
276+
pnpEnableEsmLoader: true,
277277
},
278278
async ({path, run, source}) => {
279279
await xfs.writeFilePromise(ppath.join(path, `index` as Filename), `console.log(typeof require === 'undefined')`);
@@ -371,7 +371,7 @@ describe(`Plug'n'Play - ESM`, () => {
371371
},
372372
},
373373
{
374-
pnpEnableExperimentalEsm: true,
374+
pnpEnableEsmLoader: true,
375375
},
376376
async ({path, run, source}) => {
377377
await xfs.writeFilePromise(ppath.join(path, `index.js` as Filename), `import('no-deps').then(() => console.log(42))`);

packages/gatsby/static/configuration/yarnrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@
556556
"format": "uri-reference",
557557
"default": "./.pnp.data.json"
558558
},
559-
"pnpEnableExperimentalEsm": {
559+
"pnpEnableEsmLoader": {
560560
"_package": "@yarnpkg/plugin-pnp",
561561
"description": "If true, Yarn will generate an experimental ESM loader (`.pnp.loader.mjs`). Yarn tries to automatically detect whether ESM support is required.",
562562
"type": "boolean",

packages/plugin-pnp/sources/PnpLinker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ export class PnpInstaller implements Installer {
294294
}
295295

296296
private isEsmEnabled() {
297-
if (this.opts.project.configuration.sources.has(`pnpEnableExperimentalEsm`))
298-
return this.opts.project.configuration.get(`pnpEnableExperimentalEsm`);
297+
if (this.opts.project.configuration.sources.has(`pnpEnableEsmLoader`))
298+
return this.opts.project.configuration.get(`pnpEnableEsmLoader`);
299299

300300
if (this.isESMLoaderRequired)
301301
return true;

packages/plugin-pnp/sources/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ declare module '@yarnpkg/core' {
6464
pnpMode: string;
6565
pnpShebang: string;
6666
pnpIgnorePatterns: Array<string>;
67-
pnpEnableExperimentalEsm: boolean
67+
pnpEnableEsmLoader: boolean
6868
pnpEnableInlining: boolean;
6969
pnpFallbackMode: string;
7070
pnpUnpluggedFolder: PortablePath;
@@ -99,7 +99,7 @@ const plugin: Plugin<CoreHooks & StageHooks> = {
9999
default: [],
100100
isArray: true,
101101
},
102-
pnpEnableExperimentalEsm: {
102+
pnpEnableEsmLoader: {
103103
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.`,
104104
type: SettingsType.BOOLEAN,
105105
default: false,

0 commit comments

Comments
 (0)