Socket
Socket
Sign inDemoInstall

@nuxt/utils

Package Overview
Dependencies
Maintainers
4
Versions
62
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuxt/utils - npm Package Compare versions

Comparing version 2.9.2 to 2.10.0

33

dist/utils.js
/*!
* @nuxt/utils v2.9.2 (c) 2016-2019
* @nuxt/utils v2.10.0 (c) 2016-2019

@@ -1639,3 +1639,4 @@ * - All the amazing contributors

routeNameSplitter = '-',
supportedExtensions = ['vue', 'js']
supportedExtensions = ['vue', 'js'],
trailingSlash
}) {

@@ -1677,2 +1678,7 @@ const routes = [];

});
if (trailingSlash !== undefined) {
route.pathToRegexpOptions = { ...route.pathToRegexpOptions, strict: true };
route.path = route.path.replace(/\/+$/, '') + (trailingSlash ? '/' : '');
}
parent.push(route);

@@ -1899,5 +1905,9 @@ });

function isExternalDependency (id) {
return /[/\\]node_modules[/\\]/.test(id)
}
function clearRequireCache (id) {
const entry = require.cache[id];
if (!entry || id.includes('node_modules')) {
if (!entry || isExternalDependency(id)) {
return

@@ -1919,3 +1929,3 @@ }

const entry = require.cache[id];
if (!entry || id.includes('node_modules') || files.has(id)) {
if (!entry || isExternalDependency(id) || files.has(id)) {
return files

@@ -1933,2 +1943,13 @@ }

function tryRequire (id) {
try {
return require(id)
} catch (e) {
}
}
function getPKG (id) {
return tryRequire(id + '/package.json')
}
const ModernBrowsers = {

@@ -1998,3 +2019,5 @@ Edge: '16',

exports.getMainModule = getMainModule;
exports.getPKG = getPKG;
exports.guardDir = guardDir;
exports.isExternalDependency = isExternalDependency;
exports.isIndexFileAndFolder = isIndexFileAndFolder;

@@ -2019,2 +2042,3 @@ exports.isModernBrowser = isModernBrowser;

exports.serializeFunction = serializeFunction;
exports.sortRoutes = sortRoutes;
exports.startsWithAlias = startsWithAlias;

@@ -2025,2 +2049,3 @@ exports.startsWithRootAlias = startsWithRootAlias;

exports.timeout = timeout;
exports.tryRequire = tryRequire;
exports.urlJoin = urlJoin;

@@ -2027,0 +2052,0 @@ exports.wChunk = wChunk;

4

package.json
{
"name": "@nuxt/utils",
"version": "2.9.2",
"version": "2.10.0",
"repository": "nuxt/nuxt.js",

@@ -16,3 +16,3 @@ "license": "MIT",

"semver": "^6.3.0",
"serialize-javascript": "^1.8.0",
"serialize-javascript": "^2.1.0",
"signal-exit": "^3.0.2",

@@ -19,0 +19,0 @@ "ua-parser-js": "^0.7.20"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc