Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb11aa8

Browse files
committed
sea: add support for V8 bytecode-only caching
nodejs/node#48191
1 parentbba962e commitfb11aa8

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

‎patches/node/test_fix_edge_snapshot_stack_traces.patch

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ Subject: test: fix edge snapshot stack traces
66
https://github.com/nodejs/node/pull/49659
77

88
diff --git a/test/common/assertSnapshot.js b/test/common/assertSnapshot.js
9-
index83ee45f5f906adddcbc701112f373332dd1f66f9..7b6a9d59bfaa0247f4466277097cd5575ff81d0c 100644
9+
index838ee86f74ea89e052676a5c25e23481369857fa..3aacfa064561c64c218fcc4e3090f7952cb1d218 100644
1010
--- a/test/common/assertSnapshot.js
1111
+++ b/test/common/assertSnapshot.js
1212
@@ -8,6 +8,10 @@ const assert = require('node:assert/strict');
13-
const stackFramesRegexp = /(\s+)((.+?)\s+\()?(?:\(?(.+?):(\d+)(?::(\d+))?)\)?(\s+\{)?(\[\d+m)?(\n|$)/g;
13+
const stackFramesRegexp = /(?<=\n)(\s+)((.+?)\s+\()?(?:\(?(.+?):(\d+)(?::(\d+))?)\)?(\s+\{)?(\[\d+m)?(\n|$)/g;
1414
const windowNewlineRegexp = /\r/g;
1515

1616
+function replaceNodeVersion(str) {
@@ -20,14 +20,14 @@ index 83ee45f5f906adddcbc701112f373332dd1f66f9..7b6a9d59bfaa0247f4466277097cd557
2020
function replaceStackTrace(str, replacement = '$1*$7$8\n') {
2121
return str.replace(stackFramesRegexp, replacement);
2222
}
23-
@@ -70,6 +74,7 @@ async function spawnAndAssert(filename, transform = (x) => x, { tty = false, ...
23+
@@ -84,6 +88,7 @@ async function spawnAndAssert(filename, transform = (x) => x, { tty = false, ...
2424
module.exports = {
2525
assertSnapshot,
2626
getSnapshotPath,
2727
+ replaceNodeVersion,
28+
replaceFullPaths,
2829
replaceStackTrace,
2930
replaceWindowsLineEndings,
30-
replaceWindowsPaths,
3131
diff --git a/test/fixtures/errors/force_colors.snapshot b/test/fixtures/errors/force_colors.snapshot
3232
index 4c33acbc2d5c12ac8750b72e0796284176af3da2..21410d492db861876ecfcb82dcc3c1815cba6d09 100644
3333
--- a/test/fixtures/errors/force_colors.snapshot
@@ -36,11 +36,11 @@ index 4c33acbc2d5c12ac8750b72e0796284176af3da2..21410d492db861876ecfcb82dcc3c181
3636

3737
Error: Should include grayed stack trace
3838
at Object.<anonymous> (/test*force_colors.js:1:7)
39-
-[90m at Module._compile (node:internal*modules*cjs*loader:1256:14)[39m
40-
-[90m at Module._extensions..js (node:internal*modules*cjs*loader:1310:10)[39m
41-
-[90m at Module.load (node:internal*modules*cjs*loader:1119:32)[39m
42-
-[90m at Module._load (node:internal*modules*cjs*loader:960:12)[39m
43-
-[90m at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:86:12)[39m
39+
-[90m at Module._compile (node:internal*modules*cjs*loader:1241:14)[39m
40+
-[90m at Module._extensions..js (node:internal*modules*cjs*loader:1295:10)[39m
41+
-[90m at Module.load (node:internal*modules*cjs*loader:1091:32)[39m
42+
-[90m at Module._load (node:internal*modules*cjs*loader:938:12)[39m
43+
-[90m at Function.executeUserEntryPoint [as runMain] (node:internal*modules*run_main:83:12)[39m
4444
- at node:internal*main*run_main_module:23:47
4545
+ at *
4646
+ at *
@@ -52,13 +52,14 @@ index 4c33acbc2d5c12ac8750b72e0796284176af3da2..21410d492db861876ecfcb82dcc3c181
5252

5353
Node.js *
5454
diff --git a/test/parallel/test-node-output-errors.mjs b/test/parallel/test-node-output-errors.mjs
55-
indexb9a55fb7ea22e62553f69bd035797f7aaee1fc38..1f5ce52cf674cfc5fb75ad2cd979752a991c7e28 100644
55+
indexb08bcd40cdf26093e158c0bb9ae566c76f2c731e..bf8eacbac479a2bf5698ed29ede648e149f185b5 100644
5656
--- a/test/parallel/test-node-output-errors.mjs
5757
+++ b/test/parallel/test-node-output-errors.mjs
58-
@@ -10,14 +10,15 @@ const skipForceColors =
58+
@@ -10,15 +10,15 @@ const skipForceColors =
59+
process.config.variables.node_shared_openssl ||
5960
(common.isWindows && (Number(os.release().split('.')[0]) !== 10 || Number(os.release().split('.')[2]) < 14393)); // See https://github.com/nodejs/node/pull/33132
6061

61-
62+
-
6263
-function replaceNodeVersion(str) {
6364
- return str.replaceAll(process.version, '*');
6465
-}
@@ -74,8 +75,8 @@ index b9a55fb7ea22e62553f69bd035797f7aaee1fc38..1f5ce52cf674cfc5fb75ad2cd979752a
7475
+
7576
describe('errors output', { concurrency: true }, () => {
7677
function normalize(str) {
77-
return str.replaceAll(snapshot.replaceWindowsPaths(process.cwd()), '').replaceAll('//', '*').replaceAll(/\/(\w)/g, '*$1').replaceAll('*test*', '*').replaceAll('*fixtures*errors*', '*').replaceAll('file:**', 'file:*/');
78-
@@ -28,9 +29,12 @@ describe('errors output', { concurrency: true }, () => {
78+
return str.replaceAll(snapshot.replaceWindowsPaths(process.cwd()), '')
79+
@@ -35,9 +35,12 @@ describe('errors output', { concurrency: true }, () => {
7980
}
8081
const common = snapshot
8182
.transform(snapshot.replaceWindowsLineEndings, snapshot.replaceWindowsPaths);
@@ -91,19 +92,19 @@ index b9a55fb7ea22e62553f69bd035797f7aaee1fc38..1f5ce52cf674cfc5fb75ad2cd979752a
9192

9293
const tests = [
9394
{ name: 'errors/async_error_eval_cjs.js' },
94-
@@ -50,7 +54,11 @@ describe('errors output', { concurrency: true }, () => {
95+
@@ -57,7 +60,11 @@ describe('errors output', { concurrency: true }, () => {
9596
{ name: 'errors/throw_in_line_with_tabs.js', transform: errTransform },
9697
{ name: 'errors/throw_non_error.js', transform: errTransform },
9798
{ name: 'errors/promise_always_throw_unhandled.js', transform: promiseTransform },
98-
-!skipForceColors ? { name: 'errors/force_colors.js', env: { FORCE_COLOR: 1 } } : null,
99+
-{ skip: skipForceColors, name: 'errors/force_colors.js', env: { FORCE_COLOR: 1 } },
99100
+ !skipForceColors ? {
100101
+ name: 'errors/force_colors.js',
101102
+ transform: forceColorsTransform,
102103
+ env: { FORCE_COLOR: 1 }
103104
+ } : null,
104-
].filter(Boolean);
105-
for (const { name, transform, env } of tests) {
106-
if (env) env.ELECTRON_RUN_AS_NODE = 1;
105+
];
106+
for (const { name, transform = defaultTransform, env, skip = false } of tests) {
107+
it(name, { skip }, async () => {
107108
diff --git a/test/parallel/test-node-output-sourcemaps.mjs b/test/parallel/test-node-output-sourcemaps.mjs
108109
index 8e43947ab2188f087056eab39d0e1a11481f9da5..c53a0598958e4e386db1993caeb312dae3f302a8 100644
109110
--- a/test/parallel/test-node-output-sourcemaps.mjs

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp