Skip to content

Conversation

@SimenB
Copy link
Member

@SimenB SimenB commented Oct 10, 2025

Summary

Being on an old version is suboptimal, let's see if we can upgrade 🙂

Test plan

CI

@netlify
Copy link

netlify bot commented Oct 10, 2025

Deploy Preview for jestjs ready!

Name Link
🔨 Latest commit 48eed60
🔍 Latest deploy log https://app.netlify.com/projects/jestjs/deploys/68e95f1f03cfd90008214c87
😎 Deploy Preview https://deploy-preview-15861--jestjs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Oct 10, 2025

Open in StackBlitz

babel-jest

npm i https://pkg.pr.new/babel-jest@15861

babel-plugin-jest-hoist

npm i https://pkg.pr.new/babel-plugin-jest-hoist@15861

babel-preset-jest

npm i https://pkg.pr.new/babel-preset-jest@15861

create-jest

npm i https://pkg.pr.new/create-jest@15861

@jest/diff-sequences

npm i https://pkg.pr.new/@jest/diff-sequences@15861

expect

npm i https://pkg.pr.new/expect@15861

@jest/expect-utils

npm i https://pkg.pr.new/@jest/expect-utils@15861

jest

npm i https://pkg.pr.new/jest@15861

jest-changed-files

npm i https://pkg.pr.new/jest-changed-files@15861

jest-circus

npm i https://pkg.pr.new/jest-circus@15861

jest-cli

npm i https://pkg.pr.new/jest-cli@15861

jest-config

npm i https://pkg.pr.new/jest-config@15861

@jest/console

npm i https://pkg.pr.new/@jest/console@15861

@jest/core

npm i https://pkg.pr.new/@jest/core@15861

@jest/create-cache-key-function

npm i https://pkg.pr.new/@jest/create-cache-key-function@15861

jest-diff

npm i https://pkg.pr.new/jest-diff@15861

jest-docblock

npm i https://pkg.pr.new/jest-docblock@15861

jest-each

npm i https://pkg.pr.new/jest-each@15861

@jest/environment

npm i https://pkg.pr.new/@jest/environment@15861

jest-environment-jsdom

npm i https://pkg.pr.new/jest-environment-jsdom@15861

@jest/environment-jsdom-abstract

npm i https://pkg.pr.new/@jest/environment-jsdom-abstract@15861

jest-environment-node

npm i https://pkg.pr.new/jest-environment-node@15861

@jest/expect

npm i https://pkg.pr.new/@jest/expect@15861

@jest/fake-timers

npm i https://pkg.pr.new/@jest/fake-timers@15861

@jest/get-type

npm i https://pkg.pr.new/@jest/get-type@15861

@jest/globals

npm i https://pkg.pr.new/@jest/globals@15861

jest-haste-map

npm i https://pkg.pr.new/jest-haste-map@15861

jest-jasmine2

npm i https://pkg.pr.new/jest-jasmine2@15861

jest-leak-detector

npm i https://pkg.pr.new/jest-leak-detector@15861

jest-matcher-utils

npm i https://pkg.pr.new/jest-matcher-utils@15861

jest-message-util

npm i https://pkg.pr.new/jest-message-util@15861

jest-mock

npm i https://pkg.pr.new/jest-mock@15861

@jest/pattern

npm i https://pkg.pr.new/@jest/pattern@15861

jest-phabricator

npm i https://pkg.pr.new/jest-phabricator@15861

jest-regex-util

npm i https://pkg.pr.new/jest-regex-util@15861

@jest/reporters

npm i https://pkg.pr.new/@jest/reporters@15861

jest-resolve

npm i https://pkg.pr.new/jest-resolve@15861

jest-resolve-dependencies

npm i https://pkg.pr.new/jest-resolve-dependencies@15861

jest-runner

npm i https://pkg.pr.new/jest-runner@15861

jest-runtime

npm i https://pkg.pr.new/jest-runtime@15861

@jest/schemas

npm i https://pkg.pr.new/@jest/schemas@15861

jest-snapshot

npm i https://pkg.pr.new/jest-snapshot@15861

@jest/snapshot-utils

npm i https://pkg.pr.new/@jest/snapshot-utils@15861

@jest/source-map

npm i https://pkg.pr.new/@jest/source-map@15861

@jest/test-result

npm i https://pkg.pr.new/@jest/test-result@15861

@jest/test-sequencer

npm i https://pkg.pr.new/@jest/test-sequencer@15861

@jest/transform

npm i https://pkg.pr.new/@jest/transform@15861

@jest/types

npm i https://pkg.pr.new/@jest/types@15861

jest-util

npm i https://pkg.pr.new/jest-util@15861

jest-validate

npm i https://pkg.pr.new/jest-validate@15861

jest-watcher

npm i https://pkg.pr.new/jest-watcher@15861

jest-worker

npm i https://pkg.pr.new/jest-worker@15861

pretty-format

npm i https://pkg.pr.new/pretty-format@15861

commit: 48eed60

@SimenB SimenB marked this pull request as ready for review October 10, 2025 19:41
@SimenB SimenB requested a review from Copilot October 10, 2025 19:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades TypeScript and @types/node dependencies to address compatibility issues with newer Node.js APIs. The upgrade resolves type errors related to experimental VM modules that are now officially supported.

  • Removes TypeScript version restriction and updates @types/node to 18.x
  • Fixes type assertions and removes experimental type suppressions for VM modules
  • Updates function signatures to use proper TypeScript types instead of type suppressions

Reviewed Changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
package.json Updates @types/node version constraint and removes TypeScript version pinning
eslint.config.mjs Adds defineConfig import and updates configuration function call
packages/jest-resolve/src/shouldLoadAsEsm.ts Removes ts-expect-error comment for SyntheticModule import
packages/jest-runtime/src/index.ts Major type system improvements, removes experimental type suppressions
packages/jest-test-sequencer/src/tests/test_sequencer.test.ts Adds async keywords to map callback functions
packages/jest-worker/src/workers/tests/NodeThreadsWorker.test.ts Adds type cast for Stream interface
packages/jest-worker/src/workers/tests/ChildProcessWorker.test.ts Adds type cast for Stream interface

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@SimenB
Copy link
Member Author

SimenB commented Oct 10, 2025

There are some casts added, but previously it was all implicitly any. So no type safety is lost at least 🙂

Will need to revisit all of this stuff for require(esm) anyways

@SimenB SimenB merged commit 3e87145 into jestjs:main Oct 10, 2025
71 of 74 checks passed
@SimenB SimenB deleted the update-TS-and-types-node branch October 10, 2025 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant