Compare commits

...
Author SHA1 Message Date
dayuan.jiang ab33dae69d fix(mcp-server): read npm 12's pack output in the package check
The publish workflow installs the latest npm, and npm 12 prints
`npm pack --json` as an object keyed by package name instead of a list,
so check-package failed and 0.3.0 was not published. Accept both.
2026-10-05 22:43:05 +09:00
@@ -11,9 +11,11 @@ const REQUIRED = [
"dist/preview/preview.js",
]
const [pack] = JSON.parse(
const output = JSON.parse(
execSync("npm pack --dry-run --json", { encoding: "utf8" }),
)
// npm 11 prints a list, npm 12 an object keyed by package name
const pack = Array.isArray(output) ? output[0] : Object.values(output)[0]
const files = new Set(pack.files.map((f) => f.path))
const missing = REQUIRED.filter((f) => !files.has(f))
if (missing.length > 0) {