mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-13 21:33:32 +08:00
fix: stabilize windows ci portability
This commit is contained in:
@@ -26,11 +26,12 @@ function main() {
|
||||
let failed = 0
|
||||
|
||||
const repoRoot = path.join(__dirname, "..", "..")
|
||||
const packageJson = JSON.parse(
|
||||
fs.readFileSync(path.join(repoRoot, "package.json"), "utf8")
|
||||
)
|
||||
const buildScript = path.join(repoRoot, "scripts", "build-opencode.js")
|
||||
const distEntry = path.join(repoRoot, ".opencode", "dist", "index.js")
|
||||
const packageJson = JSON.parse(
|
||||
fs.readFileSync(path.join(repoRoot, "package.json"), "utf8")
|
||||
)
|
||||
const buildScript = path.join(repoRoot, "scripts", "build-opencode.js")
|
||||
const distEntry = path.join(repoRoot, ".opencode", "dist", "index.js")
|
||||
const npmExecutable = process.platform === "win32" ? "npm.cmd" : "npm"
|
||||
const tests = [
|
||||
["package.json exposes the OpenCode build and prepack hooks", () => {
|
||||
assert.strictEqual(packageJson.scripts["build:opencode"], "node scripts/build-opencode.js")
|
||||
@@ -46,7 +47,7 @@ function main() {
|
||||
assert.ok(fs.existsSync(distEntry), ".opencode/dist/index.js should exist after build")
|
||||
}],
|
||||
["npm pack includes the compiled OpenCode dist payload", () => {
|
||||
const result = spawnSync("npm", ["pack", "--dry-run", "--json"], {
|
||||
const result = spawnSync(npmExecutable, ["pack", "--dry-run", "--json"], {
|
||||
cwd: repoRoot,
|
||||
encoding: "utf8",
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user