lib: end-of-life the deprecated require('sys')#26292
lib: end-of-life the deprecated require('sys')#26292sam-github wants to merge 1 commit intonodejs:masterfrom
Conversation
|
@sam-github sadly an error occured when I tried to trigger a build :( |
| Type: Runtime | ||
| Type: End-of-Life | ||
|
|
||
| The `sys` module is deprecated. Please use the [`util`][] module instead. |
There was a problem hiding this comment.
Maybe:
| The `sys` module is deprecated. Please use the [`util`][] module instead. | |
| The `sys` module was removed. Please use the [`util`][] module instead. |
There was a problem hiding this comment.
(Not sure where the leading space emerges from)
| 'no-proto': 'error', | ||
| 'no-redeclare': 'error', | ||
| 'no-restricted-modules': ['error', 'sys'], | ||
| 'no-restricted-modules': ['error'], |
There was a problem hiding this comment.
| 'no-restricted-modules': ['error'], | |
| 'no-restricted-modules': 'error', |
There was a problem hiding this comment.
This line should be deleted entirely. If you don't specify a second argument, the rule does nothing.
| <!-- YAML | ||
| changes: | ||
| - version: REPLACEME | ||
| pr-url: XXX |
There was a problem hiding this comment.
| pr-url: XXX | |
| pr-url: https://github.com/nodejs/node/pull/26292 |
|
i know there are still modules that use this 😐 |
|
I'm surprised |
|
To be clear: I think there is a cost of keeping |
@Fishrock123 I'm surprised at the notion that the cost of confusion to users is significant in this instance. I have literally never heard of anyone being confused about |
|
Might not be a bad idea for someone to do something like https://github.com/evanlucas/find-sys all over again (maybe using gzemnid?). |
bnoordhuis
left a comment
There was a problem hiding this comment.
We decided years ago to never give up the 'sys' namespace for security reasons but this PR appears to be doing just that. require('sys') (or any other built-in module) should never load third-party code.
jasnell
left a comment
There was a problem hiding this comment.
I agree with @bnoordhuis ... we cannot remove the module name completely.
We could however, upgrade from a deprecation warning to an actual thrown Error.
|
I agree that we should not give up the name |
|
I didn't think this would be so controversial! My reading of #2405 was that it was likely to be deleted for 6.x, so 12.x seemed like a pretty safe overshoot. Anybody using The presence of If there is agreement to delete it, I'll fix up the PR, but I'm not going to lose more time on it if there isn't. I'll wait for more comment, or maybe it needs a TSC agenda label?
|
No strong opinion. Please, do as you would consider being better. |
Oversight, I'm afraid. We should probably claim it while we still can. :-) |
We can't. npm doesn't allow package names that start with an underscore. |
|
I think I'll just leave this alone. |
See: #2405
It looks like this was going to be considered for Node.js 6.x, so now that 12.x is upcoming, maybe we are ready?
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes