Skip to content

Commit e644e6a

Browse files
authored
chore(deps)!: migrate from Yarn to npm (#42149)
1 parent 2daa58a commit e644e6a

26 files changed

+11591
-6407
lines changed

.github/CODEOWNERS

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
/scripts @mdn/engineering
6262
/tests @mdn/engineering
6363

64-
# These are @mdn-bot because the auto-merge GHA workflow uses the PAT of this account.
65-
# If another reviewer is specified, update the PAT token or auto-merge will cease to be automatic.
66-
/package.json @mdn/engineering @mdn-bot
67-
/yarn.lock @mdn/engineering @mdn-bot
64+
# Dependencies
65+
/package.json @mdn/engineering @mdn-bot
66+
/package-lock.json @mdn/engineering @mdn-bot
67+
/yarn.lock @mdn/engineering @mdn-bot

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ system:
44
- changed-files:
55
- any-glob-to-any-file:
66
- package.json
7-
- yarn.lock
7+
- package-lock.json
88
- .github/**
99
- .vscode/**
1010
- .*

.github/workflows/auto-cleanup-bot.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ jobs:
2525
node-version-file: ".nvmrc"
2626
package-manager-cache: false
2727

28-
- name: Install all yarn packages
29-
run: yarn --frozen-lockfile
28+
- name: Install
29+
run: npm ci
3030
env:
3131
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
3232
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3333
LEFTHOOK: 0
3434

3535
- name: Lint markdown files
3636
run: |
37-
yarn content fix-flaws
38-
yarn fix:md
39-
yarn fix:fm
37+
npm run content fix-flaws
38+
npm run fix:md
39+
npm run fix:fm
4040
node scripts/sort_and_unique_file_lines.js .vscode/dictionaries
4141
env:
4242
# Used by the `rari` cli to avoid rate limiting issues

.github/workflows/markdown-lint.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- .nvmrc
88
- .prettier*
99
- package.json
10-
- yarn.lock
10+
- package-lock.json
1111
- .github/workflows/markdown-lint.yml
1212
- .github/workflows/markdownlint-problem-matcher.json
1313

@@ -27,16 +27,16 @@ jobs:
2727
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2828
with:
2929
node-version-file: ".nvmrc"
30-
cache: yarn
30+
cache: npm
3131

32-
- name: Install all yarn packages
33-
run: yarn --frozen-lockfile
32+
- name: Install
33+
run: npm ci
3434
env:
3535
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737

3838
- name: Lint markdown files
3939
run: |
4040
echo "::add-matcher::.github/workflows/markdownlint-problem-matcher.json"
41-
yarn lint:md
42-
yarn lint:fm
41+
npm run lint:md
42+
npm run lint:fm

.github/workflows/pr-check-lint_content.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ jobs:
8282
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
8383
with:
8484
node-version-file: ".nvmrc"
85-
cache: yarn
85+
cache: npm
8686

87-
- name: Install all yarn packages
87+
- name: Install
8888
if: steps.check.outputs.HAS_FILES == 'true'
89-
run: yarn --frozen-lockfile
89+
run: npm ci
9090
env:
9191
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
9292
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -119,7 +119,7 @@ jobs:
119119
120120
echo "Running markdownlint --fix"
121121
MD_LINT_FAILED=false
122-
MD_LINT_LOG=$(yarn markdownlint-cli2 --fix "${files_to_lint[@]}" 2>&1) || MD_LINT_FAILED=true
122+
MD_LINT_LOG=$(npx markdownlint-cli2 --fix "${files_to_lint[@]}" 2>&1) || MD_LINT_FAILED=true
123123
echo "MD_LINT_LOG<<${EOF}" >> "$GITHUB_OUTPUT"
124124
echo "${MD_LINT_LOG}" >> "$GITHUB_OUTPUT"
125125
echo "${EOF}" >> "$GITHUB_OUTPUT"
@@ -135,12 +135,12 @@ jobs:
135135
136136
echo "Running Prettier"
137137
PRETTIER_FAILED=false
138-
PRETTIER_LOG=$(yarn prettier --check "${files_to_lint[@]}" 2>&1) || PRETTIER_FAILED=true
138+
PRETTIER_LOG=$(npx prettier --check "${files_to_lint[@]}" 2>&1) || PRETTIER_FAILED=true
139139
echo "PRETTIER_LOG<<${EOF}" >> "$GITHUB_OUTPUT"
140140
echo "${PRETTIER_LOG}" >> "$GITHUB_OUTPUT"
141141
echo "${EOF}" >> "$GITHUB_OUTPUT"
142142
echo "PRETTIER_FAILED=${PRETTIER_FAILED}" >> "$GITHUB_OUTPUT"
143-
yarn prettier -w "${files_to_lint[@]}"
143+
npx prettier -w "${files_to_lint[@]}"
144144
145145
if [[ -n $(git diff) ]]; then
146146
echo "FILES_MODIFIED=true" >> "$GITHUB_OUTPUT"

.github/workflows/pr-check_javascript.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2525
with:
2626
node-version-file: ".nvmrc"
27-
cache: yarn
27+
cache: npm
2828

29-
- name: Install all yarn packages
30-
run: yarn --frozen-lockfile
29+
- name: Install
30+
run: npm ci
3131
env:
3232
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434

3535
- name: Lint JavaScript files
36-
run: yarn lint:js
36+
run: npm run lint:js

.github/workflows/pr-check_json.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2525
with:
2626
node-version-file: ".nvmrc"
27-
cache: yarn
27+
cache: npm
2828

29-
- name: Install all yarn packages
30-
run: yarn --frozen-lockfile
29+
- name: Install
30+
run: npm ci
3131
env:
3232
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434

3535
- name: Lint JSON files
36-
run: yarn lint:json
36+
run: npm run lint:json

.github/workflows/pr-check_redirects.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2020
with:
2121
node-version-file: ".nvmrc"
22-
cache: yarn
22+
cache: npm
2323

2424
# This is a "required" workflow so path filtering can not be used:
2525
# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks
@@ -34,16 +34,16 @@ jobs:
3434
- "files/**"
3535
- ".github/workflows/pr-check_redirects.yml"
3636
37-
- name: Install all yarn packages
37+
- name: Install
3838
if: steps.filter.outputs.required_files == 'true'
39-
run: yarn --frozen-lockfile
39+
run: npm ci
4040
env:
4141
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343

4444
- name: Check redirects file(s)
4545
if: steps.filter.outputs.required_files == 'true'
46-
run: yarn content validate-redirects en-US
46+
run: npm run content validate-redirects en-US
4747
env:
4848
# Used by the `rari` cli to avoid rate limiting issues
4949
# when fetching the latest releases info from the GitHub API.

.github/workflows/pr-check_scripts.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
paths:
66
- .nvmrc
77
- package.json
8-
- yarn.lock
8+
- package-lock.json
99
- .github/workflows/pr-check_scripts.yml
1010

1111
# No GITHUB_TOKEN permissions, as we only use it to increase API limit.
@@ -24,15 +24,15 @@ jobs:
2424
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2525
with:
2626
node-version-file: ".nvmrc"
27-
cache: yarn
27+
cache: npm
2828

29-
- name: yarn install
30-
run: yarn --frozen-lockfile
29+
- name: npm ci
30+
run: npm ci
3131
env:
3232
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434

35-
- run: yarn up-to-date-check
35+
- run: npm run up-to-date-check
3636

3737
start:
3838
runs-on: ubuntu-latest
@@ -46,16 +46,16 @@ jobs:
4646
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
4747
with:
4848
node-version-file: ".nvmrc"
49-
cache: yarn
49+
cache: npm
5050

51-
- name: yarn install
52-
run: yarn --frozen-lockfile
51+
- name: npm ci
52+
run: npm ci
5353
env:
5454
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
5555
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5656

57-
- name: yarn start
58-
run: yarn start > /tmp/stdout.log 2> /tmp/stderr.log &
57+
- name: npm start
58+
run: npm start > /tmp/stdout.log 2> /tmp/stderr.log &
5959

6060
- name: Wait for Rari (localhost:8083)
6161
run: curl --retry-connrefused --retry 5 -I http://localhost:8083/en-US/
@@ -88,15 +88,15 @@ jobs:
8888
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
8989
with:
9090
node-version-file: ".nvmrc"
91-
cache: yarn
91+
cache: npm
9292

93-
- name: yarn install
94-
run: yarn --frozen-lockfile
93+
- name: npm ci
94+
run: npm ci
9595
env:
9696
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
9797
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9898

99-
- run: yarn filecheck --help
99+
- run: npm run filecheck -- --help
100100

101101
content:
102102
runs-on: ubuntu-latest
@@ -110,19 +110,19 @@ jobs:
110110
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
111111
with:
112112
node-version-file: ".nvmrc"
113-
cache: yarn
113+
cache: npm
114114

115-
- name: Install all yarn packages
116-
run: yarn --frozen-lockfile
115+
- name: Install
116+
run: npm ci
117117
env:
118118
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
119119
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
120120

121-
- run: yarn content --help
121+
- run: npm run content -- --help
122122

123-
- run: yarn content fix-redirects en-US
123+
- run: npm run content fix-redirects en-US
124124

125-
- run: yarn content validate-redirects en-US
125+
- run: npm run content validate-redirects en-US
126126

127127
build:
128128
runs-on: ubuntu-latest
@@ -136,12 +136,12 @@ jobs:
136136
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
137137
with:
138138
node-version-file: ".nvmrc"
139-
cache: yarn
139+
cache: npm
140140

141-
- name: yarn install
142-
run: yarn --frozen-lockfile
141+
- name: npm ci
142+
run: npm ci
143143
env:
144144
# https://github.com/microsoft/vscode-ripgrep#github-api-limit-note
145145
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146146

147-
- run: yarn build --help
147+
- run: npm run build -- --help

.github/workflows/pr-check_url-issues.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
2424
with:
2525
node-version-file: ".nvmrc"
26-
cache: yarn
26+
cache: npm
2727

2828
- name: Check URL deletions and broken fragments
2929
run: |

0 commit comments

Comments
 (0)