Skip to content

Commit 2bb4342

Browse files
kettanaitoAndarist
andauthored
feat!: v3.0.0 (#2692)
Co-authored-by: Mateusz Burzyński <[email protected]>
1 parent 85f4bf3 commit 2bb4342

756 files changed

Lines changed: 25366 additions & 22004 deletions

File tree

Some content is hidden

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

‎.github/ISSUE_TEMPLATE/02-issue-nodejs.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'Bug report (Node.js)'
2-
description: I experience unexpected behavior using the library in Node.js (Vitest/React Native/Express/etc.).
2+
description: I experience unexpected behavior using the library in Node.js (Vitest/Express/etc.).
33
labels: ['bug', 'scope:node', 'needs:triage']
44
body:
55
- type: markdown
@@ -23,7 +23,7 @@ body:
2323
options:
2424
- label: I'm using the [latest](https://github.com/mswjs/msw/releases/latest) `msw` version
2525
required: true
26-
- label: I'm using Node.js version 20 or higher
26+
- label: I'm using Node.js version 22 or higher
2727
required: true
2828

2929
- type: input

‎.github/workflows/ci.yml‎

Lines changed: 18 additions & 244 deletions
Original file line numberDiff line numberDiff line change
@@ -10,274 +10,48 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
build-20:
14-
name: build (20)
15-
runs-on: blacksmith-4vcpu-ubuntu-2404
13+
build:
14+
name: build (Node.js ${{ matrix.nodeVersion }})
15+
runs-on: blacksmith-8vcpu-ubuntu-2404
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
nodeVersion: ['22.23.2', '24', '26']
1620
steps:
1721
- name: Checkout
1822
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
1923

2024
- name: Set up pnpm
2125
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
2226
with:
23-
version: 9.15.0
27+
version: 11.27.1
2428

2529
- name: Set up Node.js
2630
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
2731
with:
28-
node-version: 20
29-
cache: 'pnpm'
32+
node-version: ${{ matrix.nodeVersion }}
3033

3134
- name: Install dependencies
3235
run: pnpm install --frozen-lockfile
3336

34-
- name: Lint
35-
run: pnpm lint
36-
37-
- name: Build
38-
run: pnpm build
39-
40-
- name: Cache build output
41-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
42-
with:
43-
path: ./lib
44-
key: ${{ runner.os }}-node-20-build-${{ github.sha }}
45-
restore-keys: |
46-
${{ runner.os }}-build-20
47-
48-
build-22:
49-
name: build (22)
50-
runs-on: blacksmith-4vcpu-ubuntu-2404
51-
steps:
52-
- name: Checkout
53-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
54-
55-
- name: Set up pnpm
56-
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
57-
with:
58-
version: 9.15.0
59-
60-
- name: Set up Node.js
61-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
62-
with:
63-
node-version: 22
64-
65-
- name: Install dependencies
66-
run: pnpm install --frozen-lockfile
37+
- name: Install Playwright browsers
38+
run: pnpm exec playwright install chromium --with-deps --only-shell
6739

6840
- name: Lint
6941
run: pnpm lint
7042

7143
- name: Build
7244
run: pnpm build
7345

74-
- name: Cache build output
75-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
76-
with:
77-
path: ./lib
78-
key: ${{ runner.os }}-node-22-build-${{ github.sha }}
79-
restore-keys: |
80-
${{ runner.os }}-build-22
81-
82-
test-unit:
83-
name: test (unit)
84-
needs: build-22
85-
runs-on: blacksmith-4vcpu-ubuntu-2404
86-
steps:
87-
- name: Checkout
88-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
89-
90-
- name: Set up pnpm
91-
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
92-
with:
93-
version: 9.15.0
94-
95-
- name: Set up Node.js
96-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
97-
with:
98-
node-version: 22
99-
100-
- name: Restore build cache
101-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
102-
with:
103-
path: ./lib
104-
key: ${{ runner.os }}-node-22-build-${{ github.sha }}
105-
restore-keys: |
106-
${{ runner.os }}-node-22-build-
107-
108-
- name: Install dependencies
109-
run: pnpm install --frozen-lockfile
110-
111-
- name: Install Playwright browsers
112-
run: pnpm exec playwright install chromium --with-deps --only-shell
46+
- name: Tests
47+
run: pnpm test
11348

114-
- name: Unit tests
115-
run: pnpm test:unit
49+
- name: Playwright tests
50+
run: pnpm test:playwright
11651

117-
test-node-20:
118-
name: test (node.js) (20)
119-
needs: build-20
120-
runs-on: blacksmith-4vcpu-ubuntu-2404
121-
steps:
122-
- name: Checkout
123-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
124-
125-
- name: Set up pnpm
126-
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
127-
with:
128-
version: 9.15.0
129-
130-
- name: Set up Node.js
131-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
132-
with:
133-
node-version: 20
134-
135-
- name: Restore build cache
136-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
137-
with:
138-
path: ./lib
139-
key: ${{ runner.os }}-node-20-build-${{ github.sha }}
140-
restore-keys: |
141-
${{ runner.os }}-node-20-build-
142-
143-
- name: Install dependencies
144-
run: pnpm install --frozen-lockfile
145-
146-
- name: Node.js tests
147-
run: pnpm test:node
148-
149-
- name: Memory tests
150-
run: pnpm test:memory
151-
152-
test-node-22:
153-
name: test (node.js) (22)
154-
needs: build-22
155-
runs-on: blacksmith-4vcpu-ubuntu-2404
156-
steps:
157-
- name: Checkout
158-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
159-
160-
- name: Set up pnpm
161-
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
162-
with:
163-
version: 9.15.0
164-
165-
- name: Set up Node.js
166-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
167-
with:
168-
node-version: 22
169-
170-
- name: Restore build cache
171-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
172-
with:
173-
path: ./lib
174-
key: ${{ runner.os }}-node-22-build-${{ github.sha }}
175-
restore-keys: |
176-
${{ runner.os }}-node-22-build-
177-
178-
- name: Install dependencies
179-
run: pnpm install --frozen-lockfile
180-
181-
- name: Node.js tests
182-
run: pnpm test:node
183-
184-
- name: Memory tests
185-
run: pnpm test:memory
186-
187-
test-e2e:
188-
name: test (e2e) (20)
189-
needs: build-20
190-
runs-on: blacksmith-4vcpu-ubuntu-2404
191-
steps:
192-
- name: Checkout
193-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
194-
195-
- name: Set up pnpm
196-
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
197-
with:
198-
version: 9.15.0
199-
200-
- name: Set up Node.js
201-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
202-
with:
203-
node-version: 20
204-
205-
- name: Install dependencies
206-
run: pnpm install --frozen-lockfile
207-
208-
- name: E2E tests
209-
run: pnpm test:e2e
210-
211-
test-browser:
212-
name: test (browser)
213-
needs: build-22
214-
runs-on: blacksmith-8vcpu-ubuntu-2404
215-
steps:
216-
- name: Checkout
217-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
218-
219-
- name: Set up pnpm
220-
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
221-
with:
222-
version: 9.15.0
223-
224-
- name: Set up Node.js
225-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
226-
with:
227-
node-version: 22
228-
229-
- name: Restore build cache
230-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
231-
with:
232-
path: ./lib
233-
key: ${{ runner.os }}-node-22-build-${{ github.sha }}
234-
restore-keys: |
235-
${{ runner.os }}-node-22-build-
236-
237-
- name: Install dependencies
238-
run: pnpm install --frozen-lockfile
239-
240-
- name: Playwright install
241-
run: pnpm exec playwright install chromium --with-deps --only-shell
242-
243-
- name: Browser tests
244-
run: pnpm test:browser
245-
246-
- name: Upload test artifacts
52+
- name: Upload Playwright artifacts
24753
if: always()
24854
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a
24955
with:
250-
name: playwright-report
251-
path: test/browser/test-results
252-
253-
test-native:
254-
name: test (react-native)
255-
needs: build-20
256-
runs-on: blacksmith-4vcpu-ubuntu-2404
257-
steps:
258-
- name: Checkout
259-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
260-
261-
- name: Set up pnpm
262-
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
263-
with:
264-
version: 9.15.0
265-
266-
- name: Set up Node.js
267-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
268-
with:
269-
node-version: 20
270-
271-
- name: Restore build cache
272-
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
273-
with:
274-
path: ./lib
275-
key: ${{ runner.os }}-node-20-build-${{ github.sha }}
276-
restore-keys: |
277-
${{ runner.os }}-node-20-build-
278-
279-
- name: Install dependencies
280-
run: pnpm install --frozen-lockfile
281-
282-
- name: React Native tests
283-
run: pnpm test:native
56+
name: playwright-report-node-${{ matrix.nodeVersion }}
57+
path: test/test-results

‎.github/workflows/compat.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
- name: Set up pnpm
2626
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
2727
with:
28-
version: 9.15.0
28+
version: 11.27.1
2929

3030
- name: Install dependencies
3131
run: pnpm install --frozen-lockfile
@@ -57,7 +57,7 @@ jobs:
5757
matrix:
5858
# As a general rule, when adding a new version, remove the oldest version
5959
# Check if the oldest version is EOL or not first.
60-
ts: ['5.0', '5.1', '5.2', '5.3', '5.4', '5.5', '5.6', '5.7', '5.8']
60+
ts: ['5.9', '6.0', '7.0']
6161
steps:
6262
- name: Checkout
6363
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
@@ -69,7 +69,7 @@ jobs:
6969

7070
- uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
7171
with:
72-
version: 9.15.0
72+
version: 11.27.1
7373

7474
- name: Install dependencies
7575
run: pnpm install --frozen-lockfile

‎.github/workflows/release-preview.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up pnpm
2828
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
2929
with:
30-
version: 9.15.0
30+
version: 11.27.1
3131

3232
- name: Install dependencies
3333
run: pnpm install --frozen-lockfile

‎.github/workflows/release.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- name: Set up pnpm
1919
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
2020
with:
21-
version: 9.15.0
21+
version: 11.27.1
2222

2323
- name: Set up Node.js
2424
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e
@@ -62,7 +62,7 @@ jobs:
6262
- name: Set up pnpm
6363
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
6464
with:
65-
version: 9.15.0
65+
version: 11.27.1
6666

6767
- name: Set up Node.js
6868
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e

‎.github/workflows/smoke-test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Set up pnpm
2929
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
3030
with:
31-
version: 9.15.0
31+
version: 11.27.1
3232

3333
- name: Install dependencies
3434
run: pnpm install --frozen-lockfile

‎.github/workflows/typescript-nightly.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Set up pnpm
5252
uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093
5353
with:
54-
version: 9.15.0
54+
version: 11.27.1
5555

5656
- name: Install dependencies
5757
run: pnpm install --frozen-lockfile

‎.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ msw-*.tgz
1616
**/test-results
1717
/test/modules/node/node-esm-tests
1818
*.tsbuildinfo
19+
.pnpm-store/
1920

2021
# Smoke test temporary files.
2122
/package.json.copy

‎.node-version‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
v24

‎.nvmrc‎

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)