Skip to content

Commit c96023a

Browse files
authored
chore!: require Node 18; use pnpm (#4416)
BREAKING CHANGE: Require Node v18.14+
1 parent e75e42f commit c96023a

11 files changed

+3827
-11090
lines changed

.github/dependabot.yml

+9-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: weekly
7-
time: "10:00"
8-
open-pull-requests-limit: 10
9-
labels: [dependencies]
10-
versioning-strategy: increase
3+
# # pnpm support coming soon: https://github.com/dependabot/dependabot-core/issues/1736#issuecomment-1489987159
4+
# - package-ecosystem: npm
5+
# directory: "/"
6+
# schedule:
7+
# interval: weekly
8+
# time: "10:00"
9+
# open-pull-requests-limit: 10
10+
# labels: [dependencies]
11+
# versioning-strategy: increase
1112

1213
- package-ecosystem: github-actions
1314
directory: "/"

.github/workflows/pr.yml

+20-20
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,25 @@ jobs:
3030
curl -sL https://api.github.com/repos/w3c/respec/pulls/${{ github.event.pull_request.number }}/files -o /tmp/pr_files.json
3131
cat /tmp/pr_files.json | jq -r '.[].filename' | grep -qE "^builds/" || exit 0
3232
echo "::error::Uh oh! builds/ was changed."; exit 1
33+
- uses: pnpm/action-setup@v2
3334
- uses: actions/setup-node@v3
34-
with: { node-version: 16, cache: npm }
35-
- run: npm ci
36-
- run: npm run lint
35+
with: { node-version: 18, cache: pnpm }
36+
- run: pnpm i --frozen-lockfile
37+
- run: pnpm lint
3738

3839
test-headless:
3940
name: Headless Tests
4041
runs-on: ubuntu-latest
4142
needs: lint
4243
steps:
4344
- uses: actions/checkout@v3
45+
- uses: pnpm/action-setup@v2
4446
- uses: actions/setup-node@v3
45-
with: { node-version: 16, cache: npm }
46-
- run: npm ci
47-
- run: npm run test:build
48-
- run: npm run build:w3c
49-
- run: npm run test:headless
47+
with: { node-version: 18, cache: pnpm }
48+
- run: pnpm i --frozen-lockfile
49+
- run: pnpm test:build
50+
- run: pnpm build:w3c
51+
- run: pnpm test:headless
5052

5153
test-karma:
5254
name: Karma Unit Tests (${{ matrix.browser }})
@@ -57,16 +59,15 @@ jobs:
5759
needs: lint
5860
steps:
5961
- uses: actions/checkout@v3
62+
- uses: pnpm/action-setup@v2
6063
- uses: actions/setup-node@v3
61-
with: { node-version: 16, cache: npm }
62-
- name: install & build
63-
run: |
64-
npm ci
65-
npm run build:w3c & npm run build:geonovum
66-
- run: npm run test:unit
64+
with: { node-version: 18, cache: pnpm }
65+
- run: pnpm i --frozen-lockfile
66+
- run: pnpm build:w3c & pnpm build:geonovum
67+
- run: pnpm test:unit
6768
env:
6869
BROWSERS: ${{ matrix.browser }}
69-
- run: npm run test:integration
70+
- run: pnpm test:integration
7071
env:
7172
BROWSERS: ${{ matrix.browser }}
7273

@@ -76,12 +77,11 @@ jobs:
7677
needs: lint
7778
steps:
7879
- uses: actions/checkout@v3
80+
- uses: pnpm/action-setup@v2
7981
- uses: actions/setup-node@v3
80-
with: { node-version: 16, cache: npm }
81-
- name: install & build
82-
run: |
83-
npm ci
84-
npm run build:w3c
82+
with: { node-version: 18, cache: pnpm }
83+
- run: pnpm i --frozen-lockfile
84+
- run: pnpm build:w3c
8585
- name: run validator
8686
run: |
8787
vnu=$(node -p "require('vnu-jar')")

.github/workflows/push.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,12 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- uses: actions/checkout@v3
30+
- uses: pnpm/action-setup@v2
3031
- uses: actions/setup-node@v3
31-
with: { node-version: 16, cache: npm }
32-
- name: install & build
33-
run: |
34-
npm ci
35-
npm run build:w3c
36-
- run: npm run test:headless
32+
with: { node-version: 18, cache: pnpm }
33+
- run: pnpm i --frozen-lockfile
34+
- run: pnpm build:w3c
35+
- run: pnpm test:headless
3736
- name: Calculate size and update on server
3837
run: |
3938
timestamp=$(git show --no-patch --pretty='%cd' --date='format:%s')
@@ -53,12 +52,11 @@ jobs:
5352
runs-on: ubuntu-latest
5453
steps:
5554
- uses: actions/checkout@v3
55+
- uses: pnpm/action-setup@v2
5656
- uses: actions/setup-node@v3
57-
with: { node-version: 16, cache: npm }
58-
- name: install & build
59-
run: |
60-
npm ci
61-
npm run build:w3c & npm run build:geonovum
62-
- run: npm test
57+
with: { node-version: 18, cache: pnpm }
58+
- run: pnpm i --frozen-lockfile
59+
- run: pnpm build:w3c & pnpm build:geonovum
60+
- run: pnpm test
6361
env:
6462
BROWSERS: ChromeHeadless

.github/workflows/regressions.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15+
- uses: pnpm/action-setup@v2
1516
- uses: actions/setup-node@v3
16-
with: { node-version: 16, cache: npm }
17-
- run: npm ci
18-
- run: npm run build:w3c
17+
with: { node-version: 18, cache: pnpm }
18+
- run: pnpm i --frozen-lockfile
19+
- run: pnpm build:w3c
1920
- uses: actions/upload-artifact@v3
2021
with:
2122
name: builds
@@ -41,9 +42,10 @@ jobs:
4142
fail-fast: false
4243
steps:
4344
- uses: actions/checkout@v3
45+
- uses: pnpm/action-setup@v2
4446
- uses: actions/setup-node@v3
45-
with: { node-version: 16, cache: npm }
46-
- run: npm ci --production --ignore-scripts
47+
with: { node-version: 18, cache: pnpm }
48+
- run: pnpm i --frozen-lockfile
4749
- uses: actions/download-artifact@v3
4850
with:
4951
name: builds

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ js/deps/builds
1212
!js/profile-w3c.js
1313
.vscode/*
1414
!.vscode/tasks.json
15-
pnpm-lock.yaml
15+
package-lock.json
16+
yarn.lock
1617
*.log

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
18

0 commit comments

Comments
 (0)