Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: d902f5227c13045eed10003acde9b9c17dc1ba17
Choose a base ref
..
head repository: nodejs/node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0ddd75bcd816a8e5f4e27411b8e913abb92c2ed5
Choose a head ref
Showing 3,918 changed files with 204,814 additions and 114,648 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
24 changes: 17 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -53,12 +53,6 @@ module.exports = {
overrides: [
{
files: [
'doc/api/esm.md',
'doc/api/fs.md',
'doc/api/module.md',
'doc/api/modules.md',
'doc/api/packages.md',
'doc/api/wasi.md',
'test/es-module/test-esm-type-flag.js',
'test/es-module/test-esm-type-flag-alias.js',
'*.mjs',
@@ -68,9 +62,24 @@ module.exports = {
},
{
files: ['**/*.md'],
parserOptions: { ecmaFeatures: { impliedStrict: true } },
processor: 'markdown/markdown',
},
{
files: ['**/*.md/*.cjs', '**/*.md/*.js'],
parserOptions: {
sourceType: 'script',
ecmaFeatures: { impliedStrict: true }
},
rules: { strict: 'off' },
},
{
files: [
'**/*.md/*.mjs',
'doc/api/esm.md/*.js',
'doc/api/packages.md/*.js',
],
parserOptions: { sourceType: 'module' },
},
],
rules: {
// ESLint built-in rules
@@ -306,6 +315,7 @@ module.exports = {
},
globals: {
AbortController: 'readable',
AbortSignal: 'readable',
Atomics: 'readable',
BigInt: 'readable',
BigInt64Array: 'readable',
7 changes: 7 additions & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -50,10 +50,17 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
- name: Environment Information
run: npx envinfo
- name: Get release version numbers
if: ${{ github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch }}
id: get-released-versions
run: ./tools/node-lint-md-cli-rollup/src/list-released-versions-from-changelogs.mjs
- name: Lint docs
run: |
echo "::add-matcher::.github/workflows/remark-lint-problem-matcher.json"
NODE=$(command -v node) make lint-md
env:
NODE_RELEASED_VERSIONS: ${{ steps.get-released-versions.outputs.NODE_RELEASED_VERSIONS }}

lint-js:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
8 changes: 4 additions & 4 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -116,7 +116,7 @@ platforms. This is true regardless of entries in the table below.
| macOS | x64 | >= 10.13 | Tier 1 | |
| macOS | arm64 | >= 11 | Experimental | |
| SmartOS | x64 | >= 18 | Tier 2 | |
| AIX | ppc64be >=power7 | >= 7.2 TL02 | Tier 2 | |
| AIX | ppc64be >=power7 | >= 7.2 TL04 | Tier 2 | |
| FreeBSD | x64 | >= 11 | Experimental | Downgraded as of Node.js 12 <sup>[7](#fn7)</sup> |

<em id="fn1">1</em>: GCC 6 is not provided on the base platform. Users will
@@ -171,7 +171,7 @@ Binaries at <https://nodejs.org/download/release/> are produced on:

| Binary package | Platform and Toolchain |
| --------------------- | ------------------------------------------------------------------------------------------------------------- |
| aix-ppc64 | AIX 7.1 TL05 on PPC64BE with GCC 6 |
| aix-ppc64 | AIX 7.2 TL04 on PPC64BE with GCC 8 |
| darwin-x64 (and .pkg) | macOS 10.15, Xcode Command Line Tools 11 with -mmacosx-version-min=10.13 |
| linux-arm64 | CentOS 7 with devtoolset-8 / GCC 8 <sup>[8](#fn8)</sup> |
| linux-armv7l | Cross-compiled on Ubuntu 18.04 x64 with [custom GCC toolchain](https://github.com/rvagg/rpi-newer-crosstools) |
@@ -613,7 +613,7 @@ packages:

To install Node.js prerequisites using
[Boxstarter WebLauncher](https://boxstarter.org/WebLauncher), open
<https://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter>
<https://boxstarter.org/package/nr/url?https://raw.githubusercontent.com/nodejs/node/HEAD/tools/bootstrap/windows_boxstarter>
with Internet Explorer or Edge browser on the target machine.

Alternatively, you can use PowerShell. Run those commands from an elevated
@@ -623,7 +623,7 @@ PowerShell terminal:
Set-ExecutionPolicy Unrestricted -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://boxstarter.org/bootstrapper.ps1'))
get-boxstarter -Force
Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/master/tools/bootstrap/windows_boxstarter -DisableReboots
Install-BoxstarterPackage https://raw.githubusercontent.com/nodejs/node/HEAD/tools/bootstrap/windows_boxstarter -DisableReboots
```

The entire installation using Boxstarter will take up approximately 10 GB of
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -32,7 +32,9 @@ release.
</tr>
<tr>
<td valign="top">
<b><a href="doc/changelogs/CHANGELOG_V15.md#15.10.0">15.10.0</a></b><br/>
<b><a href="doc/changelogs/CHANGELOG_V15.md#15.12.0">15.12.0</a></b><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.11.0">15.11.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.10.0">15.10.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.9.0">15.9.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.8.0">15.8.0</a><br/>
<a href="doc/changelogs/CHANGELOG_V15.md#15.7.0">15.7.0</a><br/>
4 changes: 2 additions & 2 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Code of Conduct

* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/master/Moderation-Policy.md)
* [Node.js Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md)
* [Node.js Moderation Policy](https://github.com/nodejs/admin/blob/HEAD/Moderation-Policy.md)
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
## [Code of Conduct](./doc/guides/contributing/code-of-conduct.md)

The Node.js project has a
[Code of Conduct](https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md)
[Code of Conduct](https://github.com/nodejs/admin/blob/HEAD/CODE_OF_CONDUCT.md)
to which all contributors must adhere.

See [details on our policy on Code of Conduct](./doc/guides/contributing/code-of-conduct.md).
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1209,7 +1209,7 @@ lint-md: lint-js-doc | tools/.mdlintstamp
LINT_JS_TARGETS = .eslintrc.js benchmark doc lib test tools

run-lint-js = tools/node_modules/eslint/bin/eslint.js --cache \
--report-unused-disable-directives --ext=$(EXTENSIONS) $(LINT_JS_TARGETS)
--report-unused-disable-directives $(LINT_JS_TARGETS)
run-lint-js-fix = $(run-lint-js) --fix

.PHONY: lint-js-fix
@@ -1220,8 +1220,7 @@ lint-js-fix:
.PHONY: lint-js-doc
# Note that on the CI `lint-js-ci` is run instead.
# Lints the JavaScript code with eslint.
lint-js lint-js-fix: EXTENSIONS=.js,.mjs,.md
lint-js-doc: EXTENSIONS=.md
lint-js-doc: LINT_JS_TARGETS=doc
lint-js lint-js-doc:
@if [ "$(shell $(node_use_openssl))" != "true" ]; then \
echo "Skipping $@ (no crypto)"; \
@@ -1234,7 +1233,7 @@ jslint: lint-js
$(warning Please use lint-js instead of jslint)

run-lint-js-ci = tools/node_modules/eslint/bin/eslint.js \
--report-unused-disable-directives --ext=.js,.mjs,.md -f tap \
--report-unused-disable-directives -f tap \
-o test-eslint.tap $(LINT_JS_TARGETS)

.PHONY: lint-js-ci
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -21,19 +21,19 @@ The Node.js project uses an [open governance model](./GOVERNANCE.md). The
# Table of contents

* [Support](#support)
* [Release Types](#release-types)
* [Release types](#release-types)
* [Download](#download)
* [Current and LTS Releases](#current-and-lts-releases)
* [Nightly Releases](#nightly-releases)
* [API Documentation](#api-documentation)
* [Verifying Binaries](#verifying-binaries)
* [Current and LTS releases](#current-and-lts-releases)
* [Nightly releases](#nightly-releases)
* [API documentation](#api-documentation)
* [Verifying binaries](#verifying-binaries)
* [Building Node.js](#building-nodejs)
* [Security](#security)
* [Contributing to Node.js](#contributing-to-nodejs)
* [Current Project Team Members](#current-project-team-members)
* [Current project team members](#current-project-team-members)
* [TSC (Technical Steering Committee)](#tsc-technical-steering-committee)
* [Collaborators](#collaborators)
* [Release Keys](#release-keys)
* [Release keys](#release-keys)
* [License](#license)

## Support
@@ -591,6 +591,8 @@ maintaining the Node.js project.

### Triagers

* [marsonya](https://github.com/marsonya) -
**Akhil Marsonya** &lt;akhil.marsonya27@gmail.com&gt; (he/him)
* [PoojaDurgad](https://github.com/PoojaDurgad) -
**Pooja Durgad** &lt;Pooja.D.P@ibm.com&gt;
* [RaisinTen](https://github.com/RaisinTen) -
63 changes: 63 additions & 0 deletions benchmark/fs/readfile-promises.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// Call fs.promises.readFile over and over again really fast.
// Then see how many times it got called.
// Yes, this is a silly benchmark. Most benchmarks are silly.
'use strict';

const path = require('path');
const common = require('../common.js');
const fs = require('fs');
const assert = require('assert');

const tmpdir = require('../../test/common/tmpdir');
tmpdir.refresh();
const filename = path.resolve(tmpdir.path,
`.removeme-benchmark-garbage-${process.pid}`);

const bench = common.createBenchmark(main, {
duration: [5],
len: [1024, 16 * 1024 * 1024],
concurrent: [1, 10]
});

function main({ len, duration, concurrent }) {
try { fs.unlinkSync(filename); } catch { }
let data = Buffer.alloc(len, 'x');
fs.writeFileSync(filename, data);
data = null;

let writes = 0;
let benchEnded = false;
bench.start();
setTimeout(() => {
benchEnded = true;
bench.end(writes);
try { fs.unlinkSync(filename); } catch { }
process.exit(0);
}, duration * 1000);

function read() {
fs.promises.readFile(filename)
.then((res) => afterRead(undefined, res))
.catch((err) => afterRead(err));
}

function afterRead(er, data) {
if (er) {
if (er.code === 'ENOENT') {
// Only OK if unlinked by the timer from main.
assert.ok(benchEnded);
return;
}
throw er;
}

if (data.length !== len)
throw new Error('wrong number of bytes returned');

writes++;
if (!benchEnded)
read();
}

while (concurrent--) read();
}
76 changes: 76 additions & 0 deletions benchmark/fs/writefile-promises.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
// Call fs.promises.writeFile over and over again really fast.
// Then see how many times it got called.
// Yes, this is a silly benchmark. Most benchmarks are silly.
'use strict';

const path = require('path');
const common = require('../common.js');
const fs = require('fs');
const assert = require('assert');
const tmpdir = require('../../test/common/tmpdir');

tmpdir.refresh();
const filename = path.resolve(tmpdir.path,
`.removeme-benchmark-garbage-${process.pid}`);
let filesWritten = 0;
const bench = common.createBenchmark(main, {
duration: [5],
encodingType: ['buf', 'asc', 'utf'],
size: [2, 1024, 65535, 1024 * 1024],
concurrent: [1, 10]
});

function main({ encodingType, duration, concurrent, size }) {
let encoding;
let chunk;
switch (encodingType) {
case 'buf':
chunk = Buffer.alloc(size, 'b');
break;
case 'asc':
chunk = 'a'.repeat(size);
encoding = 'ascii';
break;
case 'utf':
chunk = 'ΓΌ'.repeat(Math.ceil(size / 2));
encoding = 'utf8';
break;
default:
throw new Error(`invalid encodingType: ${encodingType}`);
}

let writes = 0;
let benchEnded = false;
bench.start();
setTimeout(() => {
benchEnded = true;
bench.end(writes);
for (let i = 0; i < filesWritten; i++) {
try { fs.unlinkSync(`${filename}-${i}`); } catch { }
}
process.exit(0);
}, duration * 1000);

function write() {
fs.promises.writeFile(`${filename}-${filesWritten++}`, chunk, encoding)
.then(() => afterWrite())
.catch((err) => afterWrite(err));
}

function afterWrite(er) {
if (er) {
if (er.code === 'ENOENT') {
// Only OK if unlinked by the timer from main.
assert.ok(benchEnded);
return;
}
throw er;
}

writes++;
if (!benchEnded)
write();
}

while (concurrent--) write();
}
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
@@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.22',
'v8_embedder_string': '-node.7',

##### V8 defaults for Node.js #####

5 changes: 5 additions & 0 deletions deps/cjs-module-lexer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
1.1.0
- Support for Babel reexport conflict filter (https://github.com/guybedford/cjs-module-lexer/issues/36, @nicolo-ribaudo)
- Support trailing commas in getter patterns (https://github.com/guybedford/cjs-module-lexer/issues/31)
- Support for RollupJS reexports property checks (https://github.com/guybedford/cjs-module-lexer/issues/38)

1.0.0
- Unsafe getter tracking (https://github.com/guybedford/cjs-module-lexer/pull/29)

Loading