mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-05 08:13:06 +08:00
The run-time resolver parsed package.json as it read it, so a file that starts with a UTF-8 byte order mark failed to parse and computed require and require.resolve ended with the invalid-package-config refusal. Node's reader skips the mark; the resolver now does too. The corpus program writes the package with the marked package.json to a fresh directory at run time and resolves it by its absolute path, so no committed file contains the mark.