Commit Graph
34954 Commits
Author SHA1 Message Date
Robert Nagy 640bfb8d70 stream: fix non readable Duplex readableAborted
PR-URL: https://github.com/nodejs/node/pull/40801
Fixes: https://github.com/nodejs/node/issues/40800
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-11-15 14:45:46 +02:00
Rich Trott f85b6b512b meta: edit GOVERNANCE.md for minor updates
PR-URL: https://github.com/nodejs/node/pull/40798
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-14 22:30:49 -08:00
Michael Dawson b323c63190 doc: tweak guidance for modules in core
Generalize guidance so that it is not specific
to modules.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/40601
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-14 16:22:53 -08:00
Robert Nagy afe460ec9e stream: allow calling callback before promise
Refs: https://github.com/nodejs/node/issues/39535

PR-URL: https://github.com/nodejs/node/pull/40772
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-14 15:52:22 +02:00
Keeley Hammond cf56abe6bb doc: claim ABI version for Electron 18
PR-URL: https://github.com/nodejs/node/pull/40768
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-13 17:10:45 +00:00
Stephen Belanger 689405c1c0 async_hooks: eliminate require side effects
PR-URL: https://github.com/nodejs/node/pull/40782
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2021-11-13 06:37:06 -08:00
Robert Nagy f2170253b6 stream: add errored and closed props
PR-URL: https://github.com/nodejs/node/pull/40696
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-13 11:19:32 +02:00
Darshan Sen 3e5a5e8e1a src,crypto: remove AllocatedBuffers from crypto_spkac
Signed-off-by: Darshan Sen <darshan.sen@postman.com>

PR-URL: https://github.com/nodejs/node/pull/40752
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2021-11-13 08:14:49 +00:00
Antoine du Hamel 9cd30894f6 tools: only validate first commit message of a PR
PR-URL: https://github.com/nodejs/node/pull/40740
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-12 23:35:22 +01:00
Yoshiki 69f487efc7 lib: fix typos in lib code comments
PR-URL: https://github.com/nodejs/node/pull/40792
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Qingyu Deng <i@ayase-lab.com>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-12 23:26:20 +01:00
d10085bcb1 async_hooks: expose async_wrap providers
docs: add asyncWrapProviders api doc

tests(async_hooks): use internalBinding for comparisson

fix(test-async-wrap): lint error

docs: use REPLACEME for asyncWrapProviders

update: use freeze and copy for asyncWrapProviders

update(async_hooks): use primordials on asyncWrapProviders

fix: use common to expect error

docs(asyncWrapProviders): rephrase return type

fix: lint md

fix: lint md

docs(async_hooks): typo

Co-authored-by: Stephen Belanger <admin@stephenbelanger.com>

update(asyncWrapProviders): add __proto__ as null

Co-authored-by: Simone Busoli <simone.busoli@gmail.com>
Co-authored-by: Michaël Zasso <targos@protonmail.com>

test: adjust __proto__ assertion

docs: add DEP0111 link

PR-URL: https://github.com/nodejs/node/pull/40760
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2021-11-12 21:48:34 +00:00
Darshan Sen 8ee9e1a1aa src,crypto: refactor crypto_tls.*
By the design of `GetSSLError()`, the V8 API was unnecessarily being
accessed in places where it eventually didn't get used. So this refactor
inlines the function appropriately in places where it was being used.
Also, this replaces uses of `AllocatedBuffers` with `BackingStore`s.

Signed-off-by: Darshan Sen <darshan.sen@postman.com>

PR-URL: https://github.com/nodejs/node/pull/40675
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-11-12 21:47:53 +00:00
Darshan Sen 2d368da19f src: prevent extra copies of TimerWrap::TimerCb
I noticed that we were taking `TimerCb` as a `const&` and then copying
that into the member. This is completely fine when the constructor is
called with an lvalue. However, when called with an rvalue, we can allow
the `std::function` to be moved into the member instead of falling back
to a copy, so I changed the constructors to take in universal
references. Also, `std::function` constructors can take in multiple
arguments, so I further modified the constructors to use variadic
templates.

Signed-off-by: Darshan Sen <darshan.sen@postman.com>

PR-URL: https://github.com/nodejs/node/pull/40665
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-11-12 21:47:42 +00:00
Omar El-Mihilmy 2037ee85a2 fs: nullish coalescing to respect zero positional reads
When the file read position is moved passing zero is
not respected and `null` is used instead. PR fixes the
issues by using nullish coalescing which will return
the rhs only when the lhs is `null` or `undefined`;
respecting the zero.

Fixes: https://github.com/nodejs/node/issues/40715

PR-URL: https://github.com/nodejs/node/pull/40716
Fixes: https://github.com/nodejs/node/issues/40699
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Evan Lucas <evanlucas@me.com>
2021-11-12 10:36:26 -08:00
Michael Dawson 055a38b4c7 http: add missing initialization
Add missing initialization reported by coverity scan.

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/40555
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-11-12 12:03:30 -05:00
Evan Lucas 2d005bb961 doc: fix transform stream example
There was a missing callback in the Transform#flush example
implementation.

PR-URL: https://github.com/nodejs/node/pull/40777
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-11-11 16:34:27 -08:00
Martin Jansa a9b2d85a48 crypto: fix build without scrypt
* add missing semicolon to fix:
  In file included from ../src/node_crypto.h:47,
                   from ../src/node.cc:46:
  ../src/crypto/crypto_scrypt.h:80:2:
  error: expected ';' after struct definition
     80 | }
        |  ^
        |  ;

  and fix typo in the comment

Signed-off-by: Martin Jansa <martin.jansa@lge.com>

PR-URL: https://github.com/nodejs/node/pull/40613
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-11-11 18:59:12 +01:00
npm team 6e1629786f deps: upgrade npm to 8.1.3
PR-URL: https://github.com/nodejs/node/pull/40726
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-11-10 16:48:41 -08:00
Rich Trott fc4a792728 test: fix flaky test-policy-integrity
Split the test into seven tests so that it doesn't time out.

Fixes: https://github.com/nodejs/node/issues/40694
Fixes: https://github.com/nodejs/node/issues/38088

PR-URL: https://github.com/nodejs/node/pull/40763
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
2021-11-10 13:33:08 -08:00
voltrexmaster 4d414274c8 doc: fix linter-enforced formatting in crypto.md
The markdown-linter (lint-md) is failing because of a missing newline
caused by 79d681501d.

PR-URL: https://github.com/nodejs/node/pull/40780
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-11-10 11:02:08 -08:00
3nprob 79d681501d src: add x509.fingerprint512 to crypto module
PR-URL: https://github.com/nodejs/node/pull/39809
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-10 15:26:28 +01:00
Tobias Nießen 5e0dd79a3c src: add and fix some preprocessor comments
PR-URL: https://github.com/nodejs/node/pull/40701
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2021-11-10 15:24:22 +01:00
Subhi Al Hasan d8f1823d5f http: change totalSocketCount only on socket creation/close
PR-URL: https://github.com/nodejs/node/pull/40572
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
2021-11-09 18:14:52 -08:00
Michaël Zasso b022d19272 2021-11-09, Version 17.1.0 (Current)
Notable changes:

doc:
  * add VoltrexMaster to collaborators (voltrexmaster) https://github.com/nodejs/node/pull/40566
esm:
  * (SEMVER-MINOR) add support for JSON import assertion (Antoine du Hamel) https://github.com/nodejs/node/pull/40250
lib:
  * (SEMVER-MINOR) add unsubscribe method to non-active DC channels (simon-id) https://github.com/nodejs/node/pull/40433
  * (SEMVER-MINOR) add return value for DC channel.unsubscribe (simon-id) https://github.com/nodejs/node/pull/40433
v8:
  * (SEMVER-MINOR) multi-tenant promise hook api (Stephen Belanger) https://github.com/nodejs/node/pull/39283

PR-URL: https://github.com/nodejs/node/pull/40758
2021-11-09 20:06:12 +01:00
Steven 43a267f673 doc: fix corepack grammar for --force flag
PR-URL: https://github.com/nodejs/node/pull/40762
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-09 18:12:48 +01:00
Michaël Zasso 6c86af9faa doc: update maintaining ICU guide
Do not ask to separate the changes in deps/icu-small and in the
LICENSE file.
Do not ask to remove the whitespace changes. The way commits are
landed now doesn't eliminate them anymore.

PR-URL: https://github.com/nodejs/node/pull/40658
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-11-09 17:26:59 +01:00
Michaël Zasso de6399c0c0 deps: update ICU to 70.1
Refs: https://github.com/unicode-org/icu/releases/tag/release-70-1

PR-URL: https://github.com/nodejs/node/pull/40658
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-11-09 17:26:53 +01:00
Tobias Nießen dd601619d3 doc: clarify getAuthTag with authTagLength
Refs: https://github.com/nodejs/node/issues/40272
Refs: https://github.com/nodejs/node/pull/20235

PR-URL: https://github.com/nodejs/node/pull/40713
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-09 16:45:46 +01:00
Michael Dawson 1d35950ee0 doc: fix order of announce work
- Since we now just reference the nodejs blog post in the
  post to the nodejs-sec mailing list, change the order
  so the blog post comes first

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/40725
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-11-09 16:44:57 +01:00
Node.js GitHub Bot f36d3f66d3 meta: update AUTHORS
PR-URL: https://github.com/nodejs/node/pull/40748
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-11-09 16:34:33 +01:00
Michael DawsonandJean Burellier 8d6a02583f doc: add initial list of technical priorities
Co-authored-by: Jean Burellier <sheplu@users.noreply.github.com>

Signed-off-by: Michael Dawson <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/40235
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-11-08 16:42:37 -05:00
Rich Trott 9ef0ae21fc tools: update babel-eslint-parser to 7.16.0
PR-URL: https://github.com/nodejs/node/pull/40720
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-08 13:16:24 -08:00
Rich Trott 492d767b6d test: add semicolons for linter update
Add missing semicolons that will be flagged when we update
@babel/eslint-parser to 7.16.0.

PR-URL: https://github.com/nodejs/node/pull/40720
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-08 13:16:21 -08:00
Rich Trott 04451d869c tools: improve update scripts
The --production flag has no effect in this situation. Remove it.

Add --ignore-scripts as a precaution.

PR-URL: https://github.com/nodejs/node/pull/40644
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-11-08 11:47:53 -08:00
Rich Trott e8d16eee26 build: add GitHub Action to update tools modules
Update ESLint, Babel, remark, and so on. Run once a week.

PR-URL: https://github.com/nodejs/node/pull/40644
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-11-08 11:47:51 -08:00
Michaël Zasso df2fe87c69 deps: patch V8 to 9.5.172.25
Refs: https://github.com/v8/v8/compare/9.5.172.21...9.5.172.25

PR-URL: https://github.com/nodejs/node/pull/40604
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-11-08 15:17:57 +01:00
Michaël Zasso 8e42eaec53 meta: use form schema for flaky test template
PR-URL: https://github.com/nodejs/node/pull/40737
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-11-08 13:01:53 +01:00
Antoine du Hamel a420da6173 test: disable warnings to fix flaky test
Fixes: https://github.com/nodejs/node/issues/40738

PR-URL: https://github.com/nodejs/node/pull/40739
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2021-11-08 12:55:44 +01:00
Michaël Zasso d0a41c99c0 test: skip macos sandbox test with builtin modules path
Refs: https://github.com/nodejs/node/issues/40605

PR-URL: https://github.com/nodejs/node/pull/40607
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-11-08 08:43:06 +01:00
Michaël Zasso 8c28aaa42f src: make LoadEnvironment with string work with builtin modules path
Fixes: https://github.com/nodejs/node/issues/40605

PR-URL: https://github.com/nodejs/node/pull/40607
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
2021-11-08 08:42:57 +01:00
Michaël Zasso 873119385f tools: simplify and fix commit queue
Use `gh` CLI for CI and commit queue jobs, and use the correct token
to merge PRs.

PR-URL: https://github.com/nodejs/node/pull/40742
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-11-07 15:26:45 +01:00
Antoine du Hamel 96e00e03cf tools: ensure the PR was not pushed before merging
When using Squash and Merge feature, it would allow to a malicious
actor to push unreviewed code to their PR while the CQ is running and
bypass the usual checks.
This commit adds a check to refuse to land if the head of the PR
branch is different from the one validated by ncu.

PR-URL: https://github.com/nodejs/node/pull/40747
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
2021-11-07 12:08:22 +01:00
Voltrex 549a4c9163 process: refactor execution
• Removed unreachable code of the `evalModule()` function as an early
error is thrown when the `print` parameter is a truthy value.
• Make use of the nullish coalescing operator.

PR-URL: https://github.com/nodejs/node/pull/40664
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2021-11-06 15:59:33 +01:00
Luigi Pinca 1977afd1e5 tools: update ESLint to 8.2.0
PR-URL: https://github.com/nodejs/node/pull/40734
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-11-06 06:39:37 -07:00
Antoine du Hamel 80b8440656 tools: use GitHub Squash and Merge feature when using CQ
PR-URL: https://github.com/nodejs/node/pull/40666
Refs: https://docs.github.com/en/rest/reference/pulls#merge-a-pull-request
Reviewed-By: Mary Marchini <oss@mmarchini.me>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2021-11-06 08:14:25 +00:00
Luigi Pinca 19839f8d98 test: add semicolon after chunk size
The ABNF for chunk extensions as per RFC 7230 is

    chunk-ext      = *( ";" chunk-ext-name [ "=" chunk-ext-val ] )

    chunk-ext-name = token
    chunk-ext-val  = token / quoted-string

Add a semicolon after the chunk size for clarity.

This does not invalidate the test as it verifies that the HTTP parser
does not ignore chunk extensions.

PR-URL: https://github.com/nodejs/node/pull/40487
Refs: https://grenfeldt.dev/2021/10/08/gunicorn-20.1.0-public-disclosure-of-request-smuggling
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-06 07:36:30 +01:00
Luigi Pinca 0a62026f32 test: deflake http2-cancel-while-client-reading
Add missing `'error'` event handler.

Fixes: https://github.com/nodejs/node/issues/40610

PR-URL: https://github.com/nodejs/node/pull/40659
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-11-04 19:32:15 +00:00
Antoine du Hamel 8fce09e2a5 tools: fix bug in prefer-primordials ESLint rule
Refs: https://github.com/nodejs/node/pull/40622

PR-URL: https://github.com/nodejs/node/pull/40628
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-11-04 18:04:27 +01:00
Antoine du HamelandGeoffrey Booth 2cc7a91a5d esm: add support for JSON import assertion
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>
2021-11-03 20:06:55 -07:00
Guy Bedford 2e2a6fecd9 doc: update cjs-module-lexer repo link
PR-URL: https://github.com/nodejs/node/pull/40707
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Derek Lewis <DerekNonGeneric@inf.is>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Voltrex <mohammadkeyvanzade94@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-11-02 21:01:50 -07:00