Skip to content

module: unflag --experimental-strip-types #56350

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

marco-ippolito
Copy link
Member

@marco-ippolito marco-ippolito commented Dec 24, 2024

It's time to enable it by default to catch some more bugs, currently there are no open issues.
I think it's a semver minor change.

Fixes: nodejs/typescript#17

@nodejs/tsc for visibility

Notable change section:

This change enables the flag --experimental-strip-types by default.
Node.js will be able to execute TypeScript files without additional configuration. Note that there are some limitations in the supported syntax documented at https://nodejs.org/api/typescript.html#type-stripping
This feature is experimental and is subject to change.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders
  • @nodejs/performance
  • @nodejs/test_runner
  • @nodejs/typescript

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Dec 24, 2024
@marco-ippolito marco-ippolito added strip-types Issues or PRs related to strip-types support blocked PRs that are blocked by other issues or PRs. wip Issues and PRs that are still a work in progress. labels Dec 24, 2024
@marco-ippolito marco-ippolito marked this pull request as ready for review December 24, 2024 18:17
@marco-ippolito marco-ippolito removed wip Issues and PRs that are still a work in progress. blocked PRs that are blocked by other issues or PRs. labels Dec 24, 2024
Copy link

codecov bot commented Dec 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.54%. Comparing base (da3f388) to head (d847c32).
Report is 1102 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #56350      +/-   ##
==========================================
- Coverage   88.54%   88.54%   -0.01%     
==========================================
  Files         657      657              
  Lines      190655   190658       +3     
  Branches    36582    36584       +2     
==========================================
- Hits       168824   168820       -4     
- Misses      15008    15011       +3     
- Partials     6823     6827       +4     
Files with missing lines Coverage Δ
src/node_options.cc 87.92% <ø> (ø)
src/node_options.h 98.30% <100.00%> (ø)

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@marco-ippolito marco-ippolito added semver-minor PRs that contain new features and should be released in the next minor version. dont-land-on-v18.x dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. labels Dec 25, 2024
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

LGTM

@marco-ippolito marco-ippolito added request-ci Add this label to start a Jenkins CI on a PR. notable-change PRs with changes that should be highlighted in changelogs. baking-for-lts PRs that need to wait before landing in a LTS release. labels Dec 25, 2024
Copy link
Contributor

The notable-change PRs with changes that should be highlighted in changelogs. label has been added by @marco-ippolito.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

@marco-ippolito marco-ippolito added the module Issues and PRs related to the module subsystem. label Dec 25, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 25, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link
Contributor

@bmuenzenmeyer bmuenzenmeyer left a comment

Choose a reason for hiding this comment

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

excited for this, having watched it's development and played with it quite a bit.
some suggestions and questions, none blocking

@anonrig
Copy link
Member

anonrig commented Dec 26, 2024

What about process.features.typescript? Does that also needs changing?

@marco-ippolito
Copy link
Member Author

What about process.features.typescript? Does that also needs changing?

It works fine, tests are updated (now the default value is 'strip')

@marco-ippolito marco-ippolito added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Dec 26, 2024
@ffMathy
Copy link

ffMathy commented Jan 9, 2025

It's kind of crazy that this was made as a minor release. Other than the linked issues, our Vitest tests in VS Code are not working anymore if we use this version.

@JakobJingleheimer
Copy link
Member

It's kind of crazy that this was made as a minor release. Other than the linked issues, our Vitest tests in VS Code are not working anymore if we use this version.

This was around flagged for quite some time and no issues were reported. I believe we were not aware of a scenario were it could break without users changing something. Please open an issue, and please ensure there is more detail than "our Vitest tests in VS Code are not working" 🙂

@pmarchini
Copy link
Member

Hey @ffMathy you can still disable the feature passing --no-experimental-strip-types (https://nodejs.org/api/cli.html#--no-experimental-strip-types)

@ffMathy
Copy link

ffMathy commented Jan 9, 2025

But since I am relying on an external tool (Vitest), I am not sure how I tell it to disable this feature. It probably even doesn't support that flag.

@marco-ippolito
Copy link
Member Author

marco-ippolito commented Jan 9, 2025

You can do (maybe):

NODE_OPTIONS=--no-experimental-strip-types vitest

You might want to open an issue on vitest.

Ceres6 pushed a commit to Ceres6/node that referenced this pull request Jan 13, 2025
Notable changes:

lib:
  * (SEMVER-MINOR) add typescript support to STDIN eval (Marco Ippolito) nodejs#56359
module:
  * (SEMVER-MINOR) unflag --experimental-strip-types (Marco Ippolito) nodejs#56350
process:
  * (SEMVER-MINOR) add process.ref() and process.unref() methods (James M Snell) nodejs#56400
worker:
  * (SEMVER-MINOR) add eval ts input (Marco Ippolito) nodejs#56394

PR-URL: nodejs#56450
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request Mar 3, 2025
PR-URL: nodejs#56350
Fixes: nodejs/typescript#17
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
@marco-ippolito marco-ippolito added the backport-open-v22.x Indicate that the PR has an open backport label Mar 3, 2025
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request Mar 3, 2025
PR-URL: nodejs#56350
Fixes: nodejs/typescript#17
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
colinaaa added a commit to lynx-family/lynx-stack that referenced this pull request Apr 5, 2025
<!--
  Thank you for submitting a pull request!

We appreciate the time and effort you have invested in making these
changes. Please ensure that you provide enough information to allow
others to review your pull request.

Upon submission, your pull request will be automatically assigned with
reviewers.

If you want to learn more about contributing to this project, please
visit:
https://github.com/lynx-family/lynx-stack/blob/main/CONTRIBUTING.md.
-->

## Summary

<!-- Can you explain the reasoning behind implementing this change? What
problem or issue does this pull request resolve? -->

Node.js v23.6 has unflagged the `--experimental-strip-types` feature
(nodejs/node#56350). Instead of relying solely
on this flag, it’s recommended to also check the standard
`process.feature.typescript` to confirm native TypeScript support.

> [!NOTE]
> It will be backport to v22 soon. See:
nodejs/node#57298

<!-- It would be helpful if you could provide any relevant context, such
as GitHub issues or related discussions. -->

## Checklist

<!--- Check and mark with an "x" -->

- [x] Tests updated (or not required).
- [x] Documentation updated (or not required).
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request May 1, 2025
PR-URL: nodejs#56350
Fixes: nodejs/typescript#17
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
@aduh95 aduh95 added backported-to-v22.x PRs backported to the v22.x-staging branch. and removed backport-open-v22.x Indicate that the PR has an open backport labels May 6, 2025
@aduh95 aduh95 added backport-open-v22.x Indicate that the PR has an open backport and removed backported-to-v22.x PRs backported to the v22.x-staging branch. labels May 19, 2025
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request May 19, 2025
PR-URL: nodejs#56350
Fixes: nodejs/typescript#17
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request May 19, 2025
PR-URL: nodejs#56350
Fixes: nodejs/typescript#17
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request May 28, 2025
PR-URL: nodejs#56350
Fixes: nodejs/typescript#17
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request Jun 9, 2025
PR-URL: nodejs#56350
Fixes: nodejs/typescript#17
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
nodejs-github-bot pushed a commit that referenced this pull request Jun 18, 2025
PR-URL: #58732
Refs: #56350
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
RafaelGSS pushed a commit that referenced this pull request Jun 23, 2025
PR-URL: #58732
Refs: #56350
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
marco-ippolito added a commit to marco-ippolito/node that referenced this pull request Jun 25, 2025
PR-URL: nodejs#56350
Fixes: nodejs/typescript#17
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Pietro Marchini <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. backport-open-v22.x Indicate that the PR has an open backport baking-for-lts PRs that need to wait before landing in a LTS release. dont-land-on-v20.x PRs that should not land on the v20.x-staging branch and should not be released in v20.x. lib / src Issues and PRs related to general changes in the lib or src directory. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs. semver-minor PRs that contain new features and should be released in the next minor version. strip-types Issues or PRs related to strip-types support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unflag --experimental-strip-types