@modern-js/server-utils 2.58.2 → 2.59.0
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/compilers/babel/index.js +1 -1
- package/dist/cjs/compilers/babel/preset/alias.js +1 -1
- package/dist/cjs/compilers/typescript/index.js +1 -1
- package/dist/cjs/compilers/typescript/tsconfigPathsPlugin.js +1 -1
- package/dist/esm/compilers/babel/index.js +2 -2
- package/dist/esm/compilers/babel/preset/alias.js +1 -1
- package/dist/esm/compilers/typescript/index.js +2 -2
- package/dist/esm/compilers/typescript/tsconfigPathsPlugin.js +1 -1
- package/dist/esm-node/compilers/babel/index.js +2 -2
- package/dist/esm-node/compilers/babel/preset/alias.js +1 -1
- package/dist/esm-node/compilers/typescript/index.js +2 -2
- package/dist/esm-node/compilers/typescript/tsconfigPathsPlugin.js +1 -1
- package/package.json +8 -8
|
@@ -36,8 +36,8 @@ __export(babel_exports, {
|
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(babel_exports);
|
|
38
38
|
var path = __toESM(require("path"));
|
|
39
|
-
var import_utils = require("@modern-js/utils");
|
|
40
39
|
var import_babel_compiler = require("@modern-js/babel-compiler");
|
|
40
|
+
var import_utils = require("@modern-js/utils");
|
|
41
41
|
var import_common = require("../../common");
|
|
42
42
|
var import_preset = require("./preset");
|
|
43
43
|
__reExport(babel_exports, require("@babel/core"), module.exports);
|
|
@@ -32,8 +32,8 @@ __export(alias_exports, {
|
|
|
32
32
|
});
|
|
33
33
|
module.exports = __toCommonJS(alias_exports);
|
|
34
34
|
var import_path = __toESM(require("path"));
|
|
35
|
-
var import_tsconfig_paths = require("@modern-js/utils/tsconfig-paths");
|
|
36
35
|
var import_utils = require("@modern-js/utils");
|
|
36
|
+
var import_tsconfig_paths = require("@modern-js/utils/tsconfig-paths");
|
|
37
37
|
const { resolvePath } = require("@modern-js/babel-plugin-module-resolver");
|
|
38
38
|
const defaultPaths = {
|
|
39
39
|
"@": [
|
|
@@ -33,8 +33,8 @@ __export(typescript_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(typescript_exports);
|
|
34
34
|
var import_path = __toESM(require("path"));
|
|
35
35
|
var import_utils = require("@modern-js/utils");
|
|
36
|
-
var import_typescriptLoader = require("./typescriptLoader");
|
|
37
36
|
var import_tsconfigPathsPlugin = require("./tsconfigPathsPlugin");
|
|
37
|
+
var import_typescriptLoader = require("./typescriptLoader");
|
|
38
38
|
const readTsConfigByFile = (tsConfigFile, tsInstance) => {
|
|
39
39
|
const parsedCmd = tsInstance.getParsedCommandLineOfConfigFile(tsConfigFile, void 0, tsInstance.sys);
|
|
40
40
|
const { options, fileNames, projectReferences } = parsedCmd;
|
|
@@ -33,8 +33,8 @@ __export(tsconfigPathsPlugin_exports, {
|
|
|
33
33
|
module.exports = __toCommonJS(tsconfigPathsPlugin_exports);
|
|
34
34
|
var os = __toESM(require("os"));
|
|
35
35
|
var import_path = __toESM(require("path"));
|
|
36
|
-
var ts = __toESM(require("typescript"));
|
|
37
36
|
var import_tsconfig_paths = require("@modern-js/utils/tsconfig-paths");
|
|
37
|
+
var ts = __toESM(require("typescript"));
|
|
38
38
|
const isRegExpKey = (str) => {
|
|
39
39
|
return str.startsWith("^") || str.endsWith("$");
|
|
40
40
|
};
|
|
@@ -2,10 +2,10 @@ import { _ as _async_to_generator } from "@swc/helpers/_/_async_to_generator";
|
|
|
2
2
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
3
|
import { _ as _ts_generator } from "@swc/helpers/_/_ts_generator";
|
|
4
4
|
import * as path from "path";
|
|
5
|
-
import { fs, json5, getAliasConfig } from "@modern-js/utils";
|
|
6
5
|
import { compiler } from "@modern-js/babel-compiler";
|
|
6
|
+
import { fs, getAliasConfig, json5 } from "@modern-js/utils";
|
|
7
7
|
import { FILE_EXTENSIONS } from "../../common";
|
|
8
|
-
import {
|
|
8
|
+
import { applyUserBabelConfig, getBabelConfig } from "./preset";
|
|
9
9
|
export * from "@babel/core";
|
|
10
10
|
var readTsConfig = function(tsconfigPath) {
|
|
11
11
|
var noExistReturn = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null;
|
|
@@ -2,8 +2,8 @@ import { _ as _define_property } from "@swc/helpers/_/_define_property";
|
|
|
2
2
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
3
3
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
4
4
|
import path from "path";
|
|
5
|
-
import { createMatchPath } from "@modern-js/utils/tsconfig-paths";
|
|
6
5
|
import { getUserAlias } from "@modern-js/utils";
|
|
6
|
+
import { createMatchPath } from "@modern-js/utils/tsconfig-paths";
|
|
7
7
|
var resolvePath = require("@modern-js/babel-plugin-module-resolver").resolvePath;
|
|
8
8
|
var defaultPaths = {
|
|
9
9
|
"@": [
|
|
@@ -3,9 +3,9 @@ import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
|
3
3
|
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 path from "path";
|
|
6
|
-
import {
|
|
7
|
-
import { TypescriptLoader } from "./typescriptLoader";
|
|
6
|
+
import { fs, getAliasConfig, logger } from "@modern-js/utils";
|
|
8
7
|
import { tsconfigPathsBeforeHookFactory } from "./tsconfigPathsPlugin";
|
|
8
|
+
import { TypescriptLoader } from "./typescriptLoader";
|
|
9
9
|
var readTsConfigByFile = function(tsConfigFile, tsInstance) {
|
|
10
10
|
var parsedCmd = tsInstance.getParsedCommandLineOfConfigFile(tsConfigFile, void 0, tsInstance.sys);
|
|
11
11
|
var options = parsedCmd.options, fileNames = parsedCmd.fileNames, projectReferences = parsedCmd.projectReferences;
|
|
@@ -3,8 +3,8 @@ import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
|
3
3
|
import { _ as _to_consumable_array } from "@swc/helpers/_/_to_consumable_array";
|
|
4
4
|
import * as os from "os";
|
|
5
5
|
import path, { dirname, posix } from "path";
|
|
6
|
-
import * as ts from "typescript";
|
|
7
6
|
import { createMatchPath } from "@modern-js/utils/tsconfig-paths";
|
|
7
|
+
import * as ts from "typescript";
|
|
8
8
|
var isRegExpKey = function(str) {
|
|
9
9
|
return str.startsWith("^") || str.endsWith("$");
|
|
10
10
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as path from "path";
|
|
2
|
-
import { fs, json5, getAliasConfig } from "@modern-js/utils";
|
|
3
2
|
import { compiler } from "@modern-js/babel-compiler";
|
|
3
|
+
import { fs, getAliasConfig, json5 } from "@modern-js/utils";
|
|
4
4
|
import { FILE_EXTENSIONS } from "../../common";
|
|
5
|
-
import {
|
|
5
|
+
import { applyUserBabelConfig, getBabelConfig } from "./preset";
|
|
6
6
|
export * from "@babel/core";
|
|
7
7
|
const readTsConfig = (tsconfigPath, noExistReturn = null) => {
|
|
8
8
|
if (!fs.existsSync(tsconfigPath)) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
-
import { createMatchPath } from "@modern-js/utils/tsconfig-paths";
|
|
3
2
|
import { getUserAlias } from "@modern-js/utils";
|
|
3
|
+
import { createMatchPath } from "@modern-js/utils/tsconfig-paths";
|
|
4
4
|
const { resolvePath } = require("@modern-js/babel-plugin-module-resolver");
|
|
5
5
|
const defaultPaths = {
|
|
6
6
|
"@": [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import path from "path";
|
|
2
|
-
import {
|
|
3
|
-
import { TypescriptLoader } from "./typescriptLoader";
|
|
2
|
+
import { fs, getAliasConfig, logger } from "@modern-js/utils";
|
|
4
3
|
import { tsconfigPathsBeforeHookFactory } from "./tsconfigPathsPlugin";
|
|
4
|
+
import { TypescriptLoader } from "./typescriptLoader";
|
|
5
5
|
const readTsConfigByFile = (tsConfigFile, tsInstance) => {
|
|
6
6
|
const parsedCmd = tsInstance.getParsedCommandLineOfConfigFile(tsConfigFile, void 0, tsInstance.sys);
|
|
7
7
|
const { options, fileNames, projectReferences } = parsedCmd;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as os from "os";
|
|
2
2
|
import path, { dirname, posix } from "path";
|
|
3
|
-
import * as ts from "typescript";
|
|
4
3
|
import { createMatchPath } from "@modern-js/utils/tsconfig-paths";
|
|
4
|
+
import * as ts from "typescript";
|
|
5
5
|
const isRegExpKey = (str) => {
|
|
6
6
|
return str.startsWith("^") || str.endsWith("$");
|
|
7
7
|
};
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.59.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"@babel/preset-typescript": "^7.24.7",
|
|
39
39
|
"@swc/helpers": "0.5.3",
|
|
40
40
|
"babel-plugin-transform-typescript-metadata": "^0.3.2",
|
|
41
|
-
"@modern-js/babel-compiler": "2.
|
|
42
|
-
"@modern-js/babel-plugin-module-resolver": "2.
|
|
43
|
-
"@modern-js/
|
|
44
|
-
"@modern-js/
|
|
41
|
+
"@modern-js/babel-compiler": "2.59.0",
|
|
42
|
+
"@modern-js/babel-plugin-module-resolver": "2.59.0",
|
|
43
|
+
"@modern-js/utils": "2.59.0",
|
|
44
|
+
"@modern-js/babel-preset": "2.59.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@types/babel__core": "^7.20.5",
|
|
@@ -50,9 +50,9 @@
|
|
|
50
50
|
"jest": "^29",
|
|
51
51
|
"ts-jest": "^29.1.0",
|
|
52
52
|
"typescript": "^5",
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@scripts/jest-config": "2.
|
|
53
|
+
"@scripts/build": "2.59.0",
|
|
54
|
+
"@modern-js/server-core": "2.59.0",
|
|
55
|
+
"@scripts/jest-config": "2.59.0"
|
|
56
56
|
},
|
|
57
57
|
"sideEffects": false,
|
|
58
58
|
"publishConfig": {
|