Skip to content
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

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

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 12 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

@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 PRs that should not land on the v18.x-staging branch and should not be released in 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

doc/api/cli.md Outdated Show resolved Hide resolved
doc/api/cli.md Show resolved Hide resolved
test/es-module/test-typescript.mjs Outdated Show resolved Hide resolved
doc/api/cli.md Show resolved Hide resolved
doc/api/cli.md Outdated Show resolved Hide resolved
doc/api/typescript.md Show resolved Hide resolved
@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
@marco-ippolito marco-ippolito added the request-ci Add this label to start a Jenkins CI on a PR. label Dec 26, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 26, 2024
@nodejs-github-bot
Copy link
Collaborator

Copy link
Contributor

@ShogunPanda ShogunPanda left a comment

Choose a reason for hiding this comment

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

Let's go!

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@pmarchini pmarchini left a comment

Choose a reason for hiding this comment

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

except for the doc nit: LGTM, great job @marco-ippolito 🚀

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.

still lgtm

I would recommend caution and not backport it to v22 for now (maybe after 24 is out?).

@marco-ippolito
Copy link
Member Author

marco-ippolito commented Dec 26, 2024

still lgtm

I would recommend caution and not backport it to v22 for now (maybe after 24 is out?).

Yep there is the baking for lts label. I think we can test it for a while on v23 and decide later

Let's give some more time to review

FULL SEND 🚀

@marco-ippolito marco-ippolito added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Dec 26, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Dec 26, 2024
@nodejs-github-bot nodejs-github-bot merged commit ba59928 into nodejs:main Dec 26, 2024
69 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in ba59928

@alshdavid
Copy link

Does this support ts in node_modules or, more importantly, between packages in an npm workspace?

@ljharb
Copy link
Member

ljharb commented Dec 28, 2024

@alshdavid i believe neither, by design.

@alshdavid
Copy link

@alshdavid i believe neither, by design.

Ah I see. Are there plans to support workspaces?

I'm investigating this for use at Atlassian where we heavily rely on private/unpublished workspace packages. We use typescript exclusively and it would greatly simplify our run scripts and custom tooling

@jakebailey
Copy link

Workspaces/monorepos should work fine if your package manager uses symlinks (which they all do?), since the "is node_modules" check is based on the final resolved path.

aduh95 pushed a commit that referenced this pull request Jan 2, 2025
PR-URL: #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 added a commit that referenced this pull request Jan 3, 2025
Notable changes:

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

PR-URL: #56450
marco-ippolito pushed a commit that referenced this pull request Jan 3, 2025
Notable changes:

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

PR-URL: #56450
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. baking-for-lts PRs that need to wait before landing in a LTS release. dont-land-on-v18.x PRs that should not land on the v18.x-staging branch and should not be released in 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. 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