@vuepress/shared-utils
Advanced tools
Comparing version 1.0.0-alpha.47 to 1.0.0-alpha.48
@@ -8,4 +8,2 @@ "use strict"; | ||
const semver_1 = __importDefault(require("semver")); | ||
const upath_1 = __importDefault(require("upath")); | ||
const fs_extra_1 = __importDefault(require("fs-extra")); | ||
const env_1 = __importDefault(require("./env")); | ||
@@ -42,11 +40,4 @@ function resolveFallback(request, options) { | ||
let resolvedPath; | ||
// TODO | ||
// Temporary workaround for jest cannot resolve module path from '__mocks__' | ||
// when using 'require.resolve'. | ||
if (env_1.default.isTest && request !== '@vuepress/theme-default') { | ||
resolvedPath = upath_1.default.resolve(__dirname, '../../../../__mocks__', request); | ||
if (!fs_extra_1.default.existsSync(`${resolvedPath}.js`) && !fs_extra_1.default.existsSync(`${resolvedPath}/index.js`)) { | ||
throw new Error(`Cannot find module '${request}'`); | ||
} | ||
return resolvedPath; | ||
if (env_1.default.isTest) { | ||
return require.resolve(request); | ||
} | ||
@@ -53,0 +44,0 @@ // module.paths is for globally install packages. |
{ | ||
"name": "@vuepress/shared-utils", | ||
"version": "1.0.0-alpha.47", | ||
"version": "1.0.0-alpha.48", | ||
"description": "shared-utils for vuepress", | ||
@@ -33,7 +33,7 @@ "main": "lib/index.js", | ||
"escape-html": "^1.0.3", | ||
"fs-extra": "^5.0.0", | ||
"globby": "^8.0.1", | ||
"fs-extra": "^7.0.1", | ||
"globby": "^9.2.0", | ||
"gray-matter": "^4.0.1", | ||
"hash-sum": "^1.0.2", | ||
"semver": "^5.5.0", | ||
"semver": "^6.0.0", | ||
"upath": "^1.1.0" | ||
@@ -47,3 +47,3 @@ }, | ||
"homepage": "https://github.com/vuejs/vuepress/packages/@vuepress/shared-utils#readme", | ||
"gitHead": "78ce258b22f399eac7e16aa87bf06373f752e477" | ||
"gitHead": "ac7dca29f45cf893a6a6b3f35399c5c99b047da9" | ||
} |
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
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
42702
1148
+ Added@types/glob@7.2.0(transitive)
+ Added@types/minimatch@5.1.2(transitive)
+ Added@types/node@22.9.0(transitive)
+ Addeddir-glob@2.2.2(transitive)
+ Addedfs-extra@7.0.1(transitive)
+ Addedglobby@9.2.0(transitive)
+ Addedignore@4.0.6(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedslash@2.0.0(transitive)
+ Addedundici-types@6.19.8(transitive)
- Removedarrify@1.0.1(transitive)
- Removeddir-glob@2.0.0(transitive)
- Removedfs-extra@5.0.0(transitive)
- Removedglobby@8.0.2(transitive)
- Removedignore@3.3.10(transitive)
- Removedsemver@5.7.2(transitive)
- Removedslash@1.0.0(transitive)
Updatedfs-extra@^7.0.1
Updatedglobby@^9.2.0
Updatedsemver@^6.0.0