summaryrefslogtreecommitdiff
path: root/lib/internal/errors.js
Commit message (Collapse)AuthorAgeFilesLines
* http: prevent writing to the body when not allowed by HTTP specGerrard Lindsay2023-05-131-0/+2
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/47732 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
* http: remove internal error in assignSocketMatteo Collina2023-05-021-0/+2
| | | | | | | | | | | Change ServerResponse.assignSocket to not throw an internal error, but an error with its own code. Signed-off-by: Matteo Collina <hello@matteocollina.com> PR-URL: https://github.com/nodejs/node/pull/47723 Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* tools: fix jsdoc lintMoshe Atlow2023-05-021-5/+0
| | | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/47789 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
* net: enable autoSelectFamily by defaultPaolo Insogna2023-04-051-0/+2
| | | | | | | | | | | Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/46790 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
* lib: add trailing commas to more internal filesAntoine du Hamel2023-02-261-8/+8
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/46811 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
* test_runner: better handle async bootstrap errorsColin Ihrig2023-02-241-2/+2
| | | | | | | | | | | | | | | | | | The test runner is bootstrapped synchronously, with the exception of importing custom reporters. To better handle asynchronously throw errors, this commit introduces an internal error type that can be checked for from the test runner's uncaughtException handler. After https://github.com/nodejs/node/pull/46707 and this change land, the other throw statement in the uncaughtException handler can be removed. This will allow the test runner to handle errors thrown from outside of tests (which currently prevents the test runner from reporting results). PR-URL: https://github.com/nodejs/node/pull/46720 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* lib: enforce use of trailing commas for functionsAntoine du Hamel2023-02-141-6/+6
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/46629 Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
* assert: remove `assert.snapshot`Moshe Atlow2023-01-071-2/+0
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/46112 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* net: handle socket.write(cb) edge caseSantiago Gimeno2023-01-011-0/+3
| | | | | | | | | | | | | | Make sure that when calling `write()` on a connecting socket, the callback is called if the socket is destroyed before the connection is established. Fixes: https://github.com/nodejs/node/issues/30841 PR-URL: https://github.com/nodejs/node/pull/45922 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
* errors: refactor to use a method that formats a list stringDaeyeon Jeong2022-12-231-37/+20
| | | | | | Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: https://github.com/nodejs/node/pull/45793 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* bootstrap: lazy load non-essential modulesJoyee Cheung2022-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | It turns out that even with startup snapshots, there is a non-trivial overhead for loading internal modules. This patch makes the loading of the non-essential modules lazy again. Caveat: we have to make some of the globals lazily-loaded too, so the WPT runner is updated to test what the state of the global scope is after the globals are accessed (and replaced with the loaded value). PR-URL: https://github.com/nodejs/node/pull/45659 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Daeyeon Jeong <daeyeon.dev@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Tierney Cyren <hello@bnb.im>
* net: add autoSelectFamily and autoSelectFamilyAttemptTimeout optionsPaolo Insogna2022-12-031-0/+8
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/44731 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
* test_runner: add initial TAP parserWassim Chegham2022-11-211-0/+15
| | | | | | | | | Work in progress PR-URL: https://github.com/nodejs/node/pull/43525 Refs: https://github.com/nodejs/node/issues/43344 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
* util: use private symbols in JS land directlyJoyee Cheung2022-11-171-8/+6
| | | | | | | | | | | Instead of calling into C++ to use the private symbols, use an ObjectTemplate to create an object that holds the symbols and use them directly from JS land. PR-URL: https://github.com/nodejs/node/pull/45379 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* dns: fix port validationAntoine du Hamel2022-10-251-1/+1
| | | | | | | | | | | | | Previously the error message generation would throw if the port was of type `"symbol"`. PR-URL: https://github.com/nodejs/node/pull/45135 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
* util: add MIME utilities (#21128)Bradley Farias2022-10-191-0/+4
| | | | | | | | | | | | Co-authored-by: Rich Trott <rtrott@gmail.com> Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> PR-URL: https://github.com/nodejs/node/pull/21128 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* http: throw error on content-length mismatchsidwebworks2022-09-181-0/+2
| | | | | | PR-URL: https://github.com/nodejs/node/pull/44378 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com>
* bootstrap: fixup Error.stackTraceLimit for user-land snapshotJoyee Cheung2022-08-181-0/+6
| | | | | | | | | | | | It's difficult for V8 to handle Error.stackTraceLimit in the snapshot, so delete it from the Error constructor if it's present before snapshot serialization, and re-install it after deserialization. In addition try not to touch it from our internals during snapshot building in the first place by updating isErrorStackTraceLimitWritable(). PR-URL: https://github.com/nodejs/node/pull/44203 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* typings: add JSDoc for `internal/validators`Yagiz Nizipli2022-08-171-2/+3
| | | | | PR-URL: https://github.com/nodejs/node/pull/44181 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com>
* errors: refactor to use optional chainingSindreXie2022-08-131-1/+1
| | | | | | | | | PR-URL: https://github.com/nodejs/node/pull/44184 Reviewed-By: Feng Yu <F3n67u@outlook.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Erick Wendel <erick.workspace@gmail.com> Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com>
* assert: add assert.SnapshotMoshe Atlow2022-08-111-0/+2
| | | | PR-URL: https://github.com/nodejs/node/pull/44095 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* errors: extract type detection & use in `ERR_INVALID_RETURN_VALUE`Jacob Smith2022-07-011-25/+30
| | | | | | PR-URL: https://github.com/nodejs/node/pull/43558 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* lib: refactor to avoid unsafe regex primordialsAntoine du Hamel2022-06-271-5/+5
| | | | | PR-URL: https://github.com/nodejs/node/pull/43475 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
* v8: add v8.startupSnapshot utilsJoyee Cheung2022-06-171-0/+4
| | | | | | | | | | | | | | | | | This adds several APIs under the `v8.startupSnapshot` namespace for specifying hooks into the startup snapshot serialization and deserialization. - isBuildingSnapshot() - addSerializeCallback() - addDeserializeCallback() - setDeserializeMainFunction() PR-URL: https://github.com/nodejs/node/pull/43329 Fixes: https://github.com/nodejs/node/issues/42617 Refs: https://github.com/nodejs/node/issues/35711 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* esm: fix chain advances when loader calls next<HookName> multiple timesJacob Smith2022-06-051-1/+1
| | | | | PR-URL: https://github.com/nodejs/node/pull/43303 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* lib: use null-prototype objects for property descriptorsAntoine du Hamel2022-06-031-1/+12
| | | | | | | | | Refs: https://github.com/nodejs/node/pull/42921 PR-URL: https://github.com/nodejs/node/pull/43270 Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
* util: add parseArgs moduleBenjamin E. Coe2022-05-241-0/+9
| | | | | | | | | | | | Adds util.parseArgs helper for higher level command-line argument parsing. PR-URL: https://github.com/nodejs/node/pull/42675 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Ruy Adorno <ruyadorno@github.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Joe Sepi <sepi@joesepi.com> Reviewed-By: Ian Sutherland <ian@iansutherland.ca>
* esm: add chaining to loadersJacob Smith2022-05-041-0/+7
| | | | | PR-URL: https://github.com/nodejs/node/pull/42623 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* errors,console: refactor to use ES2021 syntax小菜2022-04-281-19/+10
| | | | | PR-URL: https://github.com/nodejs/node/pull/42872 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
* errors,vm: update error and use causeGus Caplan2022-04-241-2/+4
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/42820 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com>
* lib,src: implement WebAssembly Web APITobias Nießen2022-04-231-0/+1
| | | | | | | | Refs: https://github.com/nodejs/node/pull/41749 Fixes: https://github.com/nodejs/node/issues/21130 PR-URL: https://github.com/nodejs/node/pull/42701 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* doc: consolidate use of multiple-byte unitsAntoine du Hamel2022-04-201-1/+1
| | | | | | | | | | Refs: https://en.wikipedia.org/wiki/Byte#Multiple-byte_units PR-URL: https://github.com/nodejs/node/pull/42587 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Paolo Insogna <paolo@cowtech.it> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Mestery <mestery@protonmail.com>
* test_runner: add initial CLI runnerColin Ihrig2022-04-151-3/+17
| | | | | | | This commit introduces an initial version of a CLI-based test runner. PR-URL: https://github.com/nodejs/node/pull/42658 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* readline: fix question still called after closedXuguang Mei2022-04-081-0/+1
| | | | | | | | resolve: https://github.com/nodejs/node/issues/42450 PR-URL: https://github.com/nodejs/node/pull/42464 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
* test: add initial test modulecjihrig2022-03-211-0/+12
| | | | | | | | | | | | | This commit adds a new 'test' module that exposes an API for creating JavaScript tests. As the tests execute, TAP output is written to standard output. This commit only supports executing individual test files, and does not implement command line functionality for a full test runner. PR-URL: https://github.com/nodejs/node/pull/42325 Refs: https://github.com/nodejs/node/issues/40954 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* esm: make extension-less errors in type:module actionableBradley Farias2022-03-151-3/+7
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/42301 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jacob Smith <jacob@frende.me> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
* esm: support https remotely and http locally under flagBradley Farias2022-02-091-3/+8
| | | | | | | | | | Co-authored-by: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com> Co-authored-by: James M Snell <jasnell@gmail.com> Co-authored-by: Jordan Harband <ljharb@gmail.com> Co-authored-by: James Sumners <james@sumners.email> PR-URL: https://github.com/nodejs/node/pull/36328 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
* lib: add internal genericNodeError() functionRich Trott2022-02-091-14/+31
| | | | | | | | | There are a few places in lib where `new Error()` is called and then additional properties are attached in various ways. This creates a utility function to generate the errors. PR-URL: https://github.com/nodejs/node/pull/41879 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
* lib: replace validator and errorMohammed Keyvanzadeh2022-02-051-2/+0
| | | | | | | | | | Refs: https://github.com/nodejs/node/pull/41660 PR-URL: https://github.com/nodejs/node/pull/41678 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* crypto,tls: implement safe x509 GeneralName formatTobias Nießen2022-01-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This change introduces JSON-compatible escaping rules for strings that include X.509 GeneralName components (see RFC 5280). This non-standard format avoids ambiguities and prevents injection attacks that could previously lead to X.509 certificates being accepted even though they were not valid for the target hostname. These changes affect the format of subject alternative names and the format of authority information access. The checkServerIdentity function has been modified to safely handle the new format, eliminating the possibility of injecting subject alternative names into the verification logic. Because each subject alternative name is only encoded as a JSON string literal if necessary for security purposes, this change will only be visible in rare cases. This addresses CVE-2021-44532. CVE-ID: CVE-2021-44532 PR-URL: https://github.com/nodejs-private/node-private/pull/300 Reviewed-By: Michael Dawson <midawson@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* errors: add support for cause in aborterrorJames M Snell2021-12-021-2/+5
| | | | | | | | | Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/41008 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
* lib,test,tools: use consistent JSDoc typesRich Trott2021-11-291-1/+1
| | | | | | | | | | | | This could be in preparation of implementing the jsdoc/check-types ESLint rule. PR-URL: https://github.com/nodejs/node/pull/40989 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* esm: add support for JSON import assertionAntoine du Hamel2021-11-031-0/+6
| | | | | | | | | | | | | | | | | Remove V8 flag for import assertions, enabling support for the syntax; require the import assertion syntax for imports of JSON. Support import assertions in user loaders. Use both resolved module URL and import assertion type as the key for caching modules. Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com> PR-URL: https://github.com/nodejs/node/pull/40250 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
* module: fix ERR_REQUIRE_ESM for parentPath nullGuy Bedford2021-09-281-2/+2
| | | | | | | PR-URL: https://github.com/nodejs/node/pull/40145 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* worker: remove file extension checkQingyu Deng2021-08-261-3/+0
| | | | | | | | | | Fixes: https://github.com/nodejs/node/issues/39124 PR-URL: https://github.com/nodejs/node/pull/39788 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
* policy: canonicalize before resolving specifiersBradley Farias2021-08-191-0/+3
| | | | | | | | PR-URL: https://github.com/nodejs/node/pull/37863 Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com> Co-authored-by: James M Snell <jasnell@gmail.com> Reviewed-By: Guy Bedford <guybedford@gmail.com>
* fs: add recursive cp methodbcoe2021-08-111-0/+11
| | | | | | | | | | | | | Introduces recursive cp method, based on fs-extra implementation. PR-URL: https://github.com/nodejs/node/pull/39372 Fixes: https://github.com/nodejs/node/issues/35880 Refs: https://github.com/nodejs/tooling/issues/98 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ian Sutherland <ian@iansutherland.ca>
* module: fix ERR_REQUIRE_ESM error for null framesGuy Bedford2021-07-311-1/+1
| | | | | | PR-URL: https://github.com/nodejs/node/pull/39593 Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
* crypto: fix `generateKeyPair` with encoding 'jwk'himself652021-07-261-2/+0
| | | | | | | | Fixes: https://github.com/nodejs/node/issues/39205 PR-URL: https://github.com/nodejs/node/pull/39319 Reviewed-By: Filip Skokan <panva.ip@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* perf_hooks: web performance timeline compliancelegendecas2021-07-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All API introduced in this PR are compliant with web [performance-timeline](https://w3c.github.io/performance-timeline) spec. "performance-timeline" is listed as supported web spec in the doc https://nodejs.org/docs/latest/api/perf_hooks.html#perf_hooks_performance_measurement_apis. Changes summary: 1. Add new supported wpt test subsets: user-timing and performance-timeline. 2. Add support for `Performance.getEntries`, `Performance.getEntriesByName` and `Performance.getEntriesByType` to synchronously fetch buffered performance entries. This means the user should invoke `Performance.clearMarks` and `Performance.clearMeasures` to clear buffered entries to prevent from those entries been kept alive forever. 3. Add support (again after https://github.com/nodejs/node/pull/37136) for `buffered` flags for `PerformanceObserver`. 3. Fixes `PerformanceMark` and `PerformanceMeasure` wpt compliance issues. 4. Only user-created performance entries will be buffered globally. This behavior should be compliant with https://w3c.github.io/timing-entrytypes-registry/#registry. With the new ability to fetch user-created performance entries synchronously, the issues raised in https://github.com/nodejs/diagnostics/issues/464#issuecomment-861920116 could also be fixed. PR-URL: https://github.com/nodejs/node/pull/39297 Reviewed-By: James M Snell <jasnell@gmail.com>