Repository navigation
fix(scripts): run entrypoints from URL-encoded checkout paths - #6054
Draft
xiaoheiai4719-collab wants to merge 1 commit into
Draft
xiaoheiai4719-collab wants to merge 1 commit into
xiaoheiai4719-collab wants to merge 1 commit into
Conversation
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.
What
Fix repository script entrypoints in checkout paths containing URL-encoded characters.
Why
Seven repository scripts compare
import.meta.urlwith a rawfile://${process.argv[1]}string. Node URL-encodes the former but not the latter, so a checkout directory containing a space,%, or#can make the command silently skip its entrypoint and exit successfully without checking or generating anything.Related work
Related: #5543 decodes URL pathnames in other scripts and tests. This correction instead covers seven entrypoint guards and the SVG generator import; it does not duplicate that PR or close its scope. No separate issue is needed for this self-contained correction.
How
fileURLToPath(import.meta.url)in those seven guards.This does not change validation rules, generated content, package APIs, dependencies, or the Node version requirement. The fixtures never publish, contact GitHub, or write outside their temporary checkout.
Test plan
oxlint .reports no warnings or errors.oxfmt --check ., changed-file syntax checks, deletion guard, comment checks, andgit diff --checkpass. The explicit comment check retains one existing non-failing source-citation warning in the catalog generator header.Full workspace build/tests and browser/render lanes were not run. On Node 22.0.0, the broader affected suite has three existing TODO-link test failures because its unchanged code uses
URL.parse; all three also fail on upstream. The new regression tests pass on that version. No Windows or macOS runtime was available.AI-assisted implementation and tests: OpenAI Codex.