Skip to content

Conversation

hainenber
Copy link
Contributor

@hainenber hainenber commented Aug 24, 2025

Summary

Resolves #15780

This PR will allow .mts config file to be passed to Jest, enabling folks to work with native type stripping in CommonJS projects. However, full .mts support is only for Node 23.6 and above due to type stripping enabled by default. On Node version ^20.19.0 || ^22.12.0, untyped jest.config.mts would still be accepted by Jest but adding type would emit error.

Test plan

Copy link

netlify bot commented Aug 24, 2025

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit e789de5
🔍 Latest deploy log https://app.netlify.com/projects/jestjs/deploys/68ae81d60c331a000888a424
😎 Deploy Preview https://deploy-preview-15796--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.

Copy link

pkg-pr-new bot commented Aug 24, 2025

Open in StackBlitz

babel-jest

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

babel-plugin-jest-hoist

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

babel-preset-jest

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

create-jest

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

@jest/diff-sequences

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

expect

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

@jest/expect-utils

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

jest

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

jest-changed-files

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

jest-circus

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

jest-cli

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

jest-config

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

@jest/console

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

@jest/core

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

@jest/create-cache-key-function

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

jest-diff

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

jest-docblock

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

jest-each

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

@jest/environment

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

jest-environment-jsdom

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

@jest/environment-jsdom-abstract

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

jest-environment-node

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

@jest/expect

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

@jest/fake-timers

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

@jest/get-type

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

@jest/globals

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

jest-haste-map

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

jest-jasmine2

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

jest-leak-detector

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

jest-matcher-utils

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

jest-message-util

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

jest-mock

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

@jest/pattern

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

jest-phabricator

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

jest-regex-util

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

@jest/reporters

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

jest-resolve

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

jest-resolve-dependencies

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

jest-runner

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

jest-runtime

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

@jest/schemas

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

jest-snapshot

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

@jest/snapshot-utils

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

@jest/source-map

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

@jest/test-result

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

@jest/test-sequencer

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

@jest/transform

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

@jest/types

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

jest-util

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

jest-validate

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

jest-watcher

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

jest-worker

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

pretty-format

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

commit: 4637296

@hainenber hainenber marked this pull request as ready for review August 26, 2025 15:27
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.

[Feature]: Support .mts files being passed to --config for CJS projects with node type stripping
2 participants