Skip to content

chore(deps): take script-utils 0.1.17 and start test processes portably - #139

Merged
NSchatz merged 2 commits into
mainfrom
chore/script-utils-0.1.17
Nov 29, 2026
Merged

NSchatz merged 2 commits into
mainfrom
chore/script-utils-0.1.17

Conversation

@NSchatz

@NSchatz NSchatz commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

What

  • Bump @cosyte/script-utils from ^0.1.16 to ^0.1.17 and regenerate the lockfile.
  • test/docs-content.test.ts: run pnpm build with shell: process.platform === "win32", so Windows reaches pnpm's .cmd launcher. The command and its argument are fixed strings.
  • test/pipe-close.test.ts: start each bin with process.execPath and the entry tsx declares in its own package.json, in place of node_modules/.bin/tsx.
  • vitest.config.ts: run test/pipe-close.test.ts on Windows again, and drop the bare pnpm build from the reason test/docs-content.test.ts stays out there (its shell samples still need bash).

Why

0.1.17 is the current release of the shared gates. A bare pnpm and a .bin shim both need a shell on Windows, where each is a .cmd launcher, so the two tests could not start their process there.

Proof

  • pnpm install --frozen-lockfile: OK after the bump.
  • pnpm typecheck, pnpm lint, pnpm format:check: pass.
  • pnpm phi-scan, pnpm check:no-emdash, pnpm check:no-internal-refs, pnpm check:claude-card, pnpm check:readme, pnpm check:catalog, pnpm check:docs-content: all pass under 0.1.17, with no new finding.
  • pnpm test: 46 files, 825 tests pass on Linux, Node 26.
  • With TMPDIR set to a symbolic link to a directory, every test file except pipe-close passes (45 files, 807 tests), so no test here needs its temp directory resolved. pipe-close cannot run that way locally for an unrelated reason: the long link path pushes tsx's IPC socket path past the Unix socket length limit.
  • Red before green: neither spawn change can fail on Linux, where both forms work. The Windows verify jobs on this pull request are the proof for pipe-close, which now runs there.

Choices

  • Put test/pipe-close.test.ts back on Windows, since the reason it was left out no longer holds. If it fails there for a platform reason, the right step is to restore the exclusion with a new reason.
  • Resolve tsx's manifest with createRequire(...).resolve("tsx/package.json"), which tsx exports, rather than a hard-coded node_modules path.
  • Left scripts/release-install-gate.mjs spawning bare pnpm and npm: it is a script, not a test, and runs on Linux in the release workflow.

@NSchatz
NSchatz merged commit 395ca5a into main Nov 29, 2026
25 checks passed
@NSchatz
NSchatz deleted the chore/script-utils-0.1.17 branch November 29, 2026 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant