@modern-js/server 2.25.1 → 2.26.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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# @modern-js/server
|
|
2
2
|
|
|
3
|
+
## 2.26.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [1fb5804]
|
|
8
|
+
- @modern-js/server-utils@2.26.0
|
|
9
|
+
- @modern-js/prod-server@2.26.0
|
|
10
|
+
- @modern-js/types@2.26.0
|
|
11
|
+
- @modern-js/utils@2.26.0
|
|
12
|
+
|
|
13
|
+
## 2.25.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 272646c: feat(builder): bump webpack v5.88, support top level await
|
|
18
|
+
|
|
19
|
+
feat(builder): 升级 webpack v5.88, 支持 top level await
|
|
20
|
+
|
|
21
|
+
- 358ed24: fix: support configuration ts-node and avoid to register ts-node unnecessarily
|
|
22
|
+
fix: 支持配置 ts-node,避免对 ts-node 不必要的注册
|
|
23
|
+
- Updated dependencies [63d8247]
|
|
24
|
+
- Updated dependencies [6651684]
|
|
25
|
+
- Updated dependencies [272646c]
|
|
26
|
+
- Updated dependencies [358ed24]
|
|
27
|
+
- @modern-js/utils@2.25.2
|
|
28
|
+
- @modern-js/prod-server@2.25.2
|
|
29
|
+
- @modern-js/server-utils@2.25.2
|
|
30
|
+
- @modern-js/types@2.25.2
|
|
31
|
+
|
|
3
32
|
## 2.25.1
|
|
4
33
|
|
|
5
34
|
### Patch Changes
|
|
@@ -70,6 +70,8 @@ const enableRegister = (projectRoot, config) => {
|
|
|
70
70
|
baseUrl: absoluteBaseUrl || "./",
|
|
71
71
|
paths: tsPaths
|
|
72
72
|
});
|
|
73
|
+
const tsConfig = (0, _utils.readTsConfigByFile)(tsconfigPath);
|
|
74
|
+
const tsNodeOptions = tsConfig["ts-node"];
|
|
73
75
|
tsNode.register({
|
|
74
76
|
project: tsconfigPath,
|
|
75
77
|
scope: true,
|
|
@@ -79,7 +81,8 @@ const enableRegister = (projectRoot, config) => {
|
|
|
79
81
|
ignore: [
|
|
80
82
|
"(?:^|/)node_modules/",
|
|
81
83
|
`(?:^|/)${distPath}/`
|
|
82
|
-
]
|
|
84
|
+
],
|
|
85
|
+
...tsNodeOptions
|
|
83
86
|
});
|
|
84
87
|
} else {
|
|
85
88
|
var _config_tools, _config_server;
|
|
@@ -3,7 +3,7 @@ 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
5
|
import { resolveBabelConfig } from "@modern-js/server-utils";
|
|
6
|
-
import { fs, getAliasConfig, createDebugger } from "@modern-js/utils";
|
|
6
|
+
import { fs, getAliasConfig, createDebugger, readTsConfigByFile } from "@modern-js/utils";
|
|
7
7
|
var debug = createDebugger("server");
|
|
8
8
|
var checkDep = function(depName, paths) {
|
|
9
9
|
var packagePath = "";
|
|
@@ -59,7 +59,9 @@ export var enableRegister = function(projectRoot, config) {
|
|
|
59
59
|
baseUrl: absoluteBaseUrl || "./",
|
|
60
60
|
paths: tsPaths
|
|
61
61
|
});
|
|
62
|
-
|
|
62
|
+
var tsConfig = readTsConfigByFile(tsconfigPath);
|
|
63
|
+
var tsNodeOptions = tsConfig["ts-node"];
|
|
64
|
+
tsNode.register(_object_spread({
|
|
63
65
|
project: tsconfigPath,
|
|
64
66
|
scope: true,
|
|
65
67
|
// for env.d.ts, https://www.npmjs.com/package/ts-node#missing-types
|
|
@@ -69,7 +71,7 @@ export var enableRegister = function(projectRoot, config) {
|
|
|
69
71
|
"(?:^|/)node_modules/",
|
|
70
72
|
"(?:^|/)".concat(distPath, "/")
|
|
71
73
|
]
|
|
72
|
-
});
|
|
74
|
+
}, tsNodeOptions));
|
|
73
75
|
} else {
|
|
74
76
|
var _config_tools, _config_server;
|
|
75
77
|
debug("use @babel/register");
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from "path";
|
|
2
2
|
import { resolveBabelConfig } from "@modern-js/server-utils";
|
|
3
|
-
import { fs, getAliasConfig, createDebugger } from "@modern-js/utils";
|
|
3
|
+
import { fs, getAliasConfig, createDebugger, readTsConfigByFile } from "@modern-js/utils";
|
|
4
4
|
const debug = createDebugger("server");
|
|
5
5
|
const checkDep = (depName, paths) => {
|
|
6
6
|
let packagePath = "";
|
|
@@ -59,6 +59,8 @@ export const enableRegister = (projectRoot, config) => {
|
|
|
59
59
|
baseUrl: absoluteBaseUrl || "./",
|
|
60
60
|
paths: tsPaths
|
|
61
61
|
});
|
|
62
|
+
const tsConfig = readTsConfigByFile(tsconfigPath);
|
|
63
|
+
const tsNodeOptions = tsConfig["ts-node"];
|
|
62
64
|
tsNode.register({
|
|
63
65
|
project: tsconfigPath,
|
|
64
66
|
scope: true,
|
|
@@ -68,7 +70,8 @@ export const enableRegister = (projectRoot, config) => {
|
|
|
68
70
|
ignore: [
|
|
69
71
|
"(?:^|/)node_modules/",
|
|
70
72
|
`(?:^|/)${distPath}/`
|
|
71
|
-
]
|
|
73
|
+
],
|
|
74
|
+
...tsNodeOptions
|
|
72
75
|
});
|
|
73
76
|
} else {
|
|
74
77
|
var _config_tools, _config_server;
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "2.
|
|
18
|
+
"version": "2.26.0",
|
|
19
19
|
"jsnext:source": "./src/index.ts",
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
21
|
"main": "./dist/cjs/index.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"minimatch": "^3.0.4",
|
|
48
48
|
"path-to-regexp": "^6.2.0",
|
|
49
49
|
"ws": "^8.2.0",
|
|
50
|
-
"@modern-js/prod-server": "2.
|
|
51
|
-
"@modern-js/server-utils": "2.
|
|
52
|
-
"@modern-js/types": "2.
|
|
53
|
-
"@modern-js/utils": "2.
|
|
50
|
+
"@modern-js/prod-server": "2.26.0",
|
|
51
|
+
"@modern-js/server-utils": "2.26.0",
|
|
52
|
+
"@modern-js/types": "2.26.0",
|
|
53
|
+
"@modern-js/utils": "2.26.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@types/connect-history-api-fallback": "^1.3.5",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"ts-node": "^10.9.1",
|
|
64
64
|
"tsconfig-paths": "4.1.1",
|
|
65
65
|
"typescript": "^5",
|
|
66
|
-
"webpack": "^5.
|
|
66
|
+
"webpack": "^5.88.1",
|
|
67
67
|
"websocket": "^1",
|
|
68
|
-
"@modern-js/server-core": "2.
|
|
69
|
-
"@scripts/build": "2.
|
|
70
|
-
"@scripts/jest-config": "2.
|
|
68
|
+
"@modern-js/server-core": "2.26.0",
|
|
69
|
+
"@scripts/build": "2.26.0",
|
|
70
|
+
"@scripts/jest-config": "2.26.0"
|
|
71
71
|
},
|
|
72
72
|
"peerDependencies": {
|
|
73
73
|
"devcert": "^1.0.0",
|