Skip to content

[pull] main from nodejs:main - #1219

Merged
pull[bot] merged 2 commits into
adamlaska:mainfrom
nodejs:main
Aug 13, 2026
Merged

[pull] main from nodejs:main#1219
pull[bot] merged 2 commits into
adamlaska:mainfrom
nodejs:main

Conversation

@pull

@pull pull Bot commented Aug 13, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

Renegade334 and others added 2 commits August 12, 2026 23:13
Signed-off-by: Renegade334 <contact.9a5d6388@renegade334.me.uk>
PR-URL: #64678
Fixes: #63041
Refs: https://unicode-org.atlassian.net/browse/ICU-23262
Reviewed-By: Claudio Wunder <cwunder@gnome.org>
Reviewed-By: James M Snell <jasnell@gmail.com>
A `.js` file with no `"type"` in the nearest package.json has no format
of its own, and `defaultGetFormat()` reports it as null. `--check`
passed that null straight to `wrapSafe()`, which parses as CommonJS.
Module syntax makes that parse bail out early, so the file was reported
as valid and `--check` exited 0 even though it is not valid JavaScript
under either goal.

At load time the goal for such a file is decided by looking for module
syntax in the source. Decide it the same way here, so the file is
parsed as a module and its real syntax error is reported. Files whose
format is known are unaffected, as are ambiguous files without module
syntax, which are still parsed as CommonJS.

Fixes: #65202
Signed-off-by: Paul Bouchon <mail@bitpshr.net>
PR-URL: #65203
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
@pull pull Bot locked and limited conversation to collaborators Aug 13, 2026
@pull pull Bot added the ⤵️ pull label Aug 13, 2026
@pull
pull Bot merged commit 1b2de5e into adamlaska:main Aug 13, 2026
1 check was pending
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants