Skip to content

fix(jest): Use greatest known jsc.target instead of least#99

Merged
kdy1 merged 2 commits intoswc-project:mainfrom
everett1992:main
May 30, 2025
Merged

fix(jest): Use greatest known jsc.target instead of least#99
kdy1 merged 2 commits intoswc-project:mainfrom
everett1992:main

Conversation

@everett1992
Copy link
Contributor

I noticed that code coverage was different between node 20 and 22 when using @swc/jest and tracked it back to swc falling back to es2018 for unknown node versions.

This change makes @swc/jest use the target of any lower node version

Fixes #98

@changeset-bot
Copy link

changeset-bot bot commented May 5, 2025

🦋 Changeset detected

Latest commit: 3ee09e3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@swc/jest Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@CLAassistant
Copy link

CLAassistant commented May 5, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Member

Choose a reason for hiding this comment

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

Can you revert this change? Is it necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before this change checks were failing because CI could not install with the frozen lockfile. I'll rebase and revert in case that fixes it.

@kdy1
Copy link
Member

kdy1 commented May 30, 2025

Can you rebase?

@kdy1 kdy1 self-assigned this May 30, 2025
I noticed that code coverage was different between node 20 and 22 when
using @swc/jest and tracked it back to swc falling back to es2018 for
unknown node versions.

This change makes @swc/jest use the target of any lower node version

Fixes swc-project#98
@kdy1 kdy1 changed the title fix: @swc/jest greatest known jsc.target instead of least fix(jest): Use greatest known jsc.target instead of least May 30, 2025
@kdy1 kdy1 merged commit 601df42 into swc-project:main May 30, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Code coverage for safe navigation (?.) is different between node 20 and 22 when using @swc/jest

3 participants