mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-09 08:42:15 +03:00
Compare commits
1 Commits
fix/9626-p
...
fix/9633-n
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
60121a353c |
1
changelog.d/fixes/9633-npm-build-files.md
Normal file
1
changelog.d/fixes/9633-npm-build-files.md
Normal file
@@ -0,0 +1 @@
|
||||
- fix(build): add build-next-isolated.mjs sibling imports to package.json files array
|
||||
@@ -34,8 +34,11 @@
|
||||
"scripts/dev/tls-options.mjs",
|
||||
"scripts/check/check-supported-node-runtime.ts",
|
||||
"scripts/dev/sync-env.mjs",
|
||||
"scripts/build/native-binary-compat.mjs",
|
||||
"scripts/build/assembleStandalone.mjs",
|
||||
"scripts/build/backendOnlyPages.mjs",
|
||||
"scripts/build/build-next-isolated.mjs",
|
||||
"scripts/build/build-tproxy-native.mjs",
|
||||
"scripts/build/native-binary-compat.mjs",
|
||||
"scripts/build/runtime-env.mjs",
|
||||
"README.md",
|
||||
"LICENSE",
|
||||
|
||||
27
tests/unit/repro-9633.test.ts
Normal file
27
tests/unit/repro-9633.test.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
import { readFileSync } from "node:fs";
|
||||
|
||||
const pkg = JSON.parse(readFileSync("package.json", "utf-8"));
|
||||
const files = pkg.files || [];
|
||||
|
||||
// #9633: `build-next-isolated.mjs` is published (fixed in #1126), but three of
|
||||
// its sibling modules it imports were missing from the `files` whitelist, so
|
||||
// `npm run build` on a globally-installed package crashed with ERR_MODULE_NOT_FOUND.
|
||||
// The dynamic import of `build-tproxy-native.mjs` (~line 308) and the static
|
||||
// imports of `assembleStandalone.mjs` / `backendOnlyPages.mjs` must ship too.
|
||||
const NEEDED = [
|
||||
"scripts/build/assembleStandalone.mjs",
|
||||
"scripts/build/backendOnlyPages.mjs",
|
||||
"scripts/build/build-tproxy-native.mjs",
|
||||
"scripts/build/colocateOptionals.mjs",
|
||||
];
|
||||
|
||||
test("#9633: build-next-isolated.mjs sibling imports present in package.json files[]", () => {
|
||||
for (const needed of NEEDED) {
|
||||
assert.ok(
|
||||
files.some((f) => typeof f === "string" && f === needed),
|
||||
`${needed} is not in package.json files[]`
|
||||
);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user