@bleedingdev/modern-js-utils 3.9.0-ultramodern.17 → 3.9.0-ultramodern.19
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/cjs/cli/require.js +1 -5
- package/dist/cjs/compiled.js +1 -9
- package/dist/esm/cli/require.mjs +1 -2
- package/dist/esm/compiled.mjs +1 -10
- package/dist/esm-node/cli/require.mjs +1 -2
- package/dist/esm-node/compiled.mjs +1 -9
- package/dist/types/cli/common.d.ts +1 -1
- package/dist/types/cli/require.d.ts +0 -1
- package/dist/types/compiled.d.ts +20 -20
- package/package.json +3 -3
- package/dist/esm/rslib-runtime~1.mjs +0 -12
package/dist/cjs/cli/require.js
CHANGED
|
@@ -30,7 +30,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
30
30
|
__webpack_require__.d(__webpack_exports__, {
|
|
31
31
|
cleanRequireCache: ()=>cleanRequireCache,
|
|
32
32
|
compatibleRequire: ()=>compatibleRequire,
|
|
33
|
-
dynamicImport: ()=>dynamicImport,
|
|
34
33
|
loadFromProject: ()=>loadFromProject,
|
|
35
34
|
requireExistModule: ()=>requireExistModule,
|
|
36
35
|
tryResolve: ()=>tryResolve
|
|
@@ -67,7 +66,7 @@ async function compatibleRequireCJS(path, interop = true) {
|
|
|
67
66
|
const requiredModule = require(path);
|
|
68
67
|
return interop && requiredModule?.__esModule ? requiredModule.default : requiredModule;
|
|
69
68
|
} catch (err) {
|
|
70
|
-
if ('ERR_REQUIRE_ESM' === err.code) return await compatibleRequireESM(path, interop);
|
|
69
|
+
if ('ERR_REQUIRE_ESM' === err.code || 'ERR_REQUIRE_ASYNC_MODULE' === err.code) return await compatibleRequireESM(path, interop);
|
|
71
70
|
else throw err;
|
|
72
71
|
}
|
|
73
72
|
}
|
|
@@ -89,7 +88,6 @@ async function loadFromProject(moduleName, appDir) {
|
|
|
89
88
|
throw error;
|
|
90
89
|
}
|
|
91
90
|
}
|
|
92
|
-
const dynamicImport = new Function('modulePath', 'return import(modulePath)');
|
|
93
91
|
const requireExistModule = async (filename, opt)=>{
|
|
94
92
|
const final = {
|
|
95
93
|
extensions: [
|
|
@@ -123,14 +121,12 @@ const tryResolve = (name, ...resolvePath)=>{
|
|
|
123
121
|
};
|
|
124
122
|
exports.cleanRequireCache = __webpack_exports__.cleanRequireCache;
|
|
125
123
|
exports.compatibleRequire = __webpack_exports__.compatibleRequire;
|
|
126
|
-
exports.dynamicImport = __webpack_exports__.dynamicImport;
|
|
127
124
|
exports.loadFromProject = __webpack_exports__.loadFromProject;
|
|
128
125
|
exports.requireExistModule = __webpack_exports__.requireExistModule;
|
|
129
126
|
exports.tryResolve = __webpack_exports__.tryResolve;
|
|
130
127
|
for(var __rspack_i in __webpack_exports__)if (-1 === [
|
|
131
128
|
"cleanRequireCache",
|
|
132
129
|
"compatibleRequire",
|
|
133
|
-
"dynamicImport",
|
|
134
130
|
"loadFromProject",
|
|
135
131
|
"requireExistModule",
|
|
136
132
|
"tryResolve"
|
package/dist/cjs/compiled.js
CHANGED
|
@@ -129,15 +129,7 @@ var url_join_index_js_default = /*#__PURE__*/ __webpack_require__.n(url_join_ind
|
|
|
129
129
|
const chokidar_index_js_namespaceObject = require("../compiled/chokidar/index.js");
|
|
130
130
|
var chokidar_index_js_default = /*#__PURE__*/ __webpack_require__.n(chokidar_index_js_namespaceObject);
|
|
131
131
|
const { Signale } = signale_index_js_default();
|
|
132
|
-
const getNodeRequire = ()=>
|
|
133
|
-
try {
|
|
134
|
-
return /*#__PURE__*/ (0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
|
|
135
|
-
} catch {
|
|
136
|
-
if ('object' == typeof global && 'function' == typeof global.require) return global.require;
|
|
137
|
-
if ('object' == typeof globalThis && 'function' == typeof globalThis.require) return globalThis.require;
|
|
138
|
-
throw new Error('Unable to resolve require function for lazy compiled imports');
|
|
139
|
-
}
|
|
140
|
-
};
|
|
132
|
+
const getNodeRequire = ()=>(0, external_node_module_namespaceObject.createRequire)(__rslib_import_meta_url__);
|
|
141
133
|
const mime = external_import_js_namespaceObject.Import.lazy('../compiled/mime-types', getNodeRequire);
|
|
142
134
|
const chokidar = chokidar_index_js_default();
|
|
143
135
|
const inquirer = external_import_js_namespaceObject.Import.lazy('../compiled/inquirer', getNodeRequire);
|
package/dist/esm/cli/require.mjs
CHANGED
|
@@ -46,7 +46,6 @@ async function loadFromProject(moduleName, appDir) {
|
|
|
46
46
|
throw error;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
const dynamicImport = new Function('modulePath', 'return import(modulePath)');
|
|
50
49
|
const requireExistModule = async (filename, opt)=>{
|
|
51
50
|
const final = {
|
|
52
51
|
extensions: [
|
|
@@ -85,4 +84,4 @@ const tryResolve = (name, ...resolvePath)=>{
|
|
|
85
84
|
}
|
|
86
85
|
return filePath;
|
|
87
86
|
};
|
|
88
|
-
export { cleanRequireCache, compatibleRequire,
|
|
87
|
+
export { cleanRequireCache, compatibleRequire, loadFromProject, requireExistModule, tryResolve };
|
package/dist/esm/compiled.mjs
CHANGED
|
@@ -1,19 +1,10 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
2
|
import { Import } from "./import.mjs";
|
|
3
|
-
import { __webpack_require__ } from "./rslib-runtime~1.mjs";
|
|
4
3
|
import chokidar from "../compiled/chokidar/index.js";
|
|
5
4
|
import signale from "../compiled/signale/index.js";
|
|
6
5
|
import * as __rspack_external__compiled_js_yaml_index_mjs_019e8284 from "../compiled/js-yaml/index.mjs";
|
|
7
6
|
const { Signale: Signale } = signale;
|
|
8
|
-
const getNodeRequire = ()=>
|
|
9
|
-
try {
|
|
10
|
-
return /*#__PURE__*/ createRequire(import.meta.url);
|
|
11
|
-
} catch {
|
|
12
|
-
if ('object' == typeof __webpack_require__.g && 'function' == typeof __webpack_require__.g.require) return __webpack_require__.g.require;
|
|
13
|
-
if ('object' == typeof globalThis && 'function' == typeof globalThis.require) return globalThis.require;
|
|
14
|
-
throw new Error('Unable to resolve require function for lazy compiled imports');
|
|
15
|
-
}
|
|
16
|
-
};
|
|
7
|
+
const getNodeRequire = ()=>createRequire(import.meta.url);
|
|
17
8
|
const mime = Import.lazy('../compiled/mime-types', getNodeRequire);
|
|
18
9
|
const compiled_chokidar = chokidar;
|
|
19
10
|
const inquirer = Import.lazy('../compiled/inquirer', getNodeRequire);
|
|
@@ -47,7 +47,6 @@ async function loadFromProject(moduleName, appDir) {
|
|
|
47
47
|
throw error;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
const dynamicImport = new Function('modulePath', 'return import(modulePath)');
|
|
51
50
|
const requireExistModule = async (filename, opt)=>{
|
|
52
51
|
const final = {
|
|
53
52
|
extensions: [
|
|
@@ -86,4 +85,4 @@ const tryResolve = (name, ...resolvePath)=>{
|
|
|
86
85
|
}
|
|
87
86
|
return filePath;
|
|
88
87
|
};
|
|
89
|
-
export { cleanRequireCache, compatibleRequire,
|
|
88
|
+
export { cleanRequireCache, compatibleRequire, loadFromProject, requireExistModule, tryResolve };
|
|
@@ -5,15 +5,7 @@ import chokidar from "../compiled/chokidar/index.js";
|
|
|
5
5
|
import signale from "../compiled/signale/index.js";
|
|
6
6
|
import * as __rspack_external__compiled_js_yaml_index_mjs_019e8284 from "../compiled/js-yaml/index.mjs";
|
|
7
7
|
const { Signale: Signale } = signale;
|
|
8
|
-
const getNodeRequire = ()=>
|
|
9
|
-
try {
|
|
10
|
-
return /*#__PURE__*/ createRequire(import.meta.url);
|
|
11
|
-
} catch {
|
|
12
|
-
if ('object' == typeof global && 'function' == typeof global.require) return global.require;
|
|
13
|
-
if ('object' == typeof globalThis && 'function' == typeof globalThis.require) return globalThis.require;
|
|
14
|
-
throw new Error('Unable to resolve require function for lazy compiled imports');
|
|
15
|
-
}
|
|
16
|
-
};
|
|
8
|
+
const getNodeRequire = ()=>createRequire(import.meta.url);
|
|
17
9
|
const mime = Import.lazy('../compiled/mime-types', getNodeRequire);
|
|
18
10
|
const compiled_chokidar = chokidar;
|
|
19
11
|
const inquirer = Import.lazy('../compiled/inquirer', getNodeRequire);
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
export declare function compatibleRequire(path: string, interop?: boolean): Promise<any>;
|
|
2
2
|
export declare function loadFromProject(moduleName: string, appDir: string): Promise<any>;
|
|
3
|
-
export declare const dynamicImport: Function;
|
|
4
3
|
export declare const requireExistModule: (filename: string, opt?: {
|
|
5
4
|
extensions?: string[];
|
|
6
5
|
interop?: boolean;
|
package/dist/types/compiled.d.ts
CHANGED
|
@@ -2,36 +2,36 @@ export { default as address } from '../compiled/address';
|
|
|
2
2
|
export { default as browserslist } from '../compiled/browserslist';
|
|
3
3
|
export { default as chalk } from '../compiled/chalk';
|
|
4
4
|
export { Command, program } from '../compiled/commander';
|
|
5
|
-
export { default as debug } from '../compiled/debug';
|
|
5
|
+
export { default as debug } from '../compiled/debug/index.js';
|
|
6
6
|
export { default as dotenv } from '../compiled/dotenv';
|
|
7
7
|
export { default as dotenvExpand } from '../compiled/dotenv-expand';
|
|
8
|
-
export { default as execa } from '../compiled/execa';
|
|
8
|
+
export { default as execa } from '../compiled/execa/index.js';
|
|
9
9
|
export { default as fastGlob } from '../compiled/fast-glob';
|
|
10
10
|
export { default as filesize } from '../compiled/filesize';
|
|
11
|
-
export { default as fs } from '../compiled/fs-extra';
|
|
11
|
+
export { default as fs } from '../compiled/fs-extra/index.js';
|
|
12
12
|
export { default as glob } from '../compiled/glob';
|
|
13
|
-
export { default as globby } from '../compiled/globby';
|
|
14
|
-
export { default as gzipSize } from '../compiled/gzip-size';
|
|
15
|
-
export * as yaml from '../compiled/js-yaml';
|
|
13
|
+
export { default as globby } from '../compiled/globby/index.js';
|
|
14
|
+
export { default as gzipSize } from '../compiled/gzip-size/index.js';
|
|
15
|
+
export * as yaml from '../compiled/js-yaml/index.js';
|
|
16
16
|
export { default as json5 } from '../compiled/json5';
|
|
17
|
-
export { default as lodash } from '../compiled/lodash';
|
|
18
|
-
export { default as minimist } from '../compiled/minimist';
|
|
19
|
-
export { nanoid } from '../compiled/nanoid';
|
|
20
|
-
export { default as ora } from '../compiled/ora';
|
|
17
|
+
export { default as lodash } from '../compiled/lodash/index.js';
|
|
18
|
+
export { default as minimist } from '../compiled/minimist/index.js';
|
|
19
|
+
export { nanoid } from '../compiled/nanoid/index.js';
|
|
20
|
+
export { default as ora } from '../compiled/ora/index.js';
|
|
21
21
|
export { default as pkgUp } from '../compiled/pkg-up/index.js';
|
|
22
|
-
export { default as semver } from '../compiled/semver';
|
|
23
|
-
export { default as signale } from '../compiled/signale';
|
|
24
|
-
export { default as slash } from '../compiled/slash';
|
|
25
|
-
export { default as stripAnsi } from '../compiled/strip-ansi';
|
|
22
|
+
export { default as semver } from '../compiled/semver/index.js';
|
|
23
|
+
export { default as signale } from '../compiled/signale/index.js';
|
|
24
|
+
export { default as slash } from '../compiled/slash/index.js';
|
|
25
|
+
export { default as stripAnsi } from '../compiled/strip-ansi/index.js';
|
|
26
26
|
export { default as upath } from '../compiled/upath';
|
|
27
|
-
export { default as urlJoin } from '../compiled/url-join';
|
|
28
|
-
import _signale from '../compiled/signale';
|
|
27
|
+
export { default as urlJoin } from '../compiled/url-join/index.js';
|
|
28
|
+
import _signale from '../compiled/signale/index.js';
|
|
29
29
|
export declare const Signale: _signale.SignaleConstructor;
|
|
30
30
|
export type { FSWatcher, WatchOptions } from '../compiled/chokidar';
|
|
31
|
-
export type { ExecaError } from '../compiled/execa';
|
|
31
|
+
export type { ExecaError } from '../compiled/execa/index.js';
|
|
32
32
|
export type { IOptions as GlobOptions } from '../compiled/glob';
|
|
33
|
-
export type { GlobbyOptions } from '../compiled/globby';
|
|
34
|
-
export type { SignaleOptions } from '../compiled/signale';
|
|
35
|
-
export declare const mime: typeof import('../compiled/mime-types');
|
|
33
|
+
export type { GlobbyOptions } from '../compiled/globby/index.js';
|
|
34
|
+
export type { SignaleOptions } from '../compiled/signale/index.js';
|
|
35
|
+
export declare const mime: typeof import('../compiled/mime-types/index.js');
|
|
36
36
|
export declare const chokidar: typeof import('../compiled/chokidar');
|
|
37
37
|
export declare const inquirer: typeof import('../compiled/inquirer');
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"modern",
|
|
18
18
|
"modern.js"
|
|
19
19
|
],
|
|
20
|
-
"version": "3.9.0-ultramodern.
|
|
20
|
+
"version": "3.9.0-ultramodern.19",
|
|
21
21
|
"types": "./dist/types/index.d.ts",
|
|
22
22
|
"main": "./dist/cjs/index.js",
|
|
23
23
|
"module": "./dist/esm/index.mjs",
|
|
@@ -187,7 +187,7 @@
|
|
|
187
187
|
"rslog": "^2.3.0"
|
|
188
188
|
},
|
|
189
189
|
"devDependencies": {
|
|
190
|
-
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.
|
|
190
|
+
"@modern-js/types": "npm:@bleedingdev/modern-js-types@3.9.0-ultramodern.19",
|
|
191
191
|
"@rslib/core": "1.0.2",
|
|
192
192
|
"@scripts/rstest-config": "2.66.0",
|
|
193
193
|
"@types/node": "^26.6.2",
|
|
@@ -211,6 +211,6 @@
|
|
|
211
211
|
"scripts": {
|
|
212
212
|
"dev": "rslib build --watch",
|
|
213
213
|
"build": "rslib build",
|
|
214
|
-
"test": "rstest
|
|
214
|
+
"test": "rstest"
|
|
215
215
|
}
|
|
216
216
|
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
var __webpack_require__ = {};
|
|
2
|
-
(()=>{
|
|
3
|
-
__webpack_require__.g = (()=>{
|
|
4
|
-
if ('object' == typeof globalThis) return globalThis;
|
|
5
|
-
try {
|
|
6
|
-
return this || new Function('return this')();
|
|
7
|
-
} catch (e) {
|
|
8
|
-
if ('object' == typeof window) return window;
|
|
9
|
-
}
|
|
10
|
-
})();
|
|
11
|
-
})();
|
|
12
|
-
export { __webpack_require__ };
|