Skip to content

Commit ee80068

Browse files
authored
Switch from corepack to a global npm install for now (microsoft#54578)
1 parent 50df257 commit ee80068

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

.github/workflows/ci.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,9 @@ jobs:
107107
node-version: "*"
108108
check-latest: true
109109
- run: |
110-
corepack enable npm
110+
npm --version
111+
# corepack enable npm
112+
npm install -g $(jq -r '.packageManager' < package.json)
111113
npm --version
112114
113115
- run: npm ci
@@ -153,8 +155,13 @@ jobs:
153155
node-version: "*"
154156
check-latest: true
155157
- run: |
156-
corepack enable npm
157158
npm --version
159+
# corepack enable npm
160+
161+
- run: |
162+
npm install -g $(jq -r '.packageManager' < package.json)
163+
npm --version
164+
working-directory: ./pr
158165
159166
- run: npm ci
160167
working-directory: ./pr

.github/workflows/new-release-branch.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ jobs:
2323
steps:
2424
- uses: actions/setup-node@v3
2525
- run: |
26-
corepack enable npm
26+
npm --version
27+
# corepack enable npm
28+
npm install -g $(jq -r '.packageManager' < package.json)
2729
npm --version
2830
- uses: actions/checkout@v3
2931
with:

.github/workflows/nightly.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ jobs:
2929
# Use NODE_AUTH_TOKEN environment variable to authenticate to this registry.
3030
registry-url: https://registry.npmjs.org/
3131
- run: |
32-
corepack enable npm
32+
npm --version
33+
# corepack enable npm
34+
npm install -g $(jq -r '.packageManager' < package.json)
3335
npm --version
3436
- name: Setup and publish nightly
3537
run: |

.github/workflows/release-branch-artifact.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ jobs:
2222
- uses: actions/checkout@v3
2323
- uses: actions/setup-node@v3
2424
- run: |
25-
corepack enable npm
25+
npm --version
26+
# corepack enable npm
27+
npm install -g $(jq -r '.packageManager' < package.json)
2628
npm --version
2729
- name: npm install and test
2830
run: |

.github/workflows/set-version.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ jobs:
2626
with:
2727
ref: ${{ github.event.client_payload.branch_name }}
2828
- run: |
29-
corepack enable npm
29+
npm --version
30+
# corepack enable npm
31+
npm install -g $(jq -r '.packageManager' < package.json)
3032
npm --version
3133
# notably, this is essentially the same script as `new-release-branch.yaml` (with fewer inputs), but it assumes the branch already exists
3234
# do note that executing the transform below will prevent the `configurePrerelease` script from running on the source, as it makes the

.github/workflows/update-package-lock.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ jobs:
3232
with:
3333
node-version: 16
3434
- run: |
35-
corepack enable npm
35+
npm --version
36+
# corepack enable npm
37+
npm install -g $(jq -r '.packageManager' < package.json)
3638
npm --version
3739
3840
- name: Update package-lock.json and push

0 commit comments

Comments
 (0)