Skip to content

Commit 4f72425

Browse files
authored
Removes extraneous script warnings (#2103)
* Fixes extraneous warnings * Versions
1 parent 00e88a9 commit 4f72425

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.yarn/versions/c0cc9126.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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-node-modules"
13+
- "@yarnpkg/plugin-npm-cli"
14+
- "@yarnpkg/plugin-pack"
15+
- "@yarnpkg/plugin-patch"
16+
- "@yarnpkg/plugin-stage"
17+
- "@yarnpkg/plugin-typescript"
18+
- "@yarnpkg/plugin-version"
19+
- "@yarnpkg/plugin-workspace-tools"
20+
- "@yarnpkg/builder"
21+
- "@yarnpkg/core"
22+
- "@yarnpkg/doctor"

packages/plugin-pnp/sources/jsInstallUtils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ export function extractBuildScripts(pkg: Package, requirements: ExtractBuildScri
3737
if (!requirements.manifest.scripts.has(`install`) && requirements.misc.hasBindingGyp)
3838
buildScripts.push([BuildType.SHELLCODE, `node-gyp rebuild`]);
3939

40+
if (buildScripts.length === 0)
41+
return [];
42+
4043
if (!configuration.get(`enableScripts`) && !dependencyMeta.built) {
4144
report?.reportWarningOnce(MessageName.DISABLED_BUILD_SCRIPTS, `${structUtils.prettyLocator(configuration, pkg)} lists build scripts, but all build scripts have been disabled.`);
4245
return [];

0 commit comments

Comments
 (0)