From 2e7bb2d479dbeae0aba41500e389f34d6158251b Mon Sep 17 00:00:00 2001 From: Wiley Bennett Date: Tue, 1 Aug 2017 17:10:55 -0700 Subject: [PATCH] Allow use of scoped packages with a pinned version (#2853) Fixes #2883 --- packages/create-react-app/createReactApp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-react-app/createReactApp.js b/packages/create-react-app/createReactApp.js index 07b083a5f..6fd6c75ac 100755 --- a/packages/create-react-app/createReactApp.js +++ b/packages/create-react-app/createReactApp.js @@ -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]