jest icon indicating copy to clipboard operation
jest copied to clipboard

Add type-only import test case for dependencyExtractor

Open CoryDanielson opened this issue 1 year ago • 5 comments

See https://github.com/jestjs/jest/issues/15308

This PR only adds a test case for an open bug report issue, so it can be referenced as a reproduction step.

Summary

I know the problem, but I don't know regex well enough to solve this problem. I could handle this with an if-statement in addDependency to exclude these deps, but I think regex is the proper solution given the rest of the code.

Test plan

Run this test to reproduce the bug.

CoryDanielson avatar Sep 16 '24 16:09 CoryDanielson

CLA Not Signed

  • :x: - login: @CoryDanielson / name: Cory Danielson . The commit (7c73be690a3621bacb1545eda12c203793f4c748, d43a33731882ea28d97d5ff8bf4d521dbcc86477, 6f14598361e4c35a5247d5b4a207b4756134536e, 2d2e5e9e6a53a191f820b4ffd5e282e23e40441c, 57932a15db0ff69d45e5476262cf21cf3c395aab, 705474fd17956af290df8508801d434214e4c056) is not authorized under a signed CLA. Please click here to be authorized. For further assistance with EasyCLA, please submit a support request ticket.

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
Latest commit 2d2e5e9e6a53a191f820b4ffd5e282e23e40441c
Latest deploy log https://app.netlify.com/sites/jestjs/deploys/66e88032cae20600085e0db1
Deploy Preview https://deploy-preview-15307--jestjs.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Sep 16 '24 16:09 netlify[bot]

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Mar 10 '25 17:03 github-actions[bot]

Thanks for the PR! Happy to take an if - complex regexes are unreadable (and it's not like regex is super performant)

SimenB avatar Mar 11 '25 08:03 SimenB

I think the only realistic way to fix this is by actually parsing the files into an AST, which might not be desirable.

cpojer avatar May 28 '25 12:05 cpojer

This PR is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Aug 26 '25 13:08 github-actions[bot]

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

github-actions[bot] avatar Sep 27 '25 00:09 github-actions[bot]