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 Timer committed Aug 2, 2017
1 parent b1c1224 commit ea9427b
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 ea9427b

Please sign in to comment.