-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Package scoping fails when workspace glob has leading ./
#8599
Labels
kind: bug
Something isn't working
Comments
timostamm
added
kind: bug
Something isn't working
needs: triage
New issues get this label. Remove it after triage
owned-by: turborepo
labels
Jun 25, 2024
chris-olszewski
changed the title
Package scoping fails when workspace glob has leading Jun 25, 2024
--filter
does not normalize leading ./
in workspace paths./
Thanks for the report! The package scoping is definitely a bug.
This is correct, directory based filters start with a |
chris-olszewski
removed
the
needs: triage
New issues get this label. Remove it after triage
label
Jun 25, 2024
chris-olszewski
added a commit
that referenced
this issue
Jul 24, 2024
### Description Add unit test for broken behavior described in #8599 This does not fix the issue, but will start failing if our behavior changes. ### Testing Instructions Unit test passes
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Verify canary release
Link to code that reproduces this issue
https://github.com/timostamm/turbotest
What package manager are you using / does the bug impact?
npm
What operating system are you using?
Mac
Which canary version will you have in your reproduction?
v2.0.5 - there's no newer canary
Describe the Bug
In an npm project where workspaces are declared with a leading
./
, Automatic Package Scoping is unable to locate the package.package.json:
It looks like
--filter
requires the leading./
as well:We do not get a match when omitting
./
:Expected Behavior
I expect filters to match
packages/foo
regardless of the leading./
declared in the workspace path, same as npm.Ideally,
./packages/foo
would match both forms. It appears that paths are already normalized (npx turbo run test -F ./packages/../packages/bar
locatesbar
as expected), but don't normalize the leading./
.To Reproduce
See https://github.com/timostamm/turbotest for a minimal reproducible example.
Additional context
Also see discussion #8514
The text was updated successfully, but these errors were encountered: