@netlify/framework-info
Advanced tools
Comparing version 5.7.2 to 5.7.3
{ | ||
"name": "@netlify/framework-info", | ||
"version": "5.7.2", | ||
"version": "5.7.3", | ||
"description": "Framework detection utility", | ||
@@ -89,3 +89,3 @@ "main": "./src/main.js", | ||
"@babel/preset-react": "^7.12.10", | ||
"@netlify/eslint-config-node": "^3.1.7", | ||
"@netlify/eslint-config-node": "^3.1.10", | ||
"ava": "^3.0.0", | ||
@@ -92,0 +92,0 @@ "babel-loader": "^8.2.2", |
@@ -26,3 +26,3 @@ // Retrieve framework's dev commands. | ||
const devScripts = Object.keys(scripts).filter((script) => isNpmDevScript(script)) | ||
const devScripts = Object.keys(scripts).filter((script) => isNpmDevScript(script, scripts[script])) | ||
return devScripts.sort(scriptsSorter) | ||
@@ -52,4 +52,6 @@ } | ||
// Check if the npm script is likely to contain a dev command | ||
const isNpmDevScript = function (scriptName) { | ||
return NPM_DEV_SCRIPTS.some((devScriptName) => matchesNpmWDevScript(scriptName, devScriptName)) | ||
const isNpmDevScript = function (scriptName, scriptValue) { | ||
return NPM_DEV_SCRIPTS.some( | ||
(devScriptName) => matchesNpmWDevScript(scriptName, devScriptName) && !isExcludedScript(scriptValue), | ||
) | ||
} | ||
@@ -64,2 +66,8 @@ | ||
const isExcludedScript = function (scriptValue) { | ||
return EXCLUDED_SCRIPTS.some((excluded) => scriptValue.includes(excluded)) | ||
} | ||
const EXCLUDED_SCRIPTS = ['netlify dev'] | ||
module.exports = { getDevCommands } |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
228544
2053