Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)Author
2021-06-22errors: don't rekey on primitive typebcoe
If an error is thrown before a module is loaded, we attempt to cache source map against error object, rather than module object. We can't do this if the error is a primitive type Fixes #38945 PR-URL: https://github.com/nodejs/node/pull/39025 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-06-22lib: remove semicolon in preparation for babel/eslint-parser updateRich Trott
eslint-babel-plugin will complain about this semicolon when we update to 7.14.15. PR-URL: https://github.com/nodejs/node/pull/39094 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-06-22src: allow to negate boolean CLI flagsMichaël Zasso
This change allows all boolean flags to be negated using the `--no-` prefix. Flags that are `true` by default (for example `--deprecation`) are still documented as negations. With this change, it becomes possible to easily flip the default value of a boolean flag and to override the value of a flag passed in the NODE_OPTIONS environment variable. `process.allowedNodeEnvironmentFlags` contains both the negated and non-negated versions of boolean flags. Co-authored-by: Anna Henningsen <anna@addaleax.net> PR-URL: https://github.com/nodejs/node/pull/39023 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2021-06-22lib: make internal/options lazyJoyee Cheung
This way, internal modules can still require the module and cache the function getOptionValue() early (therefore these code can be included in the snapshots), but the options map won't be serialized from C++ land until the option values are actually queried. PR-URL: https://github.com/nodejs/node/pull/38993 Refs: https://github.com/nodejs/node/issues/35711 Refs: https://github.com/nodejs/node/pull/38905 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-06-21debugger: rename internal library for clarityRich Trott
When I moved these files from node-inspect to Node.js core, I put them in lib/internal/inspector. That was a mistake. They should be in lib/internal/debugger. PR-URL: https://github.com/nodejs/node/pull/39080 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-06-21lib: add JSDoc typings for child_processVoltrex
Added JSDoc typings for the `child_process` lib module. PR-URL: https://github.com/nodejs/node/pull/38222 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-06-21debugger: use ERR_DEBUGGER_STARTUP_ERROR in _inspect.jsRich Trott
PR-URL: https://github.com/nodejs/node/pull/39024 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
2021-06-21errors: add ERR_DEBUGGER_STARTUP_ERRORRich Trott
PR-URL: https://github.com/nodejs/node/pull/39024 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
2021-06-21debugger: use error codes in debugger REPLRich Trott
PR-URL: https://github.com/nodejs/node/pull/39024 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
2021-06-21debugger: use ERR_DEBUGGER_ERROR in debugger clientRich Trott
PR-URL: https://github.com/nodejs/node/pull/39024 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
2021-06-21errors: add ERR_DEBUGGER_ERRORRich Trott
PR-URL: https://github.com/nodejs/node/pull/39024 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com>
2021-06-21crypto: fix aes crash when tag length too smallXadillaX
Fixes: https://github.com/nodejs/node/issues/38883 PR-URL: https://github.com/nodejs/node/pull/38914 Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-06-15stream: fix pipeline pumpRobert Nagy
Refs: https://github.com/nodejs/node/issues/39005 PR-URL: https://github.com/nodejs/node/pull/39006 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-06-15net: use missing validatorVoltrex
The `net` lib module's `lookupAndConnect()` function is missing a validator. PR-URL: https://github.com/nodejs/node/pull/38984 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Zeyu Yang <himself65@outlook.com>
2021-06-14lib: make primordials Promise methods safeAntoine du Hamel
`catch` and `finally` methods on %Promise.prototype% looks up the `then` property of the instance, making it at risk of prototype pollution. PR-URL: https://github.com/nodejs/node/pull/38650 Backport-PR-URL: https://github.com/nodejs/node/pull/38878 Refs: https://tc39.es/ecma262/#sec-promise.prototype.catch Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-06-14module: fix legacy `node` specifier resolution to resolve `"main"` fieldAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/38979 Fixes: https://github.com/nodejs/node/issues/32103 Fixes: https://github.com/nodejs/node/issues/38739 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
2021-06-13lib: refactor debuglog initAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/38838 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com>
2021-06-11debugger: remove unnecessary boilerplate copyright commentRich Trott
PR-URL: https://github.com/nodejs/node/pull/38952 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-06-11Revert "http: make HEAD method to work with keep-alive"Michaël Zasso
This reverts commit 7afa5336aed999a62e4943e6000a239585b2e2ea. The change breaks clients like cURL. Fixes: https://github.com/nodejs/node/issues/38922 PR-URL: https://github.com/nodejs/node/pull/38949 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me> Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2021-06-11debugger: reduce scope of eslint disable commentRich Trott
Current code masks setInterval and setTimeout with promisified versions. This can be confusing to read and causes lint errors. Replace masking with use of pSetInterval and pSetTimeout instead. Move disabling of lint rule from entire file to the one remaining line (after the above changes) that still needs it. PR-URL: https://github.com/nodejs/node/pull/38946 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-06-11vm: use missing validatorVoltrex
The `vm` lib module's `isContext()` function should use a validator. PR-URL: https://github.com/nodejs/node/pull/38935 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-06-11child_process: refactor to use `validateBoolean`Qingyu Deng
PR-URL: https://github.com/nodejs/node/pull/38927 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-06-11async_hooks: switch between native and context hooks correctlyStephen Belanger
:facepalm: Might help if I remember to disable the _other_ promise hook implementation when switching between them... Fixes #38814 Fixes #38815 Refs #36394 PR-URL: https://github.com/nodejs/node/pull/38912 Reviewed-By: Vladimir de Turckheim <vlad2t@hotmail.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Bryan English <bryan@bryanenglish.com>
2021-06-11tls: tweak clientCertEngine argument parsingShelley Vohr
PR-URL: https://github.com/nodejs/node/pull/38900 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-06-11child_process: allow `options.cwd` receive a URLXadillaX
PR-URL: https://github.com/nodejs/node/pull/38862 Fixes: https://github.com/nodejs/node/issues/38861 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-06-11dns: allow `--dns-result-order` to change default dns verbatimOuyang Yadong
Allow the `--dns-result-order` option to change the default value of verbatim in `dns.lookup()`. This is useful when running Node.js in ipv6-only environments to avoid possible ENETUNREACH errors. PR-URL: https://github.com/nodejs/node/pull/38099 Refs: https://github.com/nodejs/node/issues/31566 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-06-02lib: include url in bootstrap snapshot and remove unnecessary lazy-loadsJoyee Cheung
PR-URL: https://github.com/nodejs/node/pull/38826 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Khaidi Chu <i@2333.moe>
2021-06-02debugger: revise async iterator usage to comply with lint rulesRich Trott
I'm not sure that this is any clearer than the existing code, but I don't think it's significantly less clear, and it avoids comment disabling a lint rule. PR-URL: https://github.com/nodejs/node/pull/38847 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-06-02os: add os.devNullLuigi Pinca
Provides the platform-specific file path of the null device. PR-URL: https://github.com/nodejs/node/pull/38569 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-06-01lib: fix typosbl-ue
PR-URL: https://github.com/nodejs/node/pull/38846 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-06-01debugger: removed unused function argumentRich Trott
PR-URL: https://github.com/nodejs/node/pull/38850 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-31debugger: wait for V8 debugger to be enabledMichaël Zasso
Refs: https://github.com/nodejs/node/pull/38273#issuecomment-848438189 PR-URL: https://github.com/nodejs/node/pull/38811 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Beth Griggs <bgriggs@redhat.com> Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-31lib: remove unnecessary lazy loadsJoyee Cheung
Now that more modules are included in the snapshot, it's not necessary to lazy load them anymore PR-URL: https://github.com/nodejs/node/pull/38737 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-05-31lib: load internal/fs/watchers and internal/fs/read_file_context earlyJoyee Cheung
So that they are included in the builtin snapshot PR-URL: https://github.com/nodejs/node/pull/38737 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-05-31stream: add a non-destroying iterator to ReadableNitzan Uziely
add a non-destroying iterator to Readable fixes: https://github.com/nodejs/node/issues/38491 PR-URL: https://github.com/nodejs/node/pull/38526 Fixes: https://github.com/nodejs/node/issues/38491 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2021-05-31typings: add JSDoc typings for httpsVoltrex
Added JSDoc typings for the `https` lib module. PR-URL: https://github.com/nodejs/node/pull/38589 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-31child_process: retain reference to data with advanced serializationAnna Henningsen
Do the same thing we do for other streams, and retain a reference to the Buffer that was sent over IPC while the write request is active, so that it doesn’t get garbage collected while the data is still in flight. (This is a good example of why it’s a bad idea that we’re not re-using the general streams implementation for IPC and instead maintain separate usage of the low-level I/O primitives.) Fixes: https://github.com/nodejs/node/issues/34797 PR-URL: https://github.com/nodejs/node/pull/38728 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2021-05-31typings: add JSDoc typings for eventsVoltrex
Added JSDoc typings for the `events` lib module. PR-URL: https://github.com/nodejs/node/pull/38712 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Masashi Hirano <shisama07@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-31events: refactor to use primordials in lib/eventsAkhil Marsonya
Replace code that's vulnerable to Prototype Pollution with Primordials. PR-URL: https://github.com/nodejs/node/pull/38117 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-31stream: allow empty string as source of pipelineQingyu Deng
Fixes: https://github.com/nodejs/node/issues/38721 PR-URL: https://github.com/nodejs/node/pull/38723 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-05-31bootstrap: include vm and contextify binding into the snapshotJoyee Cheung
In addition, defer the patching of the vm module based on the value of --experimental-vm-modules to runtime. PR-URL: https://github.com/nodejs/node/pull/38677 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2021-05-31lib: refactor to reuse validatorsRongjian Zhang
PR-URL: https://github.com/nodejs/node/pull/38608 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Zijian Liu <lxxyxzj@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-18events: use nullish coalencing operatorVoltrex
PR-URL: https://github.com/nodejs/node/pull/38328 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-18errors: remove input from ERR_INVALID_URL messagemoander
Avoid potentially huge messages and leaked secrets. PR-URL: https://github.com/nodejs/node/pull/38614 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
2021-05-18fs: fix async iterator partial writesNitzan Uziely
fix an issue where chunks might be partially written when using writeFile with an async iterator. PR-URL: https://github.com/nodejs/node/pull/38615 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-18util: add util.types.isKeyObject and util.types.isCryptoKeyFilip Skokan
closes #38611 PR-URL: https://github.com/nodejs/node/pull/38619 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-05-18crypto: forbid NODE-ED25519 and NODE-ED448 "raw" key exportFilip Skokan
closes #38655 PR-URL: https://github.com/nodejs/node/pull/38668 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-05-17repl: fix Ctrl+C on top level awaitAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/38656 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-05-17debugger: refactor `inspect_repl` to use primordialsAntoine du Hamel
PR-URL: https://github.com/nodejs/node/pull/38551 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
2021-05-17http: refactor to remove redundant argument of _deferToConnectRongjian Zhang
PR-URL: https://github.com/nodejs/node/pull/38598 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>