Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34.2k
fs: add fs/promises alias module#31553
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
Uh oh!
There was an error while loading. Please reload this page.
Conversation
1db0897 to aff5f29Compare
mcollina left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Uh oh!
There was an error while loading. Please reload this page.
ljharb commented Jan 28, 2020
The concern applies because fs had no “children” before, and things like resolve identify core modules by the full name, not just the first segment. I expect CIGTM to fail with this change. |
aff5f29 to 8890701Comparedevsnek commented Jan 28, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
@ljharb it seems resolve already has an entry for it, and the The namespacing concern is from adding new things that occupy space in global registries such as npm, not about breaking modules that have a list of all the things you can successfully require in node. |
ljharb commented Jan 28, 2020
It does, due to 10.0.0, that is true, and yes, i can easily add the next version - but it will be marked as a non-core module until users update to the latest version of resolve. |
nodejs-github-bot commented Jan 28, 2020
MylesBorins left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
simple and elegant!
MylesBorins commented Jan 29, 2020
I'd like to see @jasnell sign-off on this as I believe he was one of the folks who identified earlier security concerns. To be clear I'm extremely happy to see this land! |
MylesBorins commented Jan 29, 2020
Should this be semver-minor? |
nodejs-github-bot commented Jan 29, 2020
nodejs-github-bot commented Jan 29, 2020
devsnek commented Jan 30, 2020
ping @jasnell |
nodejs-github-bot commented Jan 30, 2020
Trott left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM but I'm inclined to run CITGM in case of unforeseen consequences?
Trott commented Jan 31, 2020 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
Should there be a test that does something like this?: assert.strictEqual(require('fs/promises'),require('fs').promises)Otherwise, I don't think we're testing CommonJS |
Refs: #31553 Refs: #32953 PR-URL: #34001 Refs: #34002 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Zeyu Yang <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]>
Refs: nodejs#31553 Refs: nodejs#32953 Refs: nodejs#33950 Refs: nodejs#34001 Refs: nodejs#34002
Refs: nodejs#31553 Refs: nodejs#32953 Refs: nodejs#33950 Refs: nodejs#34001 Refs: nodejs#34002 Refs: nodejs#34055
Refs: #31553 Refs: #32953 Refs: #33950 Refs: #34001 Refs: #34002 Refs: #34055 PR-URL: #34962 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
Refs: #31553 Refs: #32953 Refs: #33950 Refs: #34001 Refs: #34002 PR-URL: #34055 Refs: #34962 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Fixes: nodejs#35740 Refs: nodejs#31553 Refs: nodejs#32953 Refs: nodejs#33991 Refs: nodejs#34001 Refs: nodejs#34055 Refs: nodejs#34962 Co-authored-by: Antoine du Hamel <[email protected]> Co-authored-by: Trivikram Kamat <[email protected]> Co-authored-by: Rich Trott <[email protected]>
Fixes: #35740 Refs: #31553 Refs: #32953 Refs: #33991 Refs: #34001 Refs: #34055 Refs: #34962 Co-authored-by: Antoine du Hamel <[email protected]> Co-authored-by: Trivikram Kamat <[email protected]> Co-authored-by: Rich Trott <[email protected]> PR-URL: #34002 Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Masashi Hirano <[email protected]> Reviewed-By: Pranshu Srivastava <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Fixes: #35740 Refs: #31553 Refs: #32953 Refs: #33991 Refs: #34001 Refs: #34055 Refs: #34962 Co-authored-by: Antoine du Hamel <[email protected]> Co-authored-by: Trivikram Kamat <[email protected]> Co-authored-by: Rich Trott <[email protected]> PR-URL: #34002 Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Masashi Hirano <[email protected]> Reviewed-By: Pranshu Srivastava <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Refs: #31553 Refs: #32953 Refs: #33950 Refs: #34001 Refs: #34002 Refs: #34055 PR-URL: #34962 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Gerhard Stöbich <[email protected]>
Refs: #31553 Refs: #32953 Refs: #33950 Refs: #34001 Refs: #34002 PR-URL: #34055 Refs: #34962 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Joyee Cheung <[email protected]>
Fixes: #35740 Refs: #31553 Refs: #32953 Refs: #33991 Refs: #34001 Refs: #34055 Refs: #34962 Co-authored-by: Antoine du Hamel <[email protected]> Co-authored-by: Trivikram Kamat <[email protected]> Co-authored-by: Rich Trott <[email protected]> PR-URL: #34002 Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Masashi Hirano <[email protected]> Reviewed-By: Pranshu Srivastava <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
Fixes: #35740 Refs: #31553 Refs: #32953 Refs: #33991 Refs: #34001 Refs: #34055 Refs: #34962 Co-authored-by: Antoine du Hamel <[email protected]> Co-authored-by: Trivikram Kamat <[email protected]> Co-authored-by: Rich Trott <[email protected]> PR-URL: #34002 Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Masashi Hirano <[email protected]> Reviewed-By: Pranshu Srivastava <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]>
This restores
fs/promisesin node core. It can't be overridden by a file on disk in a version of node that has it. It will fail to load on a version of node that doesn't have it because thefsmodule on npm is locked. It is not a new core module, it is a child of the fs module, so the concern about namespacing shouldn't apply.Fixes#21014
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes