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 parsing of scoped package names in jest dependencies #785

Merged
merged 1 commit into from Mar 28, 2023
Merged

Fix parsing of scoped package names in jest dependencies #785

merged 1 commit into from Mar 28, 2023

Conversation

jtbandes
Copy link
Contributor

The jest special parser did not properly recognize scoped dependencies, for example:

{
  transform: {
    '^.+\\.js$': '@swc/jest'
  }
}

The parser would strip off the /jest and was left only with @swc, which was then discarded. This change fixes the parsing to correctly strip off subdirectories (like @foo/bar/baz -> @foo/bar) accounting for both scoped and non-scoped package names.

@rumpl rumpl merged commit 1f880d0 into depcheck:main Mar 28, 2023
5 of 8 checks passed
@jtbandes jtbandes deleted the jacob/jest-scoped-deps branch March 28, 2023 17:11
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