Skip to content

Commit c0274d6

Browse files
NormalGaussianNormal Gaussian
andauthored
Fix: Names the Experimental ESM support warning (#7069)
Names the ESM experimental loading warning ## What's the problem this PR addresses? Simple justification: unnamed logs should be avoided More complex justifiation: Lots of workspaces now are esm by default. This warning will appear on all of them. While it is "true", there is a strong desire to filter it out so that it does not: - cause others to ignore genuine warnings - make identifying warnings in CI overly complex, (partially address #7066) Unnamed logs cannot be filtered. ## How did you fix it? I've added a new name for the warning, and made the warning use that name ## Checklist - [x] I have read the [Contributing Guide](https://yarnpkg.com/advanced/contributing). - [x] I have set the packages that need to be released for my changes to be effective. - [x] I will check that all automated PR checks pass before the PR gets reviewed. Co-authored-by: Normal Gaussian <[email protected]>
1 parent 4bd2b21 commit c0274d6

4 files changed

Lines changed: 44 additions & 1 deletion

File tree

β€Ž.yarn/versions/73a88def.ymlβ€Ž

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
releases:
2+
"@yarnpkg/cli": patch
3+
"@yarnpkg/core": patch
4+
"@yarnpkg/plugin-pnp": patch
5+
6+
declined:
7+
- "@yarnpkg/plugin-catalog"
8+
- "@yarnpkg/plugin-compat"
9+
- "@yarnpkg/plugin-constraints"
10+
- "@yarnpkg/plugin-dlx"
11+
- "@yarnpkg/plugin-essentials"
12+
- "@yarnpkg/plugin-exec"
13+
- "@yarnpkg/plugin-file"
14+
- "@yarnpkg/plugin-git"
15+
- "@yarnpkg/plugin-github"
16+
- "@yarnpkg/plugin-http"
17+
- "@yarnpkg/plugin-init"
18+
- "@yarnpkg/plugin-interactive-tools"
19+
- "@yarnpkg/plugin-jsr"
20+
- "@yarnpkg/plugin-link"
21+
- "@yarnpkg/plugin-nm"
22+
- "@yarnpkg/plugin-npm"
23+
- "@yarnpkg/plugin-npm-cli"
24+
- "@yarnpkg/plugin-pack"
25+
- "@yarnpkg/plugin-patch"
26+
- "@yarnpkg/plugin-pnpm"
27+
- "@yarnpkg/plugin-stage"
28+
- "@yarnpkg/plugin-typescript"
29+
- "@yarnpkg/plugin-version"
30+
- "@yarnpkg/plugin-workspace-tools"
31+
- "@yarnpkg/builder"
32+
- "@yarnpkg/doctor"
33+
- "@yarnpkg/extensions"
34+
- "@yarnpkg/nm"
35+
- "@yarnpkg/pnpify"
36+
- "@yarnpkg/sdks"

β€Žpackages/docusaurus/docs/advanced/01-general-reference/error-codes.mdxβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,3 +485,9 @@ publish:
485485
- yarn config set npmAuthToken $NPM_TOKEN
486486
- yarn publish --provenance --tolerate-republish
487487
```
488+
489+
## YN0092 - `EXPERIMENTAL`
490+
491+
A feature you're using depends on an experimental or unstable API provided by the underlying runtime (e.g. Node.js). While the feature works today, the API it relies on may change or be removed without notice in future runtime versions, which could lead to breakage.
492+
493+
This is informational β€” everything should work correctly for now, but be aware that updates to your runtime may require corresponding updates to Yarn before the feature can continue to work as expected.

β€Žpackages/plugin-pnp/sources/PnpLinker.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ export class PnpInstaller implements Installer {
349349
}
350350

351351
if (this.isEsmEnabled()) {
352-
this.opts.report.reportWarning(MessageName.UNNAMED, `ESM support for PnP uses the experimental loader API and is therefore experimental`);
352+
this.opts.report.reportWarning(MessageName.EXPERIMENTAL, `ESM support for PnP uses the experimental loader API and is therefore experimental`);
353353
await xfs.changeFilePromise(pnpPath.esmLoader, getESMLoaderTemplate(), {
354354
automaticNewlines: true,
355355
mode: 0o644,

β€Žpackages/yarnpkg-core/sources/MessageName.tsβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ export enum MessageName {
103103
TIPS_NOTICE = 89,
104104
OFFLINE_MODE_ENABLED = 90,
105105
INVALID_PROVENANCE_ENVIRONMENT = 91,
106+
EXPERIMENTAL = 92,
106107
}
107108

108109
export function stringifyMessageName(name: MessageName | number): string {

0 commit comments

Comments
Β (0)