Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix normalizeSnapshot when repository path contains special characters #178

Closed

Conversation

lPernod-sorare
Copy link
Contributor

No description provided.

@dominikg
Copy link
Owner

Hi, thank you for sending PRs. It would be great if you could give examples of what exactly this fixes.

@lPernod-sorare
Copy link
Contributor Author

lPernod-sorare commented Jun 26, 2024

When cloning the repository into a folder that contained a . (/Users/loic.pernod/git-workspace) the tests did not pass on main with the following diffs:
I've only added one failure here for brevity

-               "baseUrl": "<fixture-dir>/parse/valid/with_extends/paths",
+               "baseUrl": "/Users/loic.pernod/git-workspace/tsconfck/packages/tsconfck/tests/fixtures/parse/valid/with_extends/paths",

Investigating more, I found that the fixtureDirRegex was incorrect:

{
  fixtures: '/Users/loic.pernod/git-workspace/tsconfck/packages/tsconfck/tests/fixtures',
  fixtureDirRegex: /[/\\]Users[/\\]loic[/\\].pernod[/\\]git-workspace[/\\]tsconfck[/\\]packages[/\\]tsconfck[/\\]tests[/\\]fixtures/g
}

The second replace was matching the \ in \. after the first replace, instead of only matching on two backslashes.

@dominikg
Copy link
Owner

included in #179

@dominikg dominikg closed this Jun 27, 2024
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.

None yet

2 participants