module: add --experimental-strip-private-modules #63869
Conversation
|
Review requested:
|
003fda2 to
88c3881
Compare
aduh95
left a comment
There was a problem hiding this comment.
We'd need to document private in https://nodejs.org/api/packages.html#nodejs-packagejson-field-definitions
88c3881 to
5c48075
Compare
|
Adding the |
aduh95
left a comment
There was a problem hiding this comment.
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)
|
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 |
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. |
Signed-off-by: Marco Ippolito <marcoippolito54@gmail.com>
2cfa6d1 to
76740fc
Compare
Followup of #63853
Adds a flag to allow type stripping inside
node_modulesONLY if private.I think I covered #63853 (comment) concerns about smuggling private package.json's in a non private package