Skip to content

Commit fbeb5cb

Browse files
committed
doc: highlight difference in module loading between ESM and CommonJS
1 parent f6ea5bf commit fbeb5cb

File tree

231 files changed

+5021
-8294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

231 files changed

+5021
-8294
lines changed

.github/workflows/build-tarball.yml

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,16 @@ jobs:
5252
- name: Make tarball
5353
run: |
5454
export DISTTYPE=nightly
55-
export DATESTRING=$(date "+%Y-%m-%d")
55+
export DATESTRING=`date "+%Y-%m-%d"`
5656
export COMMIT=$(git rev-parse --short=10 "$GITHUB_SHA")
57-
./configure && make tar -j4 SKIP_XZ=1
57+
./configure && make tar -j8 SKIP_XZ=1
58+
mkdir tarballs
59+
mv *.tar.gz tarballs
5860
- name: Upload tarball artifact
5961
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
6062
with:
6163
name: tarballs
62-
path: '*.tar.gz'
64+
path: tarballs
6365
compression-level: 0
6466
test-tarball-linux:
6567
needs: build-tarball
@@ -95,9 +97,21 @@ jobs:
9597
path: tarballs
9698
- name: Extract tarball
9799
run: |
98-
tar xzf tarballs/*.tar.gz -C "$RUNNER_TEMP"
99-
echo "TAR_DIR=$RUNNER_TEMP/$(basename tarballs/*.tar.gz .tar.gz)" >> "$GITHUB_ENV"
100+
tar xzf tarballs/*.tar.gz -C $RUNNER_TEMP
101+
echo "TAR_DIR=$RUNNER_TEMP/`basename tarballs/*.tar.gz .tar.gz`" >> $GITHUB_ENV
100102
- name: Build
101-
run: make -C "$TAR_DIR" build-ci -j4 V=1
103+
run: |
104+
make -C "$TAR_DIR" build-ci -j4 V=1
105+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
106+
with:
107+
persist-credentials: false
108+
sparse-checkout: |
109+
tools/eslint
110+
tools/eslint-rules
111+
- name: Move directories needed for testing
112+
run: |
113+
mv tools/eslint "$TAR_DIR/tools"
114+
mv tools/eslint-rules "$TAR_DIR/tools"
102115
- name: Test
103-
run: make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9"
116+
run: |
117+
make -C "$TAR_DIR" run-ci -j4 V=1 TEST_CI_ARGS="-p dots --measure-flakiness 9"

.github/workflows/test-internet.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ permissions:
4343

4444
jobs:
4545
test-internet:
46-
if: github.event_name == 'schedule' && github.repository == 'nodejs/node' || github.event.pull_request.draft == false
46+
if: github.repository == 'nodejs/node' || github.event_name != 'schedule'
4747
runs-on: ubuntu-24.04
4848
steps:
4949
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,7 @@ release.
3939
</tr>
4040
<tr>
4141
<td valign="top">
42-
<b><a href="doc/changelogs/CHANGELOG_V24.md#24.8.0">24.8.0</a></b><br/>
43-
<a href="doc/changelogs/CHANGELOG_V24.md#24.7.0">24.7.0</a><br/>
42+
<b><a href="doc/changelogs/CHANGELOG_V24.md#24.7.0">24.7.0</a></b><br/>
4443
<a href="doc/changelogs/CHANGELOG_V24.md#24.6.0">24.6.0</a><br/>
4544
<a href="doc/changelogs/CHANGELOG_V24.md#24.5.0">24.5.0</a><br/>
4645
<a href="doc/changelogs/CHANGELOG_V24.md#24.4.1">24.4.1</a><br/>

Makefile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1213,8 +1213,6 @@ $(TARBALL): release-only doc-only
12131213
$(RM) -r $(TARNAME)/.editorconfig
12141214
$(RM) -r $(TARNAME)/.git*
12151215
$(RM) -r $(TARNAME)/.mailmap
1216-
$(RM) -r $(TARNAME)/deps/corepack
1217-
$(RM) $(TARNAME)/test/parallel/test-corepack-version.js
12181216
$(RM) -r $(TARNAME)/deps/openssl/openssl/demos
12191217
$(RM) -r $(TARNAME)/deps/openssl/openssl/doc
12201218
$(RM) -r $(TARNAME)/deps/openssl/openssl/test
@@ -1229,7 +1227,6 @@ $(TARBALL): release-only doc-only
12291227
$(RM) -r $(TARNAME)/tools/cpplint.py
12301228
$(RM) -r $(TARNAME)/tools/eslint
12311229
$(RM) -r $(TARNAME)/tools/eslint-rules
1232-
$(RM) -r $(TARNAME)/test/parallel/test-eslint-*
12331230
$(RM) -r $(TARNAME)/tools/license-builder.sh
12341231
$(RM) -r $(TARNAME)/tools/eslint/node_modules
12351232
$(RM) -r $(TARNAME)/tools/osx-*

SECURITY.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ you informed of the progress being made towards a fix and full announcement,
1515
and may ask for additional information or guidance surrounding the reported
1616
issue.
1717

18-
If you do not receive an acknowledgement of your report within 6 business
19-
days, or if you cannot find a private security contact for the project, you
20-
may escalate to the OpenJS Foundation CNA at `security@lists.openjsf.org`.
21-
22-
If the project acknowledges your report but does not provide any further
23-
response or engagement within 14 days, escalation is also appropriate.
24-
2518
### Node.js bug bounty program
2619

2720
The Node.js project engages in an official bug bounty program for security

benchmark/cluster/echo.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ if (cluster.isPrimary) {
88
payload: ['string', 'object'],
99
sendsPerBroadcast: [1, 10],
1010
serialization: ['json', 'advanced'],
11-
n: [1e3],
11+
n: [1e5],
1212
});
1313

1414
function main({

benchmark/dgram/multi-buffer.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ const common = require('../common.js');
55
const dgram = require('dgram');
66
const PORT = common.PORT;
77

8-
// `n` is the number of send requests to queue up each time.
8+
// `num` is the number of send requests to queue up each time.
99
// Keep it reasonably high (>10) otherwise you're benchmarking the speed of
1010
// event loop cycles more than anything else.
1111
const bench = common.createBenchmark(main, {
12-
len: [64, 512, 1024],
13-
n: [100],
14-
chunks: [1, 8],
12+
len: [64, 256, 1024],
13+
num: [100],
14+
chunks: [1, 2, 4, 8],
1515
type: ['send', 'recv'],
1616
dur: [5],
1717
});
1818

19-
function main({ dur, len, n, type, chunks }) {
19+
function main({ dur, len, num, type, chunks }) {
2020
const chunk = [];
2121
for (let i = 0; i < chunks; i++) {
2222
chunk.push(Buffer.allocUnsafe(Math.round(len / chunks)));
@@ -26,11 +26,11 @@ function main({ dur, len, n, type, chunks }) {
2626
const socket = dgram.createSocket('udp4');
2727

2828
function onsend() {
29-
if (sent++ % n === 0) {
29+
if (sent++ % num === 0) {
3030
// The setImmediate() is necessary to have event loop progress on OSes
3131
// that only perform synchronous I/O on nonblocking UDP sockets.
3232
setImmediate(() => {
33-
for (let i = 0; i < n; i++) {
33+
for (let i = 0; i < num; i++) {
3434
socket.send(chunk, PORT, '127.0.0.1', onsend);
3535
}
3636
});

benchmark/zlib/crc32.js

Lines changed: 0 additions & 47 deletions
This file was deleted.

deps/ncrypto/ncrypto.cc

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
#include <openssl/rand.h>
99
#include <openssl/x509v3.h>
1010
#include <algorithm>
11-
#include <array>
1211
#include <cstring>
13-
#include <string_view>
1412
#if OPENSSL_VERSION_MAJOR >= 3
1513
#include <openssl/core_names.h>
1614
#include <openssl/params.h>
@@ -1096,29 +1094,6 @@ BIOPointer X509View::getValidTo() const {
10961094
return bio;
10971095
}
10981096

1099-
std::optional<std::string_view> X509View::getSignatureAlgorithm() const {
1100-
if (cert_ == nullptr) return std::nullopt;
1101-
int nid = X509_get_signature_nid(cert_);
1102-
if (nid == NID_undef) return std::nullopt;
1103-
const char* ln = OBJ_nid2ln(nid);
1104-
if (ln == nullptr) return std::nullopt;
1105-
return std::string_view(ln);
1106-
}
1107-
1108-
std::optional<std::string> X509View::getSignatureAlgorithmOID() const {
1109-
if (cert_ == nullptr) return std::nullopt;
1110-
const X509_ALGOR* alg = nullptr;
1111-
X509_get0_signature(nullptr, &alg, cert_);
1112-
if (alg == nullptr) return std::nullopt;
1113-
const ASN1_OBJECT* obj = nullptr;
1114-
X509_ALGOR_get0(&obj, nullptr, nullptr, alg);
1115-
if (obj == nullptr) return std::nullopt;
1116-
std::array<char, 128> buf{};
1117-
int len = OBJ_obj2txt(buf.data(), buf.size(), obj, 1);
1118-
if (len < 0 || static_cast<size_t>(len) >= buf.size()) return std::nullopt;
1119-
return std::string(buf.data(), static_cast<size_t>(len));
1120-
}
1121-
11221097
int64_t X509View::getValidToTime() const {
11231098
#ifdef OPENSSL_IS_BORINGSSL
11241099
// Boringssl does not implement ASN1_TIME_to_tm in a public way,

deps/ncrypto/ncrypto.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1191,8 +1191,6 @@ class X509View final {
11911191
BIOPointer getInfoAccess() const;
11921192
BIOPointer getValidFrom() const;
11931193
BIOPointer getValidTo() const;
1194-
std::optional<std::string_view> getSignatureAlgorithm() const;
1195-
std::optional<std::string> getSignatureAlgorithmOID() const;
11961194
int64_t getValidFromTime() const;
11971195
int64_t getValidToTime() const;
11981196
DataPointer getSerialNumber() const;

0 commit comments

Comments
 (0)