@modern-js/types 2.7.0 → 2.8.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 +9 -0
- package/README.md +2 -2
- package/cli/index.d.ts +28 -0
- package/package.json +5 -5
- package/server/context.d.ts +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @modern-js/types
|
|
2
2
|
|
|
3
|
+
## 2.8.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 70d82e1408: fix: use mock host instead real url host for url parse, for new URL not support ipv6, and we only need parse url path & search
|
|
8
|
+
fix: 使用虚拟的域名代替真实的主机名,因为 new URL 不支持解析 ipv6 的域名,并且我们只需要解析 url 的路径和查询字符串
|
|
9
|
+
- 1f6ca2c7fb: fix: nested routes in ssg
|
|
10
|
+
fix: 修复嵌套路由在 SSG 中的问题
|
|
11
|
+
|
|
3
12
|
## 2.7.0
|
|
4
13
|
|
|
5
14
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ Please follow [Quick Start](https://modernjs.dev/en/guides/get-started/quick-sta
|
|
|
19
19
|
|
|
20
20
|
## Contributing
|
|
21
21
|
|
|
22
|
-
Please read the [Contributing Guide](https://github.com/
|
|
22
|
+
Please read the [Contributing Guide](https://github.com/web-infra-dev/modern.js/blob/main/CONTRIBUTING.md).
|
|
23
23
|
|
|
24
24
|
## License
|
|
25
25
|
|
|
26
|
-
Modern.js is [MIT licensed](https://github.com/
|
|
26
|
+
Modern.js is [MIT licensed](https://github.com/web-infra-dev/modern.js/blob/main/LICENSE).
|
package/cli/index.d.ts
CHANGED
|
@@ -88,4 +88,32 @@ export interface HtmlTemplates {
|
|
|
88
88
|
[name: string]: string;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
+
export type SSGRouteOptions =
|
|
92
|
+
| string
|
|
93
|
+
| {
|
|
94
|
+
url: string;
|
|
95
|
+
output?: string;
|
|
96
|
+
params?: Record<string, any>[];
|
|
97
|
+
headers?: Record<string, any>;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
export type SSGSingleEntryOptions =
|
|
101
|
+
| boolean
|
|
102
|
+
| {
|
|
103
|
+
preventDefault?: string[];
|
|
104
|
+
headers?: Record<string, any>;
|
|
105
|
+
routes?: SSGRouteOptions[];
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export type SSGMultiEntryOptions = Record<string, SSGSingleEntryOptions>;
|
|
109
|
+
|
|
110
|
+
export type SSGConfig =
|
|
111
|
+
| boolean
|
|
112
|
+
| SSGSingleEntryOptions
|
|
113
|
+
| SSGMultiEntryOptions
|
|
114
|
+
| ((
|
|
115
|
+
entryName: string,
|
|
116
|
+
payload: { baseUrl?: string },
|
|
117
|
+
) => SSGSingleEntryOptions);
|
|
118
|
+
|
|
91
119
|
export type { Merge } from 'type-fest';
|
package/package.json
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
"name": "@modern-js/types",
|
|
3
3
|
"description": "A Progressive React Framework for modern web development.",
|
|
4
4
|
"homepage": "https://modernjs.dev",
|
|
5
|
-
"bugs": "https://github.com/
|
|
6
|
-
"repository": "
|
|
5
|
+
"bugs": "https://github.com/web-infra-dev/modern.js/issues",
|
|
6
|
+
"repository": "web-infra-dev/modern.js",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"react",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"modern",
|
|
12
12
|
"modern.js"
|
|
13
13
|
],
|
|
14
|
-
"version": "2.
|
|
14
|
+
"version": "2.8.0",
|
|
15
15
|
"types": "./index.d.ts",
|
|
16
16
|
"exports": {
|
|
17
17
|
".": "./index.d.ts",
|
|
@@ -38,8 +38,8 @@
|
|
|
38
38
|
"http-proxy-middleware": "^2.0.4",
|
|
39
39
|
"jest": "^27",
|
|
40
40
|
"type-fest": "2.15.0",
|
|
41
|
-
"@scripts/build": "2.
|
|
42
|
-
"@scripts/jest-config": "2.
|
|
41
|
+
"@scripts/build": "2.8.0",
|
|
42
|
+
"@scripts/jest-config": "2.8.0"
|
|
43
43
|
},
|
|
44
44
|
"sideEffects": false,
|
|
45
45
|
"publishConfig": {
|