GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — module: add --experimental-strip-private-modules by marco-ippolito · Pull Request #63869 · nodejs/node Conversation
|
|
Review requested:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
003fda2 to
88c3881
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We'd need to document private in https://nodejs.org/api/packages.html#nodejs-packagejson-field-definitions
Sorry, something went wrong.
There was an error while loading. Please reload this page.
88c3881 to
5c48075
Compare
|
Adding the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's worth it, also I don't think that we can use private to reliably guess if a package was downloaded from a registry or not, and it adds arguably a lot of complexity (in comparison for e.g. adding a loader, or not putting the code inside node_modules)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Weighing in from the TypeScript team: We're OK with this, and don't have any concerns about this eventually going unflagged either. That said, we wanted to re-emphasize @ljharb's and others' comments in the prior PR thread. Our top priority in this space remains ensuring that un-compiled .ts is never the entry point for a package in the public registry. The fundamental technical motivations behind that haven't changed, and we don't see any path forward where they could change. Keeping this restricted to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
9f68ed3 to
2cfa6d1
Compare
To be explicit for @nodejs/typescript: this is not a stepping stone to public-registry TS. @aduh95 I kindly ask you to reconsider. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
2cfa6d1 to
76740fc
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
It would also be good to have one of the test fixtures' "private": true packages include a relative import of another TypeScript file in the same package, so it's clear that finding the "private": true package.json that allows type stripping doesn't depend on that same package.json being looked up as part of module resolution. I think the implementation already works this way, but it wasn't clear from reading the tests.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Just to be clear: I don't think Node has any technical issues with TypeScript packages in And if I remember correctly, the performance problem had to do with tsc parsing all the types of those packages, and their potential publishing with different tsconfig settings. And if they're published to the public registry as plain JavaScript, they're parsed as such and so no problem. Correct so far? So wouldn't then a potential solution to the tsc performance problem be for tsc to treat TypeScript packages under |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Sorry, I don't understand that suggestion and how it would address any of the concerns we've raised every time this discussion comes up. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I don't think it's really about performance at all; it's that it would effectively prevent the TS team from ever evolving the language in a breaking way without breaking users. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
TS generally doesn't read the JS source of npm packages at all. I think you're confused about two entirely different processes. Where do types for the package come from in this proposal? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
The same place they would today when people publish JavaScript, in .d.ts files. From the last time a TypeScript team member explained the concern:
So just don't. When people complain that they shouldn't need to punish .d.ts files since they're publishing TypeScript source, just refuse to infer the types of packages without .d.ts files and explain why. The performance problem simply doesn't need to happen. In other words, tsc doesn't change at all, and the performance problem you fear just doesn't happen. People still need to publish .d.ts files as they do today, and they have the option of publishing either JavaScript or TypeScript sources alongside. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
506b4f1 to
a3de3ee
Compare
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #63869 +/- ## ======================================== Coverage 90.50% 90.50% ======================================== Files 797 797 Lines 277793 277928 +135 Branches 53366 53388 +22 ======================================== + Hits 251405 251549 +144 + Misses 16801 16762 -39 - Partials 9587 9617 +30
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
* Open vote on landing nodejs/node#63869 Assisted-by: claude:opus-5.5 * Update _EDIT_ME.yml Co-authored-by: Antoine du Hamel <[email protected]> --------- Co-authored-by: Antoine du Hamel <[email protected]>
…ivate-modules`) land?"
Signed-off-by: Marco Ippolito <[email protected]>
a3de3ee to
9ebf364
Compare
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 2052d0d |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…d? (#1900) Co-authored-by: Filip Skokan <[email protected]> Co-authored-by: Marco Ippolito <[email protected]> Co-authored-by: Joyee Cheung <[email protected]> Co-authored-by: Antoine du Hamel <[email protected]> Co-authored-by: James M Snell <[email protected]> Co-authored-by: Gireesh Punathil <[email protected]> Co-authored-by: Paolo Insogna <[email protected]> Co-authored-by: Richard Lau <[email protected]> Co-authored-by: Benjamin Gruenbaum <[email protected]> Co-authored-by: Rafael Gonzaga <[email protected]> Co-authored-by: Matteo Collina <[email protected]> Co-authored-by: Ruy Adorno <[email protected]> Co-authored-by: Chengzhong Wu <[email protected]> Co-authored-by: Tobias Nießen <[email protected]> Co-authored-by: Robert Nagy <[email protected]> Co-authored-by: Darshan Sen <[email protected]> Co-authored-by: Yagiz Nizipli <[email protected]>
Signed-off-by: Marco Ippolito <[email protected]> PR-URL: #63869 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Pietro Marchini <[email protected]>
Notable changes: child_process: * (SEMVER-MINOR) add subprocess.timedOut (Marco) #66639 doc: * add efekrskl to collaborators (Efe Karasakal) #67376 * add Philipp Dunkel to contributors (Philipp Dunkel) #67378 * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) #67377 fs: * (SEMVER-MINOR) add mkstemp() (Marco) #66484 http: * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) #67187 lib: * (SEMVER-MINOR) speed up AbortSignal (Robert Nagy) #66789 module: * (SEMVER-MINOR) add --experimental-strip-private-modules (Marco Ippolito) #63869 process: * (SEMVER-MINOR) return unregister fn from finalization (Matteo Collina) #66482 test_runner: * use AsyncLocalStorage instead of async_hooks (Matteo Collina) #66795 * (SEMVER-MINOR) add mockReturnValue and promise helpers (Guilherme Araújo) #66631 worker: * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) #66311 zlib: * (SEMVER-MINOR) add crc32c (Philipp Dunkel) #66828 PR-URL: #67664
Notable changes: child_process: * (SEMVER-MINOR) add subprocess.timedOut (Marco) #66639 doc: * add efekrskl to collaborators (Efe Karasakal) #67376 * add Philipp Dunkel to contributors (Philipp Dunkel) #67378 * add christianaurichzm to collaborators (Christian Aurich Zanettini Martins) #67377 fs: * (SEMVER-MINOR) add mkstemp() (Marco) #66484 http: * (SEMVER-MINOR) batch body spans per parser execute (Guilherme Araújo) #67187 lib: * (SEMVER-MINOR) speed up AbortSignal (Robert Nagy) #66789 module: * (SEMVER-MINOR) add --experimental-strip-private-modules (Marco Ippolito) #63869 process: * (SEMVER-MINOR) return unregister fn from finalization (Matteo Collina) #66482 test_runner: * use AsyncLocalStorage instead of async_hooks (Matteo Collina) #66795 * (SEMVER-MINOR) add mockReturnValue and promise helpers (Guilherme Araújo) #66631 worker: * (SEMVER-MINOR) preload streams into startup snapshot (Matteo Collina) #66311 zlib: * (SEMVER-MINOR) add crc32c (Philipp Dunkel) #66828 PR-URL: #67664
Signed-off-by: Marco Ippolito <[email protected]> PR-URL: nodejs#63869 Reviewed-By: Paolo Insogna <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Filip Skokan <[email protected]> Reviewed-By: Pietro Marchini <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.