Skip to content

Commit 21333d8

Browse files
committed
feat: add run --global option
1 parent d1961ee commit 21333d8

File tree

47 files changed

+80
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+80
-59
lines changed

.github/actions/prepare/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ runs:
1616
- name: 'Build the standard bundle'
1717
if: steps.cache-build.outputs.cache-hit != 'true'
1818
run: |
19-
node ./scripts/run-yarn.js build:cli
19+
node ./scripts/run-yarn.js run --global build:cli
2020
shell: bash
2121
#endregion
2222

.github/workflows/integration-workflow.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,10 @@ jobs:
159159
- name: 'Build bundle & plugins'
160160
run: |
161161
node --version
162-
node ./scripts/run-yarn.js build:pnp:hook
163-
node ./scripts/run-yarn.js build:cli
162+
node ./scripts/run-yarn.js run --global build:pnp:hook
163+
node ./scripts/run-yarn.js run --global build:cli
164164
mv ./packages/yarnpkg-cli/bundles/yarn.js ./packages/yarnpkg-cli/bundles/yarn-min.js
165-
node ./scripts/run-yarn.js build:cli --no-minify
165+
node ./scripts/run-yarn.js run --global build:cli --no-minify
166166
shell: bash
167167

168168
- uses: actions/upload-artifact@v2
@@ -174,7 +174,7 @@ jobs:
174174
175175
- name: 'Build vscode-zipfs'
176176
run: |
177-
node ./scripts/run-yarn.js package:vscode-zipfs
177+
node ./scripts/run-yarn.js run --global package:vscode-zipfs
178178
if: |
179179
success() || failure()
180180
@@ -218,7 +218,7 @@ jobs:
218218

219219
- name: 'Run the integration tests'
220220
run: |
221-
node ./scripts/run-yarn.js test:integration --runInBand
221+
node ./scripts/run-yarn.js run --global test:integration --runInBand
222222
shell: bash
223223

224224
- name: 'Run the unit tests'

.github/workflows/package-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: 'Build the standard bundle'
2828
run: |
2929
set -ex
30-
node ./scripts/run-yarn.js build:cli
30+
node ./scripts/run-yarn.js run --global build:cli
3131
3232
- name: 'Build the dist directory'
3333
run: |

.github/workflows/plugin-compat-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323

2424
- name: 'Run the plugin-compat tests'
2525
run: |
26-
node ./scripts/run-yarn.js test:plugin-compat
26+
node ./scripts/run-yarn.js run --global test:plugin-compat

.yarn/versions/c5422023.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
releases:
2+
"@yarnpkg/plugin-essentials": major
3+
"@yarnpkg/plugin-workspace-tools": major
4+
5+
declined:
6+
- "@yarnpkg/plugin-compat"
7+
- "@yarnpkg/plugin-github"
8+
- "@yarnpkg/fslib"
9+
- "@yarnpkg/nm"
10+
- "@yarnpkg/parsers"
11+
- "@yarnpkg/pnpify"
12+
- "@yarnpkg/shell"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Yarn now accepts sponsorships! Please give a look at our [OpenCollective](https:
1616
- Some legacy layers have been sunset:
1717
- Plugins cannot access the Clipanion 2 APIs anymore (upgrade to [Clipanion 3](https://github.com/arcanis/clipanion))
1818
- Plugins cannot access the internal copy of Yup anymore (use [Typanion](https://github.com/arcanis/typanion) instead)
19+
- Scripts containing a colon are no longer implicitly global. The `--global` option should be used instead.
1920

2021
### **API Changes**
2122

constraints.pro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ gen_enforced_field(WorkspaceCwd, 'scripts.update-local', '<any value>') :-
6969
inline_compile('@yarnpkg/eslint-config').
7070
inline_compile('@yarnpkg/libui').
7171

72-
gen_enforced_field(WorkspaceCwd, 'scripts.prepack', 'run build:compile "$(pwd)"') :-
72+
gen_enforced_field(WorkspaceCwd, 'scripts.prepack', 'run --global build:compile "$(pwd)"') :-
7373
workspace(WorkspaceCwd),
7474
% This package is built using Rollup, so we allow it to configure its build scripts itself
7575
\+ workspace_ident(WorkspaceCwd, '@yarnpkg/pnp'),

packages/acceptance-tests/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"pkg-tests-core": "workspace:^"
1414
},
1515
"scripts": {
16-
"test:integration": "run test:unit --config \"$(pwd)/jest.config.js\""
16+
"test:integration": "run --global test:unit --config \"$(pwd)/jest.config.js\""
1717
},
1818
"repository": {
1919
"type": "git",

packages/esbuild-plugin-pnp/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
},
1616
"scripts": {
1717
"postpack": "rm -rf lib",
18-
"prepack": "run build:compile \"$(pwd)\"",
18+
"prepack": "run --global build:compile \"$(pwd)\"",
1919
"release": "yarn npm publish"
2020
},
2121
"publishConfig": {

packages/plugin-compat/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
},
3030
"scripts": {
3131
"postpack": "rm -rf lib",
32-
"prepack": "run build:compile \"$(pwd)\"",
33-
"test:plugin-compat": "run test:unit --config \"$(pwd)/jest.config.js\"",
32+
"prepack": "run --global build:compile \"$(pwd)\"",
33+
"test:plugin-compat": "run --global test:unit --config \"$(pwd)/jest.config.js\"",
3434
"debug:patch": "node -r @yarnpkg/monorepo/scripts/setup-ts-execution extra/debugPatch \"$INIT_CWD\""
3535
},
3636
"publishConfig": {

0 commit comments

Comments
 (0)