Skip to content

Commit b35eb74

Browse files
committed
[GR-30601] Backport: Upgrading the underlying Node.js to version 12.22.1.
PullRequest: js/1968
2 parents 1264d04 + 2a5bfcd commit b35eb74

File tree

386 files changed

+2204
-895
lines changed

Some content is hidden

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

386 files changed

+2204
-895
lines changed

3rd_party_licenses.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -931,7 +931,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
931931

932932
================================================================================
933933

934-
Node.js 12.21.0
934+
Node.js 12.22.1
935935

936936
Node.js is licensed for use as follows:
937937

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This changelog summarizes major changes between GraalVM versions of the GraalVM
44
The main focus is on user-observable behavior of the engine.
55

66
## Version 20.3.2
7-
* Updated Node.js to version 12.21.0.
7+
* Updated Node.js to version 12.22.1.
88

99
## Version 20.3.1
1010
* Updated Node.js to version 12.20.1.

graal-nodejs/CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ release.
2828
</tr>
2929
<tr>
3030
<td valign="top">
31-
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.21.0">12.21.0</a></b><br/>
31+
<b><a href="doc/changelogs/CHANGELOG_V12.md#12.22.1">12.22.1</a></b><br/>
32+
<a href="doc/changelogs/CHANGELOG_V12.md#12.22.0">12.22.0</a><br/>
33+
<a href="doc/changelogs/CHANGELOG_V12.md#12.21.0">12.21.0</a><br/>
3234
<a href="doc/changelogs/CHANGELOG_V12.md#12.20.2">12.20.2</a><br/>
3335
<a href="doc/changelogs/CHANGELOG_V12.md#12.20.1">12.20.1</a><br/>
3436
<a href="doc/changelogs/CHANGELOG_V12.md#12.20.0">12.20.0</a><br/>
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
'use strict';
2+
3+
const common = require('../common.js');
4+
const { Worker, parentPort } = require('worker_threads');
5+
6+
if (process.argv[2] === 'idle cats') {
7+
return parentPort.once('message', () => {});
8+
}
9+
10+
const bench = common.createBenchmark(main, {
11+
n: [1e6],
12+
method: [
13+
'ELU_simple',
14+
'ELU_passed',
15+
],
16+
});
17+
18+
function main({ method, n }) {
19+
switch (method) {
20+
case 'ELU_simple':
21+
benchELUSimple(n);
22+
break;
23+
case 'ELU_passed':
24+
benchELUPassed(n);
25+
break;
26+
default:
27+
throw new Error(`Unsupported method ${method}`);
28+
}
29+
}
30+
31+
function benchELUSimple(n) {
32+
const worker = new Worker(__filename, { argv: ['idle cats'] });
33+
34+
spinUntilIdle(worker, () => {
35+
bench.start();
36+
for (let i = 0; i < n; i++)
37+
worker.performance.eventLoopUtilization();
38+
bench.end(n);
39+
worker.postMessage('bye');
40+
});
41+
}
42+
43+
function benchELUPassed(n) {
44+
const worker = new Worker(__filename, { argv: ['idle cats'] });
45+
46+
spinUntilIdle(worker, () => {
47+
let elu = worker.performance.eventLoopUtilization();
48+
bench.start();
49+
for (let i = 0; i < n; i++)
50+
elu = worker.performance.eventLoopUtilization(elu);
51+
bench.end(n);
52+
worker.postMessage('bye');
53+
});
54+
}
55+
56+
function spinUntilIdle(w, cb) {
57+
const t = w.performance.eventLoopUtilization();
58+
if (t.idle + t.active > 0)
59+
return process.nextTick(cb);
60+
setTimeout(() => spinUntilIdle(w, cb), 1);
61+
}

graal-nodejs/common.gypi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
# Reset this number to 0 on major V8 upgrades.
3636
# Increment by one for each non-official patch applied to deps/v8.
37-
'v8_embedder_string': '-node.45',
37+
'v8_embedder_string': '-node.46',
3838

3939
##### V8 defaults for Node.js #####
4040

graal-nodejs/deps/cjs-module-lexer/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
1.1.0
2+
- Support for Babel reexport conflict filter (https://github.com/guybedford/cjs-module-lexer/issues/36, @nicolo-ribaudo)
3+
- Support trailing commas in getter patterns (https://github.com/guybedford/cjs-module-lexer/issues/31)
4+
- Support for RollupJS reexports property checks (https://github.com/guybedford/cjs-module-lexer/issues/38)
5+
16
1.0.0
27
- Unsafe getter tracking (https://github.com/guybedford/cjs-module-lexer/pull/29)
38

graal-nodejs/deps/cjs-module-lexer/README.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ EXPORTS_DOT_ASSIGN: EXPORTS_IDENTIFIER `.` IDENTIFIER `=`
8080
8181
EXPORTS_LITERAL_COMPUTED_ASSIGN: EXPORTS_IDENTIFIER `[` IDENTIFIER_STRING `]` `=`
8282
83-
EXPORTS_LITERAL_PROP: (IDENTIFIER `:` IDENTIFIER)?) | (IDENTIFIER_STRING `:` IDENTIFIER)
83+
EXPORTS_LITERAL_PROP: (IDENTIFIER (`:` IDENTIFIER)?) | (IDENTIFIER_STRING `:` IDENTIFIER)
8484
8585
EXPORTS_SPREAD: `...` (IDENTIFIER | REQUIRE)
8686
@@ -92,7 +92,7 @@ EXPORTS_DEFINE_VALUE: EXPORTS_DEFINE `, {`
9292
(`enumerable: true,`)?
9393
(
9494
`value:` |
95-
`get` (`: function` IDENTIFIER? )? `()` {` return IDENTIFIER (`.` IDENTIFIER | `[` IDENTIFIER_STRING `]`)? `;`? `}`
95+
`get` (`: function` IDENTIFIER? )? `()` {` return IDENTIFIER (`.` IDENTIFIER | `[` IDENTIFIER_STRING `]`)? `;`? `}` `,`?
9696
)
9797
`})`
9898
@@ -108,15 +108,18 @@ EXPORT_STAR: (`__export` | `__exportStar`) `(` REQUIRE
108108
109109
EXPORT_STAR_LIB: `Object.keys(` IDENTIFIER$1 `).forEach(function (` IDENTIFIER$2 `) {`
110110
(
111-
`if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`? |
112-
`if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) `)`
111+
(
112+
`if (` IDENTIFIER$2 `===` ( `'default'` | `"default"` ) `||` IDENTIFIER$2 `===` ( '__esModule' | `"__esModule"` ) `) return` `;`?
113+
(
114+
(`if (Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER `, ` IDENTIFIER$2 `)) return` `;`?)?
115+
(`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`)?
116+
)?
117+
) |
118+
`if (` IDENTIFIER$2 `!==` ( `'default'` | `"default"` ) (`&& !` (`Object` `.prototype`? `.hasOwnProperty.call(` IDENTIFIER$1 `, ` IDENTIFIER$2 `)` | IDENTIFIER$1 `.hasOwnProperty(` IDENTIFIER$2 `)`))? `)`
113119
)
114-
(
115-
`if (` IDENTIFIER$2 `in` EXPORTS_IDENTIFIER `&&` EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] ===` IDENTIFIER$1 `[` IDENTIFIER$2 `]) return` `;`?
116-
)?
117120
(
118121
EXPORTS_IDENTIFIER `[` IDENTIFIER$2 `] =` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? |
119-
`Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get: function () { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? } })` `;`?
122+
`Object.defineProperty(` EXPORTS_IDENTIFIER `, ` IDENTIFIER$2 `, { enumerable: true, get: function () { return ` IDENTIFIER$1 `[` IDENTIFIER$2 `]` `;`? `}` `,`? `})` `;`?
120123
)
121124
`})`
122125
```
@@ -194,13 +197,23 @@ Object.defineProperty(exports, 'd', { value: 'd' });
194197
Object.defineProperty(exports, '__esModule', { value: true });
195198
```
196199

200+
Value properties are also detected specifically:
201+
202+
```js
203+
Object.defineProperty(exports, 'a', {
204+
value: 'no problem'
205+
});
206+
```
207+
197208
To avoid matching getters that have side effects, any getter for an export name that does not support the forms above will
198209
opt-out of the getter matching:
199210

200211
```js
201212
// DETECTS: NO EXPORTS
202213
Object.defineProperty(exports, 'a', {
203-
value: 'no problem'
214+
get () {
215+
return 'nope';
216+
}
204217
});
205218

206219
if (false) {

graal-nodejs/deps/cjs-module-lexer/dist/lexer.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

graal-nodejs/deps/cjs-module-lexer/dist/lexer.mjs

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)