@nuxt/utils
Advanced tools
Comparing version 2.12.2 to 2.13.0
/*! | ||
* @nuxt/utils v2.12.2 (c) 2016-2020 | ||
* @nuxt/utils v2.13.0 (c) 2016-2020 | ||
@@ -14,3 +14,4 @@ * - All the amazing contributors | ||
const path = _interopDefault(require('path')); | ||
const path = require('path'); | ||
const path__default = _interopDefault(path); | ||
const consola = _interopDefault(require('consola')); | ||
@@ -24,2 +25,12 @@ const hash = _interopDefault(require('hash-sum')); | ||
const TARGETS = { | ||
server: 'server', | ||
static: 'static' | ||
}; | ||
const MODES = { | ||
universal: 'universal', | ||
spa: 'spa' | ||
}; | ||
const getContext = function getContext (req, res) { | ||
@@ -41,2 +52,6 @@ return { req, res } | ||
const isFullStatic = function (options) { | ||
return !options.dev && !options._legacyGenerate && options.target === TARGETS.static && options.render.ssr | ||
}; | ||
const encodeHtml = function encodeHtml (str) { | ||
@@ -101,3 +116,3 @@ return str.replace(/</g, '<').replace(/>/g, '>') | ||
return path.resolve(root, 'node_modules/.cache/nuxt', `${id}-lock-${sum}`) | ||
return path__default.resolve(root, 'node_modules/.cache/nuxt', `${id}-lock-${sum}`) | ||
} | ||
@@ -148,3 +163,3 @@ | ||
if (!lockPaths.size) { | ||
// make sure to always cleanup our temporate lockPaths | ||
// make sure to always cleanup our temporary lockPaths | ||
onExit(() => { | ||
@@ -518,3 +533,3 @@ for (const lockPath of lockPaths) { | ||
const reqSep = /\//g; | ||
const sysSep = escapeRegExp_1(path.sep); | ||
const sysSep = escapeRegExp_1(path__default.sep); | ||
const normalize = string => string.replace(reqSep, sysSep); | ||
@@ -529,3 +544,3 @@ | ||
return wp(path.resolve(...args.map(normalize))) | ||
return wp(path__default.resolve(...args.map(normalize))) | ||
}; | ||
@@ -552,5 +567,5 @@ | ||
// Make correct relative path | ||
let rp = path.relative(dir, resolvedPath); | ||
let rp = path__default.relative(dir, resolvedPath); | ||
if (rp[0] !== '.') { | ||
rp = '.' + path.sep + rp; | ||
rp = '.' + path__default.sep + rp; | ||
} | ||
@@ -1710,3 +1725,3 @@ | ||
dir1.startsWith(dir2) && | ||
!path.basename(dir1).startsWith(path.basename(dir2)) | ||
!path__default.basename(dir1).startsWith(path__default.basename(dir2)) | ||
) | ||
@@ -1976,3 +1991,3 @@ ) | ||
function getPKG (id) { | ||
return tryRequire(id + '/package.json') | ||
return tryRequire(path.join(id, 'package.json')) | ||
} | ||
@@ -2043,3 +2058,5 @@ | ||
exports.MODES = MODES; | ||
exports.ModernBrowsers = ModernBrowsers; | ||
exports.TARGETS = TARGETS; | ||
exports.Timer = Timer; | ||
@@ -2063,2 +2080,3 @@ exports.chainFn = chainFn; | ||
exports.isExternalDependency = isExternalDependency; | ||
exports.isFullStatic = isFullStatic; | ||
exports.isIndexFileAndFolder = isIndexFileAndFolder; | ||
@@ -2065,0 +2083,0 @@ exports.isModernBrowser = isModernBrowser; |
{ | ||
"name": "@nuxt/utils", | ||
"version": "2.12.2", | ||
"version": "2.13.0", | ||
"repository": "nuxt/nuxt.js", | ||
@@ -11,9 +11,9 @@ "license": "MIT", | ||
"dependencies": { | ||
"consola": "^2.11.3", | ||
"consola": "^2.13.0", | ||
"fs-extra": "^8.1.0", | ||
"hash-sum": "^2.0.0", | ||
"proper-lockfile": "^4.1.1", | ||
"semver": "^7.1.3", | ||
"serialize-javascript": "^3.0.0", | ||
"signal-exit": "^3.0.2", | ||
"semver": "^7.3.2", | ||
"serialize-javascript": "^4.0.0", | ||
"signal-exit": "^3.0.3", | ||
"ua-parser-js": "^0.7.21" | ||
@@ -20,0 +20,0 @@ }, |
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
53782
1817
+ Addedserialize-javascript@4.0.0(transitive)
- Removedserialize-javascript@3.1.0(transitive)
Updatedconsola@^2.13.0
Updatedsemver@^7.3.2
Updatedserialize-javascript@^4.0.0
Updatedsignal-exit@^3.0.3