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

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.2
4
+
5
+ ### Major Changes
6
+
7
+ - dda38c9c3e: 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.1
4
33
 
5
34
  ### Major Changes
package/cli/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Merge } from 'type-fest';
2
- import { InternalPlugins } from '../common';
3
- import { ServerRoute } from '../server';
2
+
3
+ export type { Config as JestConfigTypes } from '@jest/types';
4
4
 
5
5
  /**
6
6
  * Bundle entrypoint
@@ -86,31 +86,4 @@ export interface HtmlTemplates {
86
86
  [name: string]: string;
87
87
  }
88
88
 
89
- export interface IAppContext {
90
- metaName: string; // name for generating conventional constants, such as .modern-js
91
- appDirectory: string;
92
- configFile: string | false;
93
- serverConfigFile: string;
94
- serverInternalPlugins: InternalPlugins;
95
- ip?: string;
96
- port?: number;
97
- distDirectory: string;
98
- packageName: string;
99
- srcDirectory: string;
100
- sharedDirectory: string;
101
- nodeModulesDirectory: string;
102
- internalDirectory: string;
103
- plugins: any[];
104
- entrypoints: Entrypoint[];
105
- checkedEntries: string[];
106
- serverRoutes: ServerRoute[];
107
- htmlTemplates: HtmlTemplates;
108
- absoluteEntryDir?: string;
109
- apiOnly: boolean;
110
- internalDirAlias: string;
111
- internalSrcAlias: string;
112
- // FIXME real builder type
113
- builder?: Record<string, any>;
114
- }
115
-
116
89
  export type { Merge } from 'type-fest';
package/common/index.d.ts CHANGED
@@ -1,3 +1,8 @@
1
+ export type {
2
+ TransformOptions as BabelTransformOptions,
3
+ PluginItem as BabelPlugin,
4
+ } from '@babel/core';
5
+
1
6
  export type InternalPlugins = Record<
2
7
  string,
3
8
  string | { path: string; forced?: boolean }
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.0.0-beta.1",
14
+ "version": "2.0.0-beta.2",
15
15
  "types": "./index.d.ts",
16
16
  "exports": {
17
17
  ".": "./index.d.ts",
@@ -31,13 +31,15 @@
31
31
  }
32
32
  },
33
33
  "devDependencies": {
34
+ "@types/babel__core": "^7.1.19",
34
35
  "@types/jest": "^27",
35
36
  "@types/node": "^14",
37
+ "@jest/types": "^27.0.6",
36
38
  "http-proxy-middleware": "^2.0.4",
37
39
  "jest": "^27",
38
40
  "type-fest": "2.15.0",
39
- "@scripts/build": "2.0.0-beta.1",
40
- "@scripts/jest-config": "2.0.0-beta.1"
41
+ "@scripts/build": "2.0.0-beta.2",
42
+ "@scripts/jest-config": "2.0.0-beta.2"
41
43
  },
42
44
  "sideEffects": false,
43
45
  "publishConfig": {