Skip to content

Commit 9883dbe

Browse files
authored
Merge branch 'main' into bau/update-react-native-example
2 parents e7d9e5c + 70aa921 commit 9883dbe

File tree

18 files changed

+668
-111
lines changed

18 files changed

+668
-111
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
!/e2e/presets/js/node_modules
1414
/e2e/transform/*/coverage
1515
/e2e/transform/*/node_modules
16+
/e2e/custom-jsdom-version/*/node_modules
1617

1718
/node_modules
1819

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33
### Chore & Maintenance
44

55
- `[*]` Update example repo for testing React Native projects ([#15832](https://github.com/jestjs/jest/pull/15832))
6+
- `[*]` Update `jest-watch-typeahead` to v3 ([#15830](https://github.com/jestjs/jest/pull/15830))
7+
8+
## Features
9+
10+
- `[jest-environment-jsdom-abstract]` Add support for JSDOM v27 ([#15834](https://github.com/jestjs/jest/pull/15834))
11+
12+
### Fixes
13+
14+
- `[babel-jest]` Export the `TransformerConfig` interface ([#15820](https://github.com/jestjs/jest/pull/15820))
615

716
## 30.1.3
817

@@ -21,6 +30,7 @@
2130
### Fixes
2231

2332
- `[jest-snapshot-utils]` Fix deprecated goo.gl snapshot warning not handling Windows end-of-line sequences ([#15800](https://github.com/jestjs/jest/pull/15800))
33+
- `[jest-snapshot-utils]` Improve messaging about goo.gl snapshot link change ([#15821](https://github.com/jestjs/jest/pull/15821))
2434

2535
## 30.1.0
2636

SECURITY.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
1+
# Security Policy
2+
13
## Reporting a Vulnerability
24

3-
If you discover a security vulnerability within Jest, please submit a report via the GitHub's [Private Vulnerability Reporting](https://github.com/jestjs/jest/security/advisories) feature.
5+
Please report security issues **privately** using GitHub’s **Report a vulnerability** form on this repository (Security tab).
6+
7+
**Do not** file public GitHub issues for security problems.
8+
9+
When reporting, please include:
10+
- Affected project/repo and version(s)
11+
- Impact and component(s) involved
12+
- Reproduction steps or PoC (if available)
13+
- Your contact and preferred credit name
14+
15+
If you do not receive an acknowledgement of your report within **6 business days**, or if you cannot find a private security contact for the project, you may **escalate to the OpenJS Foundation CNA** at `security@lists.openjsf.org`.
16+
17+
If the project acknowledges your report but does not provide any further response or engagement within **14 days**, escalation is also appropriate.
18+
19+
## Coordination & Disclosure
420

5-
All security vulnerabilities will be promptly addressed.
21+
We follow coordinated vulnerability disclosure:
22+
- We will acknowledge your report, assess impact, and work on a fix.
23+
- We aim to provide status updates at reasonable intervals until resolution.
24+
- We will publish a security advisory (and **CVE via the OpenJS CNA when applicable**) once a fix or mitigation is available. We credit reporters by default unless you request otherwise.

docs/Configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2472,7 +2472,7 @@ This option allows you to use custom watch plugins. Read more about watch plugin
24722472
Examples of watch plugins include:
24732473

24742474
- [`jest-watch-master`](https://github.com/rickhanlonii/jest-watch-master)
2475-
- [`jest-watch-select-projects`](https://github.com/rogeliog/jest-watch-select-projects)
2475+
- [`jest-watch-select-projects`](https://github.com/jest-community/jest-watch-select-projects)
24762476
- [`jest-watch-suspend`](https://github.com/unional/jest-watch-suspend)
24772477
- [`jest-watch-typeahead`](https://github.com/jest-community/jest-watch-typeahead)
24782478
- [`jest-watch-yarn-workspaces`](https://github.com/cameronhunter/jest-watch-directories/tree/master/packages/jest-watch-yarn-workspaces)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
import path from 'node:path';
9+
import {onNodeVersions} from '@jest/test-utils';
10+
import runJest, {type RunJestResult} from '../runJest';
11+
import {runYarnInstall} from '../Utils';
12+
13+
const getLog = (result: RunJestResult) => result.stdout.split('\n')[1].trim();
14+
15+
const dir = path.resolve(__dirname, '../custom-jsdom-version/v27');
16+
17+
beforeEach(() => {
18+
runYarnInstall(dir);
19+
});
20+
21+
onNodeVersions('>=20.4.0', () => {
22+
it('should work with custom jsdom version', () => {
23+
const result = runJest(dir, ['env.test.js']);
24+
expect(result.exitCode).toBe(0);
25+
expect(getLog(result)).toBe('WINDOW');
26+
});
27+
});
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
'use strict';
8+
9+
console.log(globalThis.window ? 'WINDOW' : 'NO WINDOW');
10+
11+
test('stub', () => expect(1).toBe(1));
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Copyright (c) Meta Platforms, Inc. and affiliates.
3+
*
4+
* This source code is licensed under the MIT license found in the
5+
* LICENSE file in the root directory of this source tree.
6+
*/
7+
8+
import JSDOM from 'jsdom';
9+
import BaseEnv from '@jest/environment-jsdom-abstract';
10+
11+
export default class JestJSDOMEnvironment extends BaseEnv {
12+
constructor(config, context) {
13+
super(config, context, JSDOM);
14+
}
15+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"devDependencies": {
3+
"jsdom": "^27.0.0"
4+
},
5+
"jest": {
6+
"testEnvironment": "./custom-jsdom-env.js"
7+
}
8+
}

0 commit comments

Comments
 (0)