@modern-js/utils 2.58.2 → 2.58.3
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/alias.js +1 -1
- package/dist/cjs/cli/is/project.js +1 -1
- package/dist/cjs/cli/path.js +2 -2
- package/dist/cjs/cli/prettyInstructions.js +2 -2
- package/dist/cjs/cli/require.js +1 -1
- package/dist/esm/cli/alias.js +1 -1
- package/dist/esm/cli/get/data.js +1 -1
- package/dist/esm/cli/is/project.js +1 -1
- package/dist/esm/cli/path.js +2 -2
- package/dist/esm/cli/prettyInstructions.js +2 -2
- package/dist/esm/cli/require.js +1 -1
- package/dist/esm-node/cli/alias.js +1 -1
- package/dist/esm-node/cli/get/data.js +1 -1
- package/dist/esm-node/cli/is/project.js +1 -1
- package/dist/esm-node/cli/path.js +2 -2
- package/dist/esm-node/cli/prettyInstructions.js +2 -2
- package/dist/esm-node/cli/require.js +1 -1
- package/package.json +4 -4
package/dist/cjs/cli/alias.js
CHANGED
@@ -35,8 +35,8 @@ __export(alias_exports, {
|
|
35
35
|
module.exports = __toCommonJS(alias_exports);
|
36
36
|
var import_fs = __toESM(require("fs"));
|
37
37
|
var import_path = __toESM(require("path"));
|
38
|
-
var import_get = require("./get");
|
39
38
|
var import_applyOptionsChain = require("./applyOptionsChain");
|
39
|
+
var import_get = require("./get");
|
40
40
|
const mergeAlias = (alias) => (0, import_applyOptionsChain.applyOptionsChain)({}, alias);
|
41
41
|
const getAliasConfig = (aliasOption, option) => {
|
42
42
|
var _tsconfig_compilerOptions, _tsconfig_compilerOptions1;
|
@@ -39,8 +39,8 @@ __export(project_exports, {
|
|
39
39
|
module.exports = __toCommonJS(project_exports);
|
40
40
|
var import_path = __toESM(require("path"));
|
41
41
|
var import_pkg_up = __toESM(require("../../../compiled/pkg-up"));
|
42
|
-
var import_commands = require("../commands");
|
43
42
|
var import_compiled = require("../../compiled");
|
43
|
+
var import_commands = require("../commands");
|
44
44
|
var import_common = require("../common");
|
45
45
|
var import_ensure = require("../ensure");
|
46
46
|
const debug = (0, import_common.createDebugger)("judge-depExists");
|
package/dist/cjs/cli/path.js
CHANGED
@@ -41,9 +41,9 @@ __export(path_exports, {
|
|
41
41
|
splitPathString: () => splitPathString
|
42
42
|
});
|
43
43
|
module.exports = __toCommonJS(path_exports);
|
44
|
-
var import_path = __toESM(require("path"));
|
45
|
-
var import_os = __toESM(require("os"));
|
46
44
|
var import_fs = __toESM(require("fs"));
|
45
|
+
var import_os = __toESM(require("os"));
|
46
|
+
var import_path = __toESM(require("path"));
|
47
47
|
var import_compiled = require("../compiled");
|
48
48
|
const isPathString = (test) => import_path.default.posix.basename(test) !== test || import_path.default.win32.basename(test) !== test;
|
49
49
|
const isRelativePath = (test) => /^\.\.?($|[\\/])/.test(test);
|
@@ -32,11 +32,11 @@ __export(prettyInstructions_exports, {
|
|
32
32
|
prettyInstructions: () => prettyInstructions
|
33
33
|
});
|
34
34
|
module.exports = __toCommonJS(prettyInstructions_exports);
|
35
|
-
var import_os = __toESM(require("os"));
|
36
35
|
var import_net = require("net");
|
36
|
+
var import_os = __toESM(require("os"));
|
37
37
|
var import_compiled = require("../compiled");
|
38
|
-
var import_is = require("./is");
|
39
38
|
var import_constants = require("./constants");
|
39
|
+
var import_is = require("./is");
|
40
40
|
const normalizeUrl = (url) => url.replace(/([^:]\/)\/+/g, "$1");
|
41
41
|
const getIpv4Interfaces = () => {
|
42
42
|
const interfaces = import_os.default.networkInterfaces();
|
package/dist/cjs/cli/require.js
CHANGED
@@ -27,8 +27,8 @@ __export(require_exports, {
|
|
27
27
|
});
|
28
28
|
module.exports = __toCommonJS(require_exports);
|
29
29
|
var import_node_path = require("node:path");
|
30
|
-
var import_fs = require("./fs");
|
31
30
|
var import_node_url = require("node:url");
|
31
|
+
var import_fs = require("./fs");
|
32
32
|
async function compatibleRequire(path, interop = true) {
|
33
33
|
if (path.endsWith(".json")) {
|
34
34
|
return require(path);
|
package/dist/esm/cli/alias.js
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
2
2
|
import fs from "fs";
|
3
3
|
import path from "path";
|
4
|
-
import { readTsConfigByFile } from "./get";
|
5
4
|
import { applyOptionsChain } from "./applyOptionsChain";
|
5
|
+
import { readTsConfigByFile } from "./get";
|
6
6
|
var mergeAlias = function(alias) {
|
7
7
|
return applyOptionsChain({}, alias);
|
8
8
|
};
|
package/dist/esm/cli/get/data.js
CHANGED
@@ -4,7 +4,7 @@ import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
4
4
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
5
5
|
import os from "os";
|
6
6
|
import path from "path";
|
7
|
-
import {
|
7
|
+
import { fs, browserslist, json5 } from "../../compiled";
|
8
8
|
import { INTERNAL_CLI_PLUGINS } from "../constants";
|
9
9
|
import { isDepExists } from "../is";
|
10
10
|
import { canUsePnpm, canUseYarn } from "../package";
|
@@ -3,8 +3,8 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
3
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
4
4
|
import path from "path";
|
5
5
|
import pkgUp from "../../../compiled/pkg-up";
|
6
|
-
import { getArgv } from "../commands";
|
7
6
|
import { fs, minimist, semver } from "../../compiled";
|
7
|
+
import { getArgv } from "../commands";
|
8
8
|
import { createDebugger } from "../common";
|
9
9
|
import { ensureArray } from "../ensure";
|
10
10
|
var debug = createDebugger("judge-depExists");
|
package/dist/esm/cli/path.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
2
|
-
import path from "path";
|
3
|
-
import os from "os";
|
4
2
|
import fs from "fs";
|
3
|
+
import os from "os";
|
4
|
+
import path from "path";
|
5
5
|
import { nanoid, upath } from "../compiled";
|
6
6
|
var isPathString = function(test) {
|
7
7
|
return path.posix.basename(test) !== test || path.win32.basename(test) !== test;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
2
|
-
import os from "os";
|
3
2
|
import { isIPv6 } from "net";
|
3
|
+
import os from "os";
|
4
4
|
import { chalk } from "../compiled";
|
5
|
-
import { isDev, isSingleEntry } from "./is";
|
6
5
|
import { DEFAULT_DEV_HOST } from "./constants";
|
6
|
+
import { isDev, isSingleEntry } from "./is";
|
7
7
|
var normalizeUrl = function(url) {
|
8
8
|
return url.replace(/([^:]\/)\/+/g, "$1");
|
9
9
|
};
|
package/dist/esm/cli/require.js
CHANGED
@@ -3,8 +3,8 @@ import { _ as _instanceof } from "@swc/helpers/_/_instanceof";
|
|
3
3
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
4
4
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
5
5
|
import { isAbsolute } from "node:path";
|
6
|
-
import { findExists } from "./fs";
|
7
6
|
import { pathToFileURL } from "node:url";
|
7
|
+
import { findExists } from "./fs";
|
8
8
|
function compatibleRequire(path) {
|
9
9
|
return _compatibleRequire.apply(this, arguments);
|
10
10
|
}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import fs from "fs";
|
2
2
|
import path from "path";
|
3
|
-
import { readTsConfigByFile } from "./get";
|
4
3
|
import { applyOptionsChain } from "./applyOptionsChain";
|
4
|
+
import { readTsConfigByFile } from "./get";
|
5
5
|
const mergeAlias = (alias) => applyOptionsChain({}, alias);
|
6
6
|
const getAliasConfig = (aliasOption, option) => {
|
7
7
|
var _tsconfig_compilerOptions, _tsconfig_compilerOptions1;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import os from "os";
|
2
2
|
import path from "path";
|
3
|
-
import {
|
3
|
+
import { fs, browserslist, json5 } from "../../compiled";
|
4
4
|
import { INTERNAL_CLI_PLUGINS } from "../constants";
|
5
5
|
import { isDepExists } from "../is";
|
6
6
|
import { canUsePnpm, canUseYarn } from "../package";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import path from "path";
|
2
2
|
import pkgUp from "../../../compiled/pkg-up";
|
3
|
-
import { getArgv } from "../commands";
|
4
3
|
import { fs, minimist, semver } from "../../compiled";
|
4
|
+
import { getArgv } from "../commands";
|
5
5
|
import { createDebugger } from "../common";
|
6
6
|
import { ensureArray } from "../ensure";
|
7
7
|
const debug = createDebugger("judge-depExists");
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import path from "path";
|
2
|
-
import os from "os";
|
3
1
|
import fs from "fs";
|
2
|
+
import os from "os";
|
3
|
+
import path from "path";
|
4
4
|
import { nanoid, upath } from "../compiled";
|
5
5
|
const isPathString = (test) => path.posix.basename(test) !== test || path.win32.basename(test) !== test;
|
6
6
|
const isRelativePath = (test) => /^\.\.?($|[\\/])/.test(test);
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import os from "os";
|
2
1
|
import { isIPv6 } from "net";
|
2
|
+
import os from "os";
|
3
3
|
import { chalk } from "../compiled";
|
4
|
-
import { isDev, isSingleEntry } from "./is";
|
5
4
|
import { DEFAULT_DEV_HOST } from "./constants";
|
5
|
+
import { isDev, isSingleEntry } from "./is";
|
6
6
|
const normalizeUrl = (url) => url.replace(/([^:]\/)\/+/g, "$1");
|
7
7
|
const getIpv4Interfaces = () => {
|
8
8
|
const interfaces = os.networkInterfaces();
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { isAbsolute } from "node:path";
|
2
|
-
import { findExists } from "./fs";
|
3
2
|
import { pathToFileURL } from "node:url";
|
3
|
+
import { findExists } from "./fs";
|
4
4
|
async function compatibleRequire(path, interop = true) {
|
5
5
|
if (path.endsWith(".json")) {
|
6
6
|
return require(path);
|
package/package.json
CHANGED
@@ -15,7 +15,7 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.58.
|
18
|
+
"version": "2.58.3",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -162,9 +162,9 @@
|
|
162
162
|
"jest": "^29",
|
163
163
|
"typescript": "^5",
|
164
164
|
"webpack": "^5.93.0",
|
165
|
-
"@
|
166
|
-
"@scripts/
|
167
|
-
"@
|
165
|
+
"@modern-js/types": "2.58.3",
|
166
|
+
"@scripts/build": "2.58.3",
|
167
|
+
"@scripts/jest-config": "2.58.3"
|
168
168
|
},
|
169
169
|
"sideEffects": false,
|
170
170
|
"scripts": {
|