update-gatsby-dependencies
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -14,13 +14,14 @@ #!/usr/bin/env node | ||
} | ||
const isfindingPackage = Boolean(process.env.PACKAGE_TYPE) | ||
const regexp = new RegExp(process.env.PACKAGE_TYPE || "alpha-9689ff", "i") | ||
const isfindingPackage = Boolean(process.env.PACKAGE_TYPE); | ||
const regexp = new RegExp(process.env.PACKAGE_TYPE || "alpha-9689ff", "i"); | ||
let command = process.argv.slice(2); | ||
const keys = Object.keys(deps); | ||
const desiredDeps = keys.filter((key) => { | ||
let currentlyValue = key | ||
let currentlyValue = key; | ||
if (isfindingPackage) { | ||
currentValue = deps[key] | ||
currentValue = deps[key]; | ||
} | ||
return regexp.test(currentlyValue)); | ||
} | ||
return regexp.test(currentlyValue); | ||
}); | ||
command = command.join(" ") || "npm i"; | ||
@@ -30,3 +31,5 @@ const output = `${command} ${desiredDeps.join("@next ")}@next`; | ||
if (/npm i @next/.test(output)) | ||
return console.log("We found your package.json but it looks like there are no packages that match what you're looking for in this package.json."); | ||
return console.log( | ||
"We found your package.json but it looks like there are no packages that match what you're looking for in this package.json." | ||
); | ||
@@ -33,0 +36,0 @@ (async () => { |
{ | ||
"name": "update-gatsby-dependencies", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "A package that will update gatsby v4 dependencies from alpha to beta", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
2284
32