Skip to content
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

[v18.x backport] sea: allow requiring core modules with the "node:" prefix #49648

Closed

Conversation

RaisinTen
Copy link
Contributor

Backport of #47779.

atlowChemi and others added 30 commits September 12, 2023 10:59
PR-URL: nodejs#48548
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
PR-URL: nodejs#48548
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
PR-URL: nodejs#48484
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs#48569
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Ruy Adorno <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
PR-URL: nodejs#48593
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Null the `joinDuplicateHeaders` property when the parser is freed.

Refs: nodejs#45982
PR-URL: nodejs#48608
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
Move the `joinDuplicateHeaders` option to the correct alphabetical
order.

PR-URL: nodejs#48617
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
`test.todo`, `test.only` and `test.skip` are expected to return the
same as `test`. This commit corrects the inconsistent behavior of
these shorthands.

Fixes: nodejs#48557
PR-URL: nodejs#48555
Reviewed-By: Moshe Atlow <[email protected]>
Co-authored-by: Joyee Cheung <[email protected]>
PR-URL: nodejs#48566
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Santiago Gimeno <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reorder arguments of internal helper functions such that their order is
consistent across X509 property getters. Add ReturnPropertyThroughBIO()
and ReturnProperty(). Use these new helpers to deduplicate code across
various X509 property getters.

PR-URL: nodejs#48563
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: Alba Mendez <[email protected]>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.3.6 to 2.20.1.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](github/codeql-action@83f0fe6...f6e388e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#48627
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](ossf/scorecard-action@80e868c...08b4669)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#48628
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Mestery <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](step-security/harden-runner@128a634...55d479f)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#48626
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#48631
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#48632
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Zeyu "Alex" Yang <[email protected]>
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@8e5e7e5...c85c95e)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
PR-URL: nodejs#48625
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#48551
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
This reverts commit 893c000.

Refs: nodejs#48575 (comment)
PR-URL: nodejs#48652
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Matthew Aitken <[email protected]>
PR-URL: nodejs#48596
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Signed-off-by: RafaelGSS <[email protected]>
PR-URL: nodejs#48644
Reviewed-By: Ruy Adorno <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Clarify that `transform._transform()` callback second argument is
used only if the first argument is `null`, i.e. no error occured
processing the chunk.

PR-URL: nodejs#48680
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
When add listener by once, it will be wrapped into another function.
And when pass listener and there is just one event listener added by
once, it will return 0 even if passed listener equal wrapped event
listener.

Refs: nodejs#46523
PR-URL: nodejs#48592
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
It wasn't doing anything, and actually enabling it would cause some
tests to fail.

Refs: nodejs#48576
PR-URL: nodejs#48671
Refs: v8/v8@cb00db4
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Original commit message:

    [compiler] fix CompileFunction ignoring kEagerCompile

    v8::ScriptCompiler::CompileFunction was ignoring kEagerCompile. Unlike
    the other functions in v8::ScriptCompiler, it was not actually
    propagating kEagerCompile to the parser. The newly updated test fails
    without this change.

    I did some archeology and found that this was commented out since the
    original CL in https://crrev.com/c/980944.

    As far as I know Node.js is the main consumer of this particular API.
    This CL speeds up Node.js's overall startup time by ~13%.

    Change-Id: Ifc3cd6653555194d46ca48db14f7ba7a4afe0053
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4571822
    Commit-Queue: Marja Hölttä <[email protected]>
    Reviewed-by: Marja Hölttä <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#87944}

Refs: v8/v8@cb00db4
PR-URL: nodejs#48671
Refs: nodejs#48576
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#48705
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: nodejs#48714
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
PR-URL: nodejs#48664
Refs: nodejs#48325
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
PR-URL: nodejs#48550
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
PR-URL: nodejs#48550
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
richardlau and others added 14 commits September 12, 2023 11:03
Python 3 is now required to run `gclient`. Run `tools/v8/fetch_deps.py`,
which spawns `glient`, with Python 3.

PR-URL: nodejs#48729
Fixes: nodejs#48728
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Fixes target toolchain arguments being passed to the host toolchain when
cross-compiling. For example, -m64 is not available on aarch64.

PR-URL: nodejs#48597
Reviewed-By: Richard Lau <[email protected]>
Previously we just rely on the unordered_set order to iterate over
the BaseObjects, which is not deterministic.

The iteration is only used in printing, verification, and snapshot
generation. In the first two cases the performance overhead of
sorting does not matter because they are only used for debugging.
In the last case the determinism is more important than the trivial
overhead of sorting. So this patch makes the iteration deterministic
by sorting the set first, as what is already being done when we
drain the queue.

PR-URL: nodejs#48702
Refs: nodejs/build#3043
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#48704
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
PR-URL: nodejs#48757
Fixes: nodejs#48603
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Signed-off-by: RafaelGSS <[email protected]>
PR-URL: nodejs#48677
Reviewed-By: Paolo Insogna <[email protected]>
Removes flakiness from the mentioned test due to the x86 memory limit

PR-URL: nodejs#48750
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Debadree Chatterjee <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#48726
Reviewed-By: Matthew Aitken <[email protected]>
Reviewed-By: Mohammed Keyvanzadeh <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
PR-URL: nodejs#48746
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
* The first argument `node` should be a const pointer.
* The second argument `spaces` should not be a signed integer type.
* The local variable `child` should be size_t.
* The local variable `pair` in the range declaration should be a
  reference type to avoid copying the object.

Refs: nodejs#48677
PR-URL: nodejs#48770
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#48751
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
This is the certdata.txt[0] from NSS 3.93, released on 2023-06-29.

This is the version of NSS that shipped in Firefox 116 on
2023-08-01.

Certificates added:
- Sectigo Public Server Authentication Root E46
- Sectigo Public Server Authentication Root R46
- SSL.com TLS RSA Root CA 2022
- SSL.com TLS ECC Root CA 2022
- Atos TrustedRoot Root CA ECC TLS 2021
- Atos TrustedRoot Root CA RSA TLS 2021

Certificates removed:
- Hongkong Post Root CA 1
- E-Tugra Certification Authority
- E-Tugra Global Root CA RSA v3
- E-Tugra Global Root CA ECC v3

[0] https://hg.mozilla.org/projects/nss/raw-file/NSS_3_93_RTM/lib/ckfw/builtins/certdata.txt

PR-URL: nodejs#49341
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Previously, the `require()` function exposed to the embedded SEA code
was calling the internal `require()` function if the module name
belonged to the list of public core modules but the internal `require()`
function does not support loading modules with the "node:" prefix, so
this change forwards the calls to another `require()` function that
supports this.

Fixes: nodejs/single-executable#69
Signed-off-by: Darshan Sen <[email protected]>
PR-URL: nodejs#47779
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Signed-off-by: Darshan Sen <[email protected]>
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch. labels Sep 14, 2023
@nodejs-github-bot
Copy link
Collaborator

@RaisinTen
Copy link
Contributor Author

The unrelated parallel/test-http-server-async-dispose test is already failing on the v18.x-staging branch, so that's expected to fail here too, so we probably won't be able to get a green CI on this PR.

@RaisinTen
Copy link
Contributor Author

cc @ruyadorno since you're working on the v18.18.0 proposal - #49220

@targos
Copy link
Member

targos commented Nov 10, 2023

Landed in b8634ee.

@targos targos closed this Nov 10, 2023
@RaisinTen RaisinTen deleted the backport-47779-to-v18.x branch November 10, 2023 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. v18.x Issues that can be reproduced on v18.x or PRs targeting the v18.x-staging branch.
Projects
None yet
Development

Successfully merging this pull request may close these issues.