Skip to content

Commit

Permalink
Support scoped packages for cra --scripts-version option (#4677)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jack Zhao authored and Timer committed Jun 25, 2018
1 parent 1407287 commit d366039
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/create-react-app/createReactApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ function createApp(name, verbose, version, useNpm, template) {
if (!semver.satisfies(process.version, '>=6.0.0')) {
console.log(
chalk.yellow(
`You are using Node ${process.version} so the project will be bootstrapped with an old unsupported version of tools.\n\n` +
`You are using Node ${
process.version
} so the project will be bootstrapped with an old unsupported version of tools.\n\n` +
`Please update to Node 6 or higher for a better, fully supported experience.\n`
)
);
Expand All @@ -228,7 +230,9 @@ function createApp(name, verbose, version, useNpm, template) {
if (npmInfo.npmVersion) {
console.log(
chalk.yellow(
`You are using npm ${npmInfo.npmVersion} so the project will be boostrapped with an old unsupported version of tools.\n\n` +
`You are using npm ${
npmInfo.npmVersion
} so the project will be boostrapped with an old unsupported version of tools.\n\n` +
`Please update to npm 3 or higher for a better, fully supported experience.\n`
)
);
Expand Down Expand Up @@ -409,7 +413,7 @@ function getInstallPackage(version, originalDirectory) {
if (validSemver) {
packageToInstall += `@${validSemver}`;
} else if (version) {
if (version[0] === '@') {
if (version[0] === '@' && version.indexOf('/') === -1) {
packageToInstall += version;
} else if (version.match(/^file:/)) {
packageToInstall = `file:${path.resolve(
Expand Down

0 comments on commit d366039

Please sign in to comment.