@modern-js/types 2.0.0-beta.0 → 2.0.0-beta.1

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/types
2
2
 
3
+ ## 2.0.0-beta.1
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9: chore: v2
8
+
9
+ ### Patch Changes
10
+
11
+ - cc971eabfc: refactor: move server plugin load logic in `@modern-js/core`
12
+ refactor:移除在 `@modern-js/core` 中的 server 插件加载逻辑
13
+ - 6bda14ed71: feat: refactor router with react-router@6.4
14
+
15
+ feat: 使用 react-router@6.4 重构路由模块
16
+
17
+ - 40ed587: feat: inject css chunk into html for streaming ssr
18
+ feat: streaming ssr 返回的 html 注入 css chunk
19
+ - 87c1ff8: feat(app-tools): attach builder instance to appContext
20
+
21
+ feat(app-tools): 将 builder 实例挂载到 appContext 上
22
+
23
+ - 102d32e4ba: feat(server): add `req` and `res` to SSR context
24
+
25
+ feat(server): 添加 `req` 和 `res` 到 SSR context 中
26
+
27
+ - 8b8e1bb571: feat: support nested routes
28
+ feat: 支持嵌套路由
29
+ - 3bbea92b2a: feat: support Hook、Middleware new API
30
+ feat: 支持 Hook、Middleware 的新 API
31
+
3
32
  ## 2.0.0-beta.0
4
33
 
5
34
  ### Major Changes
package/cli/index.d.ts CHANGED
@@ -15,6 +15,7 @@ export interface Entrypoint {
15
15
  globalApp?: string | false;
16
16
  routes?: any[];
17
17
  };
18
+ absoluteEntryDir?: string;
18
19
  }
19
20
 
20
21
  /**
@@ -104,9 +105,12 @@ export interface IAppContext {
104
105
  checkedEntries: string[];
105
106
  serverRoutes: ServerRoute[];
106
107
  htmlTemplates: HtmlTemplates;
108
+ absoluteEntryDir?: string;
107
109
  apiOnly: boolean;
108
110
  internalDirAlias: string;
109
111
  internalSrcAlias: string;
112
+ // FIXME real builder type
113
+ builder?: Record<string, any>;
110
114
  }
111
115
 
112
116
  export type { Merge } from 'type-fest';
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.0",
14
+ "version": "2.0.0-beta.1",
15
15
  "types": "./index.d.ts",
16
16
  "exports": {
17
17
  ".": "./index.d.ts",
@@ -31,13 +31,13 @@
31
31
  }
32
32
  },
33
33
  "devDependencies": {
34
- "@scripts/build": "2.0.0-beta.0",
35
- "@scripts/jest-config": "2.0.0-beta.0",
36
34
  "@types/jest": "^27",
37
35
  "@types/node": "^14",
38
36
  "http-proxy-middleware": "^2.0.4",
39
37
  "jest": "^27",
40
- "type-fest": "2.15.0"
38
+ "type-fest": "2.15.0",
39
+ "@scripts/build": "2.0.0-beta.1",
40
+ "@scripts/jest-config": "2.0.0-beta.1"
41
41
  },
42
42
  "sideEffects": false,
43
43
  "publishConfig": {
@@ -68,6 +68,7 @@ export type BaseSSRServerContext = {
68
68
  };
69
69
  redirection: { url?: string; status?: number };
70
70
  loadableStats: Record<string, any>;
71
+ routeManifest?: Record<string, any>;
71
72
  template: string;
72
73
  entryName: string;
73
74
  logger: {