@eggjs/utils
Advanced tools
+2
-2
@@ -31,3 +31,3 @@ import { __require } from "./_virtual/rolldown_runtime.js"; | ||
| const nodeMajorVersion = parseInt(process.versions.node.split(".", 1)[0], 10); | ||
| const supportImportMetaResolve = nodeMajorVersion >= 18; | ||
| const supportImportMetaResolve = nodeMajorVersion >= 18 && typeof import.meta !== "undefined" && typeof import.meta.resolve === "function"; | ||
| let _customRequire; | ||
@@ -227,3 +227,3 @@ function getRequire() { | ||
| if (!fs.statSync(moduleFilePath, { throwIfNoEntry: false })?.isFile()) throw new TypeError(`Cannot find module ${filepath}, because ${moduleFilePath} does not exists`); | ||
| } else moduleFilePath = getRequire().resolve(filepath); | ||
| } else moduleFilePath = getRequire().resolve(filepath, paths ? { paths } : void 0); | ||
| debug("[importResolve:success] %o, options: %o => %o, isESM: %s", filepath, options, moduleFilePath, isESM); | ||
@@ -230,0 +230,0 @@ return moduleFilePath; |
+2
-2
| { | ||
| "name": "@eggjs/utils", | ||
| "version": "5.0.2-beta.10", | ||
| "version": "5.0.2-beta.11", | ||
| "description": "Utils for all egg projects", | ||
@@ -32,3 +32,3 @@ "keywords": [ | ||
| "dependencies": { | ||
| "@eggjs/typings": "4.1.2-beta.10" | ||
| "@eggjs/typings": "4.1.2-beta.11" | ||
| }, | ||
@@ -35,0 +35,0 @@ "devDependencies": { |
34567
0.32%+ Added
- Removed
Updated