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

Appearance settings

Commit 71a2fa2

Browse filesBrowse files
cjihrigMylesBorins
authored andcommitted
errors: drop pronouns from ERR_WORKER_PATH message
This commit drops pronouns from the ERR_WORKER_PATH message, and also shortens the text a bit. PR-URL: #32285 Refs: #31664 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matheus Marchini <mat@mmarchini.me> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 11ed1e6 commit 71a2fa2
Copy full SHA for 71a2fa2

File tree

Expand file treeCollapse file tree

2 files changed

+3
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-4
lines changed
Open diff view settings
Collapse file

‎lib/internal/errors.js‎

Copy file name to clipboardExpand all lines: lib/internal/errors.js
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1422,8 +1422,7 @@ E('ERR_WORKER_PATH', (filename) =>
14221422
'The worker script or module filename must be an absolute path or a ' +
14231423
'relative path starting with \'./\' or \'../\'.' +
14241424
(filename.startsWith('file://') ?
1425-
' If you want to pass a file:// URL, you must wrap it around `new URL`.' :
1426-
''
1425+
' Wrap file:// URLs with `new URL`.' : ''
14271426
) +
14281427
` Received "${filename}"`,
14291428
TypeError);
Collapse file

‎test/parallel/test-worker-unsupported-path.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-worker-unsupported-path.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ const { Worker } = require('worker_threads');
3131
{
3232
assert.throws(
3333
() => { new Worker('file:///file_url'); },
34-
/If you want to pass a file:\/\/ URL, you must wrap it around `new URL`/
34+
/Wrap file:\/\/ URLs with `new URL`/
3535
);
3636
assert.throws(
3737
() => { new Worker('relative_no_dot'); },
3838
// eslint-disable-next-line node-core/no-unescaped-regexp-dot
39-
/^((?!If you want to pass a file:\/\/ URL, you must wrap it around `new URL`).)*$/s
39+
/^((?!Wrap file:\/\/ URLs with `new URL`).)*$/s
4040
);
4141
}
4242

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.