Skip to content

Commit

Permalink
Allow use of scoped packages with a pinned version (#2853)
Browse files Browse the repository at this point in the history
Fixes #2883
  • Loading branch information
wileybenet authored and swengorschewski committed Oct 12, 2017
1 parent 01a6bcf commit 2e7bb2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ function getPackageName(installPackage) {
// git+https://github.com/mycompany/react-scripts.git
// git+ssh://github.com/mycompany/react-scripts.git#v1.2.3
return Promise.resolve(installPackage.match(/([^\/]+)\.git(#.*)?$/)[1]);
} else if (installPackage.indexOf('@') > 0) {
} else if (installPackage.match(/.+@/)) {
// Do not match @scope/ when stripping off @version or @tag
return Promise.resolve(
installPackage.charAt(0) + installPackage.substr(1).split('@')[0]
Expand Down

0 comments on commit 2e7bb2d

Please sign in to comment.