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

don't confuse webpack requests with packageNames #1379

Merged
merged 1 commit into from
Mar 24, 2023
Merged

Conversation

ef4
Copy link
Contributor

@ef4 ef4 commented Mar 23, 2023

This came up in ember-auto-import, which uses this utility, but it's probably relevant to embroider too.

We use packageName to tests whether a given module specifier is trying to address an NPM package. It shouldn't treat !../../whatever!../stuff as containing a package named !...

I tried to use validate-npm-package-name for this, but it turns out a lot of very weird names are actually totally legal from its perspective, so I'm going with the more narrow case of identifying known prefix characters that webpack injects.

@ef4 ef4 merged commit e7c1789 into main Mar 24, 2023
@ef4 ef4 deleted the package-name-bug branch March 24, 2023 01:02
This was referenced May 2, 2023
@ef4 ef4 added the bug Something isn't working label May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant