Repository navigation
Conversation
Use the filesystem path so the distribution checks can read built artifacts in checkouts with spaces or Unicode characters.
|
This branch has not been deployed
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.
The distribution tests derive a filesystem path from import.meta.url. Taking URL.pathname leaves spaces and non-ASCII characters percent-encoded. On macOS, all 19 checks failed on an unmodified master checkout in a directory named “包验证 checkout”, even though the build had produced all the expected files.
Use Node's fileURLToPath to decode the root directory, as the demo-build tests already do. This changes only the test suite. I found it while validating #593 and reproduced it independently on master.
On the same checkout and built files, all 19 distribution checks passed after the change. All 176 source tests, type checks, lint and the package build also passed. A separate experiment with a literal %20 in the directory name still exposed an import-resolution failure inside Vitest; the reported spaces and Unicode case passed. Codex assisted with implementation and verification.
The Linux and Windows fork checks also passed the build and distribution suite on this PR commit using Node 24 from a checkout named “package 测试”.