@eggjs/utils 4.5.0-beta.3 → 4.5.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/import.d.ts +2 -1
- package/dist/import.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +3 -2
package/dist/import.d.ts
CHANGED
|
@@ -6,9 +6,10 @@ interface ImportModuleOptions extends ImportResolveOptions {
|
|
|
6
6
|
importDefaultOnly?: boolean;
|
|
7
7
|
}
|
|
8
8
|
declare let isESM: boolean;
|
|
9
|
+
declare function getRequire(): NodeRequire;
|
|
9
10
|
declare function getExtensions(): NodeJS.RequireExtensions;
|
|
10
11
|
declare function isSupportTypeScript(): boolean;
|
|
11
12
|
declare function importResolve(filepath: string, options?: ImportResolveOptions): string;
|
|
12
13
|
declare function importModule(filepath: string, options?: ImportModuleOptions): Promise<any>;
|
|
13
14
|
//#endregion
|
|
14
|
-
export { ImportModuleOptions, ImportResolveOptions, getExtensions, importModule, importResolve, isESM, isSupportTypeScript };
|
|
15
|
+
export { ImportModuleOptions, ImportResolveOptions, getExtensions, getRequire, importModule, importResolve, isESM, isSupportTypeScript };
|
package/dist/import.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getFrameworkPath } from "./framework.js";
|
|
2
2
|
import { findEggCore, getConfig, getLoadUnits, getLoader, getPlugins } from "./plugin.js";
|
|
3
3
|
import { getFrameworkOrEggPath } from "./deprecated.js";
|
|
4
|
-
import { ImportModuleOptions, ImportResolveOptions, getExtensions, importModule, importResolve, isESM, isSupportTypeScript } from "./import.js";
|
|
4
|
+
import { ImportModuleOptions, ImportResolveOptions, getExtensions, getRequire, importModule, importResolve, isESM, isSupportTypeScript } from "./import.js";
|
|
5
5
|
import { ImportResolveError } from "./error/ImportResolveError.js";
|
|
6
6
|
|
|
7
7
|
//#region src/index.d.ts
|
|
@@ -25,4 +25,4 @@ type EggType = (typeof EggType)[keyof typeof EggType];
|
|
|
25
25
|
*/
|
|
26
26
|
declare function detectType(baseDir: string): Promise<keyof typeof EggType>;
|
|
27
27
|
//#endregion
|
|
28
|
-
export { EggType, ImportModuleOptions, ImportResolveError, ImportResolveOptions, _default as default, detectType, findEggCore, getConfig, getExtensions, getFrameworkOrEggPath, getFrameworkPath, getLoadUnits, getLoader, getPlugins, importModule, importResolve, isESM, isSupportTypeScript };
|
|
28
|
+
export { EggType, ImportModuleOptions, ImportResolveError, ImportResolveOptions, _default as default, detectType, findEggCore, getConfig, getExtensions, getFrameworkOrEggPath, getFrameworkPath, getLoadUnits, getLoader, getPlugins, getRequire, importModule, importResolve, isESM, isSupportTypeScript };
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ImportResolveError } from "./error/ImportResolveError.js";
|
|
2
|
-
import { getExtensions, importModule, importResolve, isESM, isSupportTypeScript } from "./import.js";
|
|
2
|
+
import { getExtensions, getRequire, importModule, importResolve, isESM, isSupportTypeScript } from "./import.js";
|
|
3
3
|
import { getFrameworkPath } from "./framework.js";
|
|
4
4
|
import { findEggCore, getConfig, getLoadUnits, getLoader, getPlugins } from "./plugin.js";
|
|
5
5
|
import { getFrameworkOrEggPath } from "./deprecated.js";
|
|
@@ -42,4 +42,4 @@ async function detectType(baseDir) {
|
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
//#endregion
|
|
45
|
-
export { EggType, ImportResolveError, src_default as default, detectType, findEggCore, getConfig, getExtensions, getFrameworkOrEggPath, getFrameworkPath, getLoadUnits, getLoader, getPlugins, importModule, importResolve, isESM, isSupportTypeScript };
|
|
45
|
+
export { EggType, ImportResolveError, src_default as default, detectType, findEggCore, getConfig, getExtensions, getFrameworkOrEggPath, getFrameworkPath, getLoadUnits, getLoader, getPlugins, getRequire, importModule, importResolve, isESM, isSupportTypeScript };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eggjs/utils",
|
|
3
|
-
"version": "4.5.0-beta.
|
|
3
|
+
"version": "4.5.0-beta.4",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">= 20.19.0"
|
|
6
6
|
},
|
|
@@ -37,11 +37,12 @@
|
|
|
37
37
|
"mm": "^4.0.2",
|
|
38
38
|
"runscript": "^2.0.1",
|
|
39
39
|
"tsdown": "^0.15.0",
|
|
40
|
-
"typescript": "5"
|
|
40
|
+
"typescript": "5.9.2"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "tsdown",
|
|
44
44
|
"lint": "oxlint --type-aware",
|
|
45
|
+
"typecheck": "tsc --noEmit",
|
|
45
46
|
"test": "vitest run"
|
|
46
47
|
}
|
|
47
48
|
}
|