Repository navigation
test(registry): fix Windows test failures and run tests on Windows in CI - #159
Merged
Merged
Conversation
The publish-all tests spawned `npx tsx`, which execFileSync can't launch on Windows (npx is a .cmd shim), so they saw empty output. Run node with tsx as a loader instead. The backslash-filename test simulates Windows on Linux; on Windows it writes into a missing directory. Skip it there, where the @trpc/server test covers the same path natively. Add windows-latest to the CI test job, keeping the Linux check named "Test". Fixes #153 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017Exdaq6aMDKKhN9hihK7Nz
|
moshest
marked this pull request as ready for review
September 24, 2026 02:32
This was referenced Sep 24, 2026
moshest
added a commit
that referenced
this pull request
Sep 25, 2026
findMarkdownFiles and readLocalDocsFiles built stored paths with path.join, which uses backslashes on Windows, so docs added there were stored as "docs\guide.md". The two repo-meta tests from #125 caught it once #159 turned on Windows CI, and main's Windows test job was red. Stored paths are package data, not filesystem paths, so they are now built with posix.join. Reading files still uses the platform join. This also means gitignore matching gets forward-slash paths on every platform. Test (Windows) passes on this PR, along with Linux tests, lint and build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Moshe · project thread
Before: three
@neuledge/registrytests failed onwindows-latest. Turbo stopped at that first failure, so CI couldn't run any tests on Windows, including the@neuledge/contextsuite.After: the registry suite passes on Windows, and the CI test job runs on both Linux and Windows. The Linux check keeps its name,
Test, so the existing required check still matches it.Fixes #153.
How:
publish-all.test.tsran the CLI throughexecFileSync("npx", ["tsx", ...]). On Windows,npxis a.cmdshim, andexecFileSynccan't launch that without a shell. The spawn failed and both tests got empty output (expected '' to contain '--- Summary ---'in run 289). The tests now runprocess.execPath --import tsx src/cli.ts, which starts a real process on every platform.definition.test.tsbackslash test writes@apollo\client.yamlso Linux can reproduce the string Windows produces. On Windows the backslash is a real path separator, so the write targets a missing@apollodirectory and fails with ENOENT. The test is now skipped on Windows only. There, the@trpc/serverscoped test already runs the samerelative()normalization for real.ci.yml: the test job uses a matrix ofubuntu-latest("Test") andwindows-latest("Test (Windows)"), withfail-fast: false.Tested on Linux:
pnpm lint,pnpm buildandpnpm testpass. This PR's CI is the first run of the full suite on Windows.🤖 Generated with Claude Code
https://claude.ai/code/session_017Exdaq6aMDKKhN9hihK7Nz
Generated by Claude Code