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: handle relative tsconfig.json paths #80

Merged
merged 7 commits into from
Jul 19, 2024

Conversation

stefanprobst
Copy link
Contributor

this fixes a regression introduced in 4.7.3:

previously, the implicit base url used an absolute path (see here), which was changed to just using path.dirname() (see here)

this resulted in different paths being resolved for the base url here - in the example from #79 this would be:

// v4.7.5
const resolvedBaseUrl = path.resolve(
  path.dirname("e2e/tsconfig.json"),
  "e2e",
);
// '/home/stefan/e2e/e2e'

// v4.7.3
const resolvedBaseUrl = path.resolve(
  path.dirname("e2e/tsconfig.json"),
  "/home/stefan/e2e",
);
// '/home/stefan/e2e'

closes #79

@stefanprobst
Copy link
Contributor Author

@privatenumber could you take a look at this please? thanks!

@privatenumber
Copy link
Owner

Actually took a look at the time and I was going to add a test but I went down a rabbit hole. Basically this needs a test to land. I don't mind doing it but might take some time.

@stefanprobst
Copy link
Contributor Author

tried adding a test - let me know what you think (it does fail on master but passes on this branch).

@privatenumber privatenumber changed the title fix: use absolute path for implicit base url fix: handle relative tsconfig.json paths Jul 19, 2024
@privatenumber privatenumber merged commit 9e78ec5 into privatenumber:master Jul 19, 2024
2 of 3 checks passed
@privatenumber
Copy link
Owner

🎉 This issue has been resolved in version 4.7.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@privatenumber
Copy link
Owner

Appreciate the PR @stefanprobst Thanks for working on this 🙏

@stefanprobst stefanprobst deleted the patch-1 branch July 19, 2024 03:06
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.

paths matcher in version 4.7.5 resolves incorrect paths
2 participants