Skip to content

Commit

Permalink
Merge branch 'main' into maxRelatedTestsDepth
Browse files Browse the repository at this point in the history
  • Loading branch information
lewibs authored Feb 26, 2025
2 parents c81e69a + f4246f3 commit 0eae97d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
- `[@jest/expect-utils]` Fix not addressing to Sets and Maps as objects without keys ([#14873](https://github.com/jestjs/jest/pull/14873))
- `[jest-leak-detector]` Make leak-detector more aggressive when running GC ([#14526](https://github.com/jestjs/jest/pull/14526))
- `[jest-runtime]` Properly handle re-exported native modules in ESM via CJS ([#14589](https://github.com/jestjs/jest/pull/14589))
- `[jest-runtime]` Refactor `_importCoreModel` so required core module is consistent if modified while loading ([#15077](https://github.com/jestjs/jest/issues/15077))
- `[jest-schemas, jest-types]` [**BREAKING**] Fix type of `testFailureExitCode` config option([#15232](https://github.com/jestjs/jest/pull/15232))
- `[jest-util]` Make sure `isInteractive` works in a browser ([#14552](https://github.com/jestjs/jest/pull/14552))
- `[pretty-format]` [**BREAKING**] Print `ArrayBuffer` and `DataView` correctly ([#14290](https://github.com/jestjs/jest/pull/14290))
Expand Down
6 changes: 4 additions & 2 deletions packages/jest-runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1782,13 +1782,15 @@ export default class Runtime {

private _importCoreModule(moduleName: string, context: VMContext) {
const required = this._requireCoreModule(moduleName, true);
const allExports = Object.entries(required);
const exportNames = allExports.map(([key]) => key);

const module = new SyntheticModule(
['default', ...Object.keys(required)],
['default', ...exportNames],
function () {
// @ts-expect-error: TS doesn't know what `this` is
this.setExport('default', required);
for (const [key, value] of Object.entries(required)) {
for (const [key, value] of allExports) {
// @ts-expect-error: TS doesn't know what `this` is
this.setExport(key, value);
}
Expand Down
2 changes: 1 addition & 1 deletion website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
"react-dom": "18.2.0",
"react-github-btn": "^1.3.0",
"react-lite-youtube-embed": "^2.2.2",
"react-markdown": "^9.0.0"
"react-markdown": "^10.0.0"
},
"devDependencies": {
"@babel/core": "^7.11.6",
Expand Down
11 changes: 6 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -14155,7 +14155,7 @@ __metadata:
react-dom: 18.2.0
react-github-btn: ^1.3.0
react-lite-youtube-embed: ^2.2.2
react-markdown: ^9.0.0
react-markdown: ^10.0.0
typescript: ^5.0.4
languageName: unknown
linkType: soft
Expand Down Expand Up @@ -19003,11 +19003,12 @@ __metadata:
languageName: node
linkType: hard

"react-markdown@npm:^9.0.0":
version: 9.0.3
resolution: "react-markdown@npm:9.0.3"
"react-markdown@npm:^10.0.0":
version: 10.0.0
resolution: "react-markdown@npm:10.0.0"
dependencies:
"@types/hast": ^3.0.0
"@types/mdast": ^4.0.0
devlop: ^1.0.0
hast-util-to-jsx-runtime: ^2.0.0
html-url-attributes: ^3.0.0
Expand All @@ -19020,7 +19021,7 @@ __metadata:
peerDependencies:
"@types/react": ">=18"
react: ">=18"
checksum: 7ebb01b295f7c9acddcd305308a8531c58c582c24fb8d6a4897f16b21ba0bd7e9e20ddae4a9024767e910310d22db0003489b61478cdb491a3d802343cf3a931
checksum: 9f5805f54492858186b7a0d7bbc26bcf69bf5dabecce9db1a06914be446d15fd77efc9a17b86e525e782abea62645c5426c43b18dd56049d8e352fa1f0d46477
languageName: node
linkType: hard

Expand Down

0 comments on commit 0eae97d

Please sign in to comment.