Skip to content

test: resolve distribution paths in checkouts with spaces and Unicode - #594

Open
FFspiky wants to merge 1 commit into
nygardk:masterfrom
FFspiky:fix/dist-tests-file-url
Open

FFspiky wants to merge 1 commit into
nygardk:masterfrom
FFspiky:fix/dist-tests-file-url

Conversation

@FFspiky

@FFspiky FFspiky commented Nov 24, 2026 •

Copy link
Copy Markdown

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 测试”.

Use the filesystem path so the distribution checks can read built artifacts in checkouts with spaces or Unicode characters.
@changeset-bot

changeset-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f020eb5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

This branch has not been deployed

No deployments
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