Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1bf4a83

Browse files
authored
Merge branch 'main' into feat/when-called-with
2 parents fc72ecf + 746f2a0 commit 1bf4a83

587 files changed

Lines changed: 34151 additions & 6726 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/copilot-instructions.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ Located in `e2e/` with ~190 integration test directories:
129129

130130
```bash
131131
cd e2e/<test-directory>
132-
node ../../packages/jest-cli/bin/jest.js
132+
node ../../packages/jest-cli/bin/jest.js --no-cache
133+
```
134+
135+
Pass Node flags via the environment, e.g.:
136+
137+
```bash
138+
NODE_OPTIONS='--localstorage-file=/tmp/ls.json' node ../../packages/jest-cli/bin/jest.js --no-cache
133139
```
134140

135141
**Note**: Some tests may require Mercurial (`hg`) to be installed. On macOS: `brew install hg`
@@ -147,6 +153,15 @@ yarn lint
147153
- Uses ESLint 9.x with flat config (`eslint.config.mjs`)
148154
- Caches results for faster subsequent runs
149155
- Takes 1-2 minutes
156+
- **Run this only as a final check.** During development, lint only changed files (see below).
157+
158+
**During verification - lint only changed files first**:
159+
160+
```bash
161+
yarn eslint --cache --fix <changed-file-1> <changed-file-2> ...
162+
```
163+
164+
Run `yarn eslint --fix` on each file you edited before running the full `yarn lint`. This catches and auto-fixes issues (import order, formatting) without waiting 1-2 minutes for the full suite.
150165

151166
**Lint specific files/directories**:
152167

.github/workflows/close-stale.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: 'Close month old issues and PRs'
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
15+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
1616
with:
1717
start-date: '2022-01-01T00:00:00Z'
1818
stale-issue-message: 'This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
@@ -32,7 +32,7 @@ jobs:
3232
name: 'Close year old issues and PRs'
3333
runs-on: ubuntu-latest
3434
steps:
35-
- uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0
35+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10.2.0
3636
with:
3737
stale-issue-message: 'This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.'
3838
stale-pr-message: 'This PR is stale because it has been open 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.'

.github/workflows/lock.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: dessant/lock-threads@1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771 # v5.0.1
20+
- uses: dessant/lock-threads@7266a7ce5c1df01b1c6db85bf8cd86c737dadbe7 # v6
2121
with:
2222
github-token: ${{ github.token }}
2323
process-only: 'issues, prs'

.github/workflows/nodejs.yml

Lines changed: 52 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
needs: prepare-yarn-cache-ubuntu
3535

3636
steps:
37-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
37+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3838
with:
3939
persist-credentials: false
40-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
40+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
4141
with:
4242
node-version: lts/*
4343
cache: yarn
@@ -62,10 +62,10 @@ jobs:
6262
needs: prepare-yarn-cache-ubuntu
6363

6464
steps:
65-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
65+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6666
with:
6767
persist-credentials: false
68-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
68+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
6969
with:
7070
node-version: lts/*
7171
cache: yarn
@@ -134,11 +134,11 @@ jobs:
134134
needs: prepare-yarn-cache-ubuntu
135135

136136
steps:
137-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
137+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
138138
with:
139139
persist-credentials: false
140140
- name: Use Node.js LTS
141-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
141+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
142142
with:
143143
node-version: lts/*
144144
cache: yarn
@@ -149,6 +149,47 @@ jobs:
149149
- name: run tests with leak detection
150150
run: yarn test-leak
151151

152+
test-runtime-vm-modules:
153+
name: Node ${{ matrix.node-version }} on Ubuntu with --experimental-vm-modules (jest-runtime)
154+
runs-on: ubuntu-latest
155+
needs: prepare-yarn-cache-ubuntu
156+
strategy:
157+
fail-fast: false
158+
matrix:
159+
node-version: [18.x, 20.x, 22.x, 24.x, 25.x]
160+
161+
steps:
162+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
163+
with:
164+
persist-credentials: false
165+
- name: Use Node.js ${{ matrix.node-version }}
166+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
167+
with:
168+
node-version: ${{ matrix.node-version }}
169+
cache: yarn
170+
- name: install
171+
run: yarn --immutable
172+
- name: build
173+
run: yarn build:js
174+
- name: Get number of CPU cores
175+
id: cpu-cores
176+
uses: SimenB/github-actions-cpu-cores@97330871fe1b7d3529392ea000e3d2c4b357e403 # v3
177+
- name: run jest-runtime tests with --experimental-vm-modules
178+
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4
179+
with:
180+
timeout_minutes: 10
181+
max_attempts: 3
182+
retry_on: error
183+
command: yarn jest-runtime-vm-modules-ci --max-workers ${{ steps.cpu-cores.outputs.count }}
184+
- name: map coverage
185+
run: node ./scripts/mapCoverage.mjs
186+
if: always()
187+
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
188+
if: always()
189+
with:
190+
directory: ./coverage
191+
token: ${{ secrets.CODECOV_TOKEN }}
192+
152193
test-coverage:
153194
name: Node LTS on Ubuntu with coverage (${{ matrix.shard }})
154195
strategy:
@@ -159,11 +200,11 @@ jobs:
159200
needs: prepare-yarn-cache-ubuntu
160201

161202
steps:
162-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
203+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
163204
with:
164205
persist-credentials: false
165206
- name: Use Node.js LTS
166-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
207+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
167208
with:
168209
node-version: lts/*
169210
cache: yarn
@@ -173,9 +214,9 @@ jobs:
173214
run: yarn build:js
174215
- name: Get number of CPU cores
175216
id: cpu-cores
176-
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
217+
uses: SimenB/github-actions-cpu-cores@97330871fe1b7d3529392ea000e3d2c4b357e403 # v3
177218
- name: run tests with coverage
178-
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
219+
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4
179220
with:
180221
timeout_minutes: 10
181222
max_attempts: 3
@@ -184,7 +225,7 @@ jobs:
184225
- name: map coverage
185226
run: node ./scripts/mapCoverage.mjs
186227
if: always()
187-
- uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
228+
- uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
188229
if: always()
189230
with:
190231
directory: ./coverage

.github/workflows/pkg-pr-new.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414

1515
steps:
1616
- name: Checkout Repo
17-
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1818

1919
- name: Setup Node.js LTS
20-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
20+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2121
with:
2222
node-version: lts/*
2323
cache: yarn

.github/workflows/prepare-cache.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ${{ inputs.os }}
1414

1515
steps:
16-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
16+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1717
with:
1818
persist-credentials: false
1919

20-
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
20+
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2121
with:
2222
node-version: lts/*
2323
cache: yarn

.github/workflows/test-nightly.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
runs-on: ${{ inputs.os }}
1818

1919
steps:
20-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
20+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121
with:
2222
persist-credentials: false
2323
- name: Use Node.js nightly build
24-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
24+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2525
with:
2626
node-version: 26-nightly
2727
cache: yarn
@@ -31,11 +31,11 @@ jobs:
3131
run: yarn build:js
3232
- name: Get number of CPU cores
3333
id: cpu-cores
34-
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
34+
uses: SimenB/github-actions-cpu-cores@97330871fe1b7d3529392ea000e3d2c4b357e403 # v3
3535
- name: run node-env tests
3636
run: yarn workspace jest-environment-node test
3737
- name: run tests
38-
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
38+
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4
3939
with:
4040
timeout_minutes: 10
4141
max_attempts: 3
@@ -51,11 +51,11 @@ jobs:
5151
runs-on: ${{ inputs.os }}
5252

5353
steps:
54-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5555
with:
5656
persist-credentials: false
5757
- name: Use Node.js nightly build
58-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
58+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
5959
with:
6060
node-version: 26-nightly
6161
cache: yarn
@@ -65,9 +65,9 @@ jobs:
6565
run: yarn build:js
6666
- name: Get number of CPU cores
6767
id: cpu-cores
68-
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
68+
uses: SimenB/github-actions-cpu-cores@97330871fe1b7d3529392ea000e3d2c4b357e403 # v3
6969
- name: run tests using jest-jasmine
70-
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
70+
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4
7171
with:
7272
timeout_minutes: 10
7373
max_attempts: 3

.github/workflows/test.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
node-version: [18.x, 20.x, 22.x, 24.x]
18+
node-version: [18.x, 20.x, 22.x, 24.x, 25.x]
1919
name: Node v${{ matrix.node-version }}
2020
runs-on: ${{ inputs.os }}
2121

2222
steps:
23-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424
with:
2525
persist-credentials: false
2626
- name: Use Node.js ${{ matrix.node-version }}
27-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
27+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
2828
with:
2929
node-version: ${{ matrix.node-version }}
3030
cache: yarn
@@ -34,11 +34,11 @@ jobs:
3434
run: yarn build:js
3535
- name: Get number of CPU cores
3636
id: cpu-cores
37-
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
37+
uses: SimenB/github-actions-cpu-cores@97330871fe1b7d3529392ea000e3d2c4b357e403 # v3
3838
- name: run node-env tests
3939
run: yarn workspace jest-environment-node test
4040
- name: run tests
41-
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
41+
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4
4242
with:
4343
timeout_minutes: 10
4444
max_attempts: 3
@@ -50,11 +50,11 @@ jobs:
5050
runs-on: ${{ inputs.os }}
5151

5252
steps:
53-
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
53+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5454
with:
5555
persist-credentials: false
5656
- name: Use Node.js LTS
57-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
57+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
5858
with:
5959
node-version: lts/*
6060
cache: yarn
@@ -64,9 +64,9 @@ jobs:
6464
run: yarn build:js
6565
- name: Get number of CPU cores
6666
id: cpu-cores
67-
uses: SimenB/github-actions-cpu-cores@97ba232459a8e02ff6121db9362b09661c875ab8 # v2.0.0
67+
uses: SimenB/github-actions-cpu-cores@97330871fe1b7d3529392ea000e3d2c4b357e403 # v3
6868
- name: run tests using jest-jasmine
69-
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # v3.0.2
69+
uses: nick-fields/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4
7070
with:
7171
timeout_minutes: 10
7272
max_attempts: 3

0 commit comments

Comments
 (0)