Skip to content

fix(build): normalize path separators in the shared-contracts check#183

Merged
0xSero merged 1 commit into
sybil-solutions:mainfrom
luminary19:up/contracts-check-separators
Jul 13, 2026
Merged

fix(build): normalize path separators in the shared-contracts check#183
0xSero merged 1 commit into
sybil-solutions:mainfrom
luminary19:up/contracts-check-separators

Conversation

@luminary19

Copy link
Copy Markdown
Contributor

Summary

validate-shared-contracts.mjs matched relative() output against a forward-slash allowlist; on Windows relative() yields backslash paths, so the check failed on every clean tree and npm run check could never pass there. The relative path is now normalized to / before comparison, which also keeps the duplicate-declaration report consistent across hosts. Fixes #182.

Validation

npm run check:contracts   # passes on Windows 11; POSIX output has no backslashes to replace

UI changes

None.

Risks / rollout notes

None — replaceAll("\\", "/") is a no-op on POSIX relative() output.

@0xSero 0xSero left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed the bug on main — relative() output at validate-shared-contracts.mjs:97 is compared against a forward-slash allowlist, so this can never pass on Windows. Normalizing at the single point rel is computed covers both the allowlist check and the duplicate-declaration report, and is a no-op on POSIX. The failing Dependency Review check is repo config (dependency graph disabled), not this PR.

@0xSero 0xSero merged commit 1ff779d into sybil-solutions:main Jul 13, 2026
5 of 6 checks passed
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.65.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] check:contracts always fails on Windows - backslash relative paths never match the forward-slash allowlist

2 participants