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

Add type-only import test case for dependencyExtractor #15307

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

CoryDanielson
Copy link

@CoryDanielson CoryDanielson commented Sep 16, 2024

See #15308

This PR only adds a test case for an open bug report issue, so it can be reverenced 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.

Copy link

linux-foundation-easycla bot commented Sep 16, 2024

CLA Not Signed

Copy link

netlify bot commented Sep 16, 2024

Deploy Preview for jestjs ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 2d2e5e9
🔍 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.

import {type foo, typeof bar} from 'inv3';
import {
type foo,
typeof bar,
Copy link
Author

@CoryDanielson CoryDanielson Sep 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note that this import ends with a , which is an interesting wrinkle to account for

  • if all named exports are split by a comma, you can have a trailing item that is just space character(s)

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.

1 participant