Skip to content

Commit 88ff69d

Browse files
authored
Merge branch 'main' into chore/update-jest-watch-typeahead-to-support-jest-30
2 parents 8188d01 + 9365331 commit 88ff69d

File tree

16 files changed

+628
-8
lines changed

16 files changed

+628
-8
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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33
### Chore & Maintenance
44

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

714
## 30.1.3
815

@@ -21,6 +28,7 @@
2128
### Fixes
2229

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

2533
## 30.1.0
2634

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.
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)