From a9d514e14fb700652187eed791b46e1f88320df5 Mon Sep 17 00:00:00 2001 From: Wiley Bennett Date: Tue, 25 Jul 2017 15:32:18 -0700 Subject: [PATCH] Allow use of scoped packages with a pinned version, i.e. @org/my-react-scripts@1.3.0 --- 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 07b083a5f62..6fd6c75aca3 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]