Comparing version 2.14.6 to 2.14.7
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -4,0 +4,0 @@ * - All the amazing contributors |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -22,4 +22,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
require('fs'); | ||
require('execa'); | ||
require('fs'); | ||
@@ -26,0 +26,0 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -22,4 +22,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
require('fs'); | ||
require('execa'); | ||
require('fs'); | ||
require('pretty-bytes'); | ||
@@ -26,0 +26,0 @@ const banner = require('./cli-banner.js'); |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -22,4 +22,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
require('fs'); | ||
require('execa'); | ||
require('fs'); | ||
require('upath'); | ||
@@ -26,0 +26,0 @@ require('fs-extra'); |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -22,4 +22,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
require('fs'); | ||
require('execa'); | ||
require('fs'); | ||
const upath = require('upath'); | ||
@@ -169,2 +169,14 @@ const fs = require('fs-extra'); | ||
// Detect process.env usage in nuxt.config | ||
const processEnv = {}; | ||
if (nuxt.options._nuxtConfigFile) { | ||
const configSrc = await fs__default['default'].readFile(nuxt.options._nuxtConfigFile); | ||
const envRegex = /process.env.(\w+)/g; | ||
let match; | ||
// eslint-disable-next-line no-cond-assign | ||
while (match = envRegex.exec(configSrc)) { | ||
processEnv[match[1]] = process.env[match[1]]; | ||
} | ||
} | ||
// Current build meta | ||
@@ -176,3 +188,5 @@ const currentBuild = { | ||
target: nuxt.options.target, | ||
snapshot: currentBuildSnapshot | ||
snapshot: currentBuildSnapshot, | ||
env: nuxt.options.env, | ||
'process.env': processEnv | ||
}; | ||
@@ -184,4 +198,8 @@ | ||
const previousBuild = destr__default['default'](fs__default['default'].readFileSync(nuxtBuildFile, 'utf-8')) || {}; | ||
for (const field of ['nuxtVersion', 'ssr', 'target']) { | ||
if (previousBuild[field] !== currentBuild[field]) { | ||
// Quick diff | ||
let needBuild = false; | ||
for (const field of ['nuxtVersion', 'ssr', 'target', 'env', 'process.env']) { | ||
if (JSON.stringify(previousBuild[field]) !== JSON.stringify(currentBuild[field])) { | ||
needBuild = true; | ||
consola__default['default'].info(`Doing webpack rebuild because ${field} changed`); | ||
@@ -193,3 +211,3 @@ break | ||
// Full snapshot diff | ||
{ | ||
if (!needBuild) { | ||
const changed = compareSnapshots(previousBuild.snapshot, currentBuild.snapshot); | ||
@@ -350,2 +368,3 @@ if (!changed) { | ||
config.target = utils.TARGETS.static; | ||
consola__default['default'].warn(`For using \`nuxt generate\`, your have to set \`target: 'static'\` in your \`nuxt.config\`\n 👉 Learn more about it on https://go.nuxtjs.dev/static-target`); | ||
@@ -352,0 +371,0 @@ // Set flag to keep the prerendering behaviour |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -22,4 +22,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
require('fs'); | ||
require('execa'); | ||
require('fs'); | ||
@@ -26,0 +26,0 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -22,4 +22,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
require('fs'); | ||
require('execa'); | ||
require('fs'); | ||
require('pretty-bytes'); | ||
@@ -26,0 +26,0 @@ require('./cli-banner.js'); |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -22,4 +22,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
const fs = require('fs'); | ||
require('execa'); | ||
const fs = require('fs'); | ||
require('pretty-bytes'); | ||
@@ -26,0 +26,0 @@ const banner = require('./cli-banner.js'); |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -22,4 +22,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
require('fs'); | ||
require('execa'); | ||
require('fs'); | ||
const util = require('util'); | ||
@@ -26,0 +26,0 @@ |
/*! | ||
* @nuxt/cli v2.14.6 (c) 2016-2020 | ||
* @nuxt/cli v2.14.7 (c) 2016-2020 | ||
@@ -24,4 +24,4 @@ * - All the amazing contributors | ||
require('hable'); | ||
require('fs'); | ||
require('execa'); | ||
require('fs'); | ||
@@ -28,0 +28,0 @@ |
{ | ||
"name": "@nuxt/cli", | ||
"version": "2.14.6", | ||
"version": "2.14.7", | ||
"repository": "nuxt/nuxt.js", | ||
@@ -15,5 +15,5 @@ "license": "MIT", | ||
"dependencies": { | ||
"@nuxt/config": "2.14.6", | ||
"@nuxt/config": "2.14.7", | ||
"@nuxt/static": "^1.0.0", | ||
"@nuxt/utils": "2.14.6", | ||
"@nuxt/utils": "2.14.7", | ||
"boxen": "^4.2.0", | ||
@@ -37,3 +37,3 @@ "chalk": "^3.0.0", | ||
"std-env": "^2.2.1", | ||
"upath": "^1.2.0", | ||
"upath": "^2.0.0", | ||
"wrap-ansi": "^6.2.0" | ||
@@ -40,0 +40,0 @@ }, |
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
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
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
129273
4065
23
+ Added@nuxt/config@2.14.7(transitive)
+ Added@nuxt/utils@2.14.7(transitive)
+ Addedupath@2.0.1(transitive)
- Removed@nuxt/config@2.14.6(transitive)
- Removed@nuxt/utils@2.14.6(transitive)
- Removedupath@1.2.0(transitive)
Updated@nuxt/config@2.14.7
Updated@nuxt/utils@2.14.7
Updatedupath@^2.0.0