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

hint more clear at builtin bail #310

Merged
merged 1 commit into from
May 30, 2020
Merged

hint more clear at builtin bail #310

merged 1 commit into from
May 30, 2020

Conversation

undoZen
Copy link
Contributor

@undoZen undoZen commented May 30, 2020

to match package name not only \w+ but with dash or under namespace

> '/node_modules/test/abc/def'.match(/\/node_modules\/([^@\/][^\/]*|@[^\/]+\/[^\/]+)\//)
[
  '/node_modules/test/',
  'test',
  index: 0,
  input: '/node_modules/test/abc/def',
  groups: undefined
]
> '/node_modules/te-st/abc/def'.match(/\/node_modules\/([^@\/][^\/]*|@[^\/]+\/[^\/]+)\//)
[
  '/node_modules/te-st/',
  'te-st',
  index: 0,
  input: '/node_modules/te-st/abc/def',
  groups: undefined
]
> '/node_modules/@te/st/abc/def'.match(/\/node_modules\/([^@\/][^\/]*|@[^\/]+\/[^\/]+)\//)
[
  '/node_modules/@te/st/',
  '@te/st',
  index: 0,
  input: '/node_modules/@te/st/abc/def',
  groups: undefined
]

@yyx990803 yyx990803 merged commit 29e36ab into vitejs:master May 30, 2020
@undoZen undoZen deleted the master branch May 31, 2020 06:02
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.

2 participants