@bleedingdev/modern-js-main-doc 3.5.0-ultramodern.36 → 3.5.0-ultramodern.38
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/docs/en/configure/app/bff/effect.mdx +7 -7
- package/docs/en/configure/app/tools/ts-checker.mdx +4 -4
- package/docs/en/guides/get-started/ultramodern.mdx +10 -11
- package/docs/zh/configure/app/bff/effect.mdx +7 -7
- package/docs/zh/configure/app/tools/ts-checker.mdx +4 -4
- package/docs/zh/guides/get-started/ultramodern.mdx +9 -10
- package/package.json +11 -11
|
@@ -202,17 +202,17 @@ generated apps use:
|
|
|
202
202
|
|
|
203
203
|
```yaml
|
|
204
204
|
minimumReleaseAgeExclude:
|
|
205
|
-
- 'effect@4.0.0-beta.
|
|
206
|
-
- '@effect/opentelemetry@4.0.0-beta.
|
|
205
|
+
- 'effect@4.0.0-beta.94'
|
|
206
|
+
- '@effect/opentelemetry@4.0.0-beta.94'
|
|
207
207
|
|
|
208
208
|
trustPolicyExclude:
|
|
209
|
-
- 'effect@4.0.0-beta.
|
|
210
|
-
- '@effect/opentelemetry@4.0.0-beta.
|
|
209
|
+
- 'effect@4.0.0-beta.94'
|
|
210
|
+
- '@effect/opentelemetry@4.0.0-beta.94'
|
|
211
211
|
|
|
212
212
|
overrides:
|
|
213
|
-
'@effect/opentelemetry': 4.0.0-beta.
|
|
214
|
-
'@effect/vitest': 4.0.0-beta.
|
|
215
|
-
effect: 4.0.0-beta.
|
|
213
|
+
'@effect/opentelemetry': 4.0.0-beta.94
|
|
214
|
+
'@effect/vitest': 4.0.0-beta.94
|
|
215
|
+
effect: 4.0.0-beta.94
|
|
216
216
|
```
|
|
217
217
|
|
|
218
218
|
Do not add a different direct `effect` version in an app package. A mismatched
|
|
@@ -19,7 +19,7 @@ const defaultOptions = {
|
|
|
19
19
|
// use TypeScript Go checker by default
|
|
20
20
|
tsgo: true,
|
|
21
21
|
// use TS-Go native preview of user project
|
|
22
|
-
typescriptPath: require.resolve('
|
|
22
|
+
typescriptPath: require.resolve('typescript/package.json'),
|
|
23
23
|
},
|
|
24
24
|
issue: {
|
|
25
25
|
exclude: [
|
|
@@ -80,11 +80,11 @@ export default {
|
|
|
80
80
|
|
|
81
81
|
Type checking runs on [TypeScript Go](https://github.com/microsoft/typescript-go) (`tsgo`) by default in this fork. The capability is provided by [`ts-checker-rspack-plugin`](https://github.com/rstackjs/ts-checker-rspack-plugin), which is integrated by [`@rsbuild/plugin-type-check`](https://github.com/rstackjs/rsbuild-plugin-type-check), and reduces type-checking time by about 5-10x.
|
|
82
82
|
|
|
83
|
-
`@typescript/native-preview`
|
|
83
|
+
Modern.js prefers the project's stable `typescript` package when it is TypeScript 7 or newer, and falls back to `@typescript/native-preview` for projects still on the preview lane. To pin stable TypeScript 7, install it in your project:
|
|
84
84
|
|
|
85
|
-
<PackageManagerTabs command="install
|
|
85
|
+
<PackageManagerTabs command="install typescript -D" />
|
|
86
86
|
|
|
87
|
-
When `tsgo` is enabled, the default `typescript.typescriptPath` resolves to
|
|
87
|
+
When `tsgo` is enabled, the default `typescript.typescriptPath` resolves to `typescript/package.json` for TypeScript 7 projects. If you manually set `typescript.typescriptPath`, it must be an absolute path to `typescript/package.json` or `@typescript/native-preview/package.json`.
|
|
88
88
|
|
|
89
89
|
To fall back to the classic TypeScript checker, set `typescript.tsgo` to `false` and make sure `typescript` is installed in your project:
|
|
90
90
|
|
|
@@ -143,11 +143,11 @@ migration work: move code to `shared/api.ts`, `api/index.ts`, and
|
|
|
143
143
|
and `src/effect`.
|
|
144
144
|
|
|
145
145
|
Generated strict Effect workspaces pin the compatible Effect cohort with pnpm
|
|
146
|
-
overrides: `effect@4.0.0-beta.
|
|
147
|
-
and `@effect/vitest@4.0.0-beta.
|
|
146
|
+
overrides: `effect@4.0.0-beta.94`, `@effect/opentelemetry@4.0.0-beta.94`,
|
|
147
|
+
and `@effect/vitest@4.0.0-beta.94`. Do not add app-local direct Effect
|
|
148
148
|
versions that disagree with those overrides. They also carry generated pnpm
|
|
149
|
-
policy exclusions for `effect@4.0.0-beta.
|
|
150
|
-
`@effect/opentelemetry@4.0.0-beta.
|
|
149
|
+
policy exclusions for `effect@4.0.0-beta.94` and
|
|
150
|
+
`@effect/opentelemetry@4.0.0-beta.94` so the framework-selected Effect beta
|
|
151
151
|
cohort is not blocked by the 24-hour age gate or trusted-publisher to
|
|
152
152
|
provenance metadata transition.
|
|
153
153
|
|
|
@@ -210,8 +210,8 @@ Older repos with nested Effect entries and `verbatimModuleSyntax` should update
|
|
|
210
210
|
the latest BleedingDev cohort instead of adding app-level `"type": "module"`
|
|
211
211
|
metadata, Module Federation shims, or custom server wrappers. The framework BFF
|
|
212
212
|
compiler normalizes CommonJS server output while generated app packages keep
|
|
213
|
-
stable
|
|
214
|
-
|
|
213
|
+
stable TypeScript 7 so Module Federation DTS generation and TS-Go checks use
|
|
214
|
+
the same modern compiler lane.
|
|
215
215
|
|
|
216
216
|
Cloudflare SSR deploys are also split by runtime responsibility: `.output` is an
|
|
217
217
|
ESM module-worker package, while `.output/worker` remains a CommonJS package
|
|
@@ -351,10 +351,9 @@ Overlays are explicit CodeSmith generators that run after base workspace or
|
|
|
351
351
|
MicroVertical generation. They extend generated output; they do not replace,
|
|
352
352
|
inherit, or shadow the base templates. The generator and CodeSmith adapter are
|
|
353
353
|
plain Node generator surfaces. The package build emits declaration files through
|
|
354
|
-
the TS-Go toolchain. Generated app packages keep stable `typescript`
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
on native-preview compiler internals.
|
|
354
|
+
the TS-Go toolchain. Generated app packages keep stable `typescript` on TS7 so
|
|
355
|
+
Module Federation DTS generation and TS-Go use the same compiler lane; runtime
|
|
356
|
+
code does not depend on compiler internals.
|
|
358
357
|
|
|
359
358
|
### Runtime Contracts
|
|
360
359
|
|
|
@@ -381,7 +380,7 @@ The generated contract writes `.modernjs/ultramodern.json` with a
|
|
|
381
380
|
- `packages/shared-design-tokens` owns the shared token layer and exports `./tokens.css`.
|
|
382
381
|
- Shell CSS owns only shell base and overlay layers under `[data-app-id="shell-super-app"]`.
|
|
383
382
|
- Each vertical owns one CSS layer, for example `[data-app-id="vertical-transportation"]` with app-local class prefixes.
|
|
384
|
-
- Tailwind CSS v4 is local to each generated app through `@tailwindcss
|
|
383
|
+
- Tailwind CSS v4 is local to each generated app through `@rsbuild/plugin-tailwindcss`; shared base styles must not be duplicated by verticals.
|
|
385
384
|
- SSR first paint requires shared token CSS and app-owned CSS to be emitted by Modern/Rspack assets. Vertical CSS is loaded through manifest ownership, not copied into shell source.
|
|
386
385
|
|
|
387
386
|
Version switching must select UI, API, CSS, i18n JSON, and MF manifest evidence from the same vertical build marker. A shell render that only changes the UI marker is not enough.
|
|
@@ -199,17 +199,17 @@ Effect 版本组。当前 UltraModern 版本组使用:
|
|
|
199
199
|
|
|
200
200
|
```yaml
|
|
201
201
|
minimumReleaseAgeExclude:
|
|
202
|
-
- 'effect@4.0.0-beta.
|
|
203
|
-
- '@effect/opentelemetry@4.0.0-beta.
|
|
202
|
+
- 'effect@4.0.0-beta.94'
|
|
203
|
+
- '@effect/opentelemetry@4.0.0-beta.94'
|
|
204
204
|
|
|
205
205
|
trustPolicyExclude:
|
|
206
|
-
- 'effect@4.0.0-beta.
|
|
207
|
-
- '@effect/opentelemetry@4.0.0-beta.
|
|
206
|
+
- 'effect@4.0.0-beta.94'
|
|
207
|
+
- '@effect/opentelemetry@4.0.0-beta.94'
|
|
208
208
|
|
|
209
209
|
overrides:
|
|
210
|
-
'@effect/opentelemetry': 4.0.0-beta.
|
|
211
|
-
'@effect/vitest': 4.0.0-beta.
|
|
212
|
-
effect: 4.0.0-beta.
|
|
210
|
+
'@effect/opentelemetry': 4.0.0-beta.94
|
|
211
|
+
'@effect/vitest': 4.0.0-beta.94
|
|
212
|
+
effect: 4.0.0-beta.94
|
|
213
213
|
```
|
|
214
214
|
|
|
215
215
|
不要在应用包里添加不同版本的直接 `effect` 依赖。Effect beta 不一致时,Layer 或 HTTP
|
|
@@ -19,7 +19,7 @@ const defaultOptions = {
|
|
|
19
19
|
// use TypeScript Go checker by default
|
|
20
20
|
tsgo: true,
|
|
21
21
|
// use TS-Go native preview of user project
|
|
22
|
-
typescriptPath: require.resolve('
|
|
22
|
+
typescriptPath: require.resolve('typescript/package.json'),
|
|
23
23
|
},
|
|
24
24
|
issue: {
|
|
25
25
|
exclude: [
|
|
@@ -80,11 +80,11 @@ export default {
|
|
|
80
80
|
|
|
81
81
|
类型检查默认使用 [TypeScript Go](https://github.com/microsoft/typescript-go)(`tsgo`)。该能力由 [`@rsbuild/plugin-type-check`](https://github.com/rstackjs/rsbuild-plugin-type-check) 底层集成的 [`ts-checker-rspack-plugin`](https://github.com/rstackjs/ts-checker-rspack-plugin) 提供,可以将类型检查耗时减少约 5-10 倍。
|
|
82
82
|
|
|
83
|
-
`@typescript/native-preview
|
|
83
|
+
Modern.js 会优先使用项目内稳定版 `typescript`(TypeScript 7 或更新版本),仍在预览通道的项目会回退到 `@typescript/native-preview`。如需固定稳定版 TypeScript 7,可在项目中安装:
|
|
84
84
|
|
|
85
|
-
<PackageManagerTabs command="install
|
|
85
|
+
<PackageManagerTabs command="install typescript -D" />
|
|
86
86
|
|
|
87
|
-
开启 `tsgo`
|
|
87
|
+
开启 `tsgo` 后,TypeScript 7 项目默认的 `typescript.typescriptPath` 会解析到 `typescript/package.json`。如果你手动设置了 `typescript.typescriptPath`,它必须是指向 `typescript/package.json` 或 `@typescript/native-preview/package.json` 的绝对路径。
|
|
88
88
|
|
|
89
89
|
如需回退到经典 TypeScript 检查器,请将 `typescript.tsgo` 设置为 `false`,并确保项目中安装了 `typescript`:
|
|
90
90
|
|
|
@@ -128,10 +128,10 @@ pnpm overrides/trust policy 和 pnpm lockfile。剩余失败就是源码迁移
|
|
|
128
128
|
`api/lambda`、`shared/effect` 和 `src/effect`。
|
|
129
129
|
|
|
130
130
|
严格 Effect 生成 workspace 会通过 pnpm overrides 固定兼容版本组:
|
|
131
|
-
`effect@4.0.0-beta.
|
|
132
|
-
`@effect/vitest@4.0.0-beta.
|
|
133
|
-
Effect 版本。生成的 pnpm policy 还会为 `effect@4.0.0-beta.
|
|
134
|
-
`@effect/opentelemetry@4.0.0-beta.
|
|
131
|
+
`effect@4.0.0-beta.94`、`@effect/opentelemetry@4.0.0-beta.94` 和
|
|
132
|
+
`@effect/vitest@4.0.0-beta.94`。不要添加与这些 overrides 冲突的 app 本地直接
|
|
133
|
+
Effect 版本。生成的 pnpm policy 还会为 `effect@4.0.0-beta.94` 和
|
|
134
|
+
`@effect/opentelemetry@4.0.0-beta.94` 添加例外,避免框架选定的 Effect beta
|
|
135
135
|
版本组被 24 小时成熟期检查,或从 trusted-publisher metadata 迁移到 provenance
|
|
136
136
|
attestation 时被 no-downgrade 检查误拦截。
|
|
137
137
|
|
|
@@ -186,8 +186,8 @@ API group layer 一起提供。
|
|
|
186
186
|
带有 Effect BFF 入口和 `verbatimModuleSyntax` 的旧仓库,应升级到最新的
|
|
187
187
|
BleedingDev cohort,而不是给 app package 增加 `"type": "module"`、Module
|
|
188
188
|
Federation shim 或自定义 server wrapper。框架 BFF compiler 会把服务端输出规范化为
|
|
189
|
-
CommonJS,同时生成的 app package
|
|
190
|
-
|
|
189
|
+
CommonJS,同时生成的 app package 会使用稳定版 TypeScript 7,让 Module Federation
|
|
190
|
+
DTS 与 TS-Go 检查走同一条现代 compiler 通道。
|
|
191
191
|
|
|
192
192
|
安装新 cohort 后,先运行生成的 `pnpm api:check` 与
|
|
193
193
|
`scripts/validate-ultramodern-workspace.mts` 契约校验,再接受人工改动。topology、
|
|
@@ -308,9 +308,8 @@ JSON 契约缺失或不是对象、Tailwind 前缀冲突,都会报告归属契
|
|
|
308
308
|
Overlays 是显式配置的 CodeSmith 生成器,会在基础 workspace 或 MicroVertical
|
|
309
309
|
生成之后运行。它们只扩展生成结果,不替换、不继承、也不遮蔽基础模板。公开生成器与
|
|
310
310
|
CodeSmith adapter 都是普通 Node 生成器入口。包构建通过 TS-Go 工具链产出声明文件;
|
|
311
|
-
生成出来的 app package
|
|
312
|
-
|
|
313
|
-
native-preview compiler 内部实现。
|
|
311
|
+
生成出来的 app package 会把稳定版 `typescript` 固定在 TS7,让 Module Federation
|
|
312
|
+
DTS 与 TS-Go 使用同一条 compiler 通道;运行时代码不依赖 compiler 内部实现。
|
|
314
313
|
|
|
315
314
|
### 运行时契约
|
|
316
315
|
|
|
@@ -334,7 +333,7 @@ JSON-LD。公开路由 owner 可以在本地化路径旁显式添加 `jsonLd`,
|
|
|
334
333
|
- `packages/shared-design-tokens` 拥有共享 token layer,并导出 `./tokens.css`。
|
|
335
334
|
- Shell CSS 只拥有 `[data-app-id="shell-super-app"]` 下的 shell base 和 overlay layer。
|
|
336
335
|
- 每个 vertical 拥有自己的 CSS layer,例如 `[data-app-id="vertical-transportation"]` 和应用本地 class 前缀。
|
|
337
|
-
- Tailwind CSS v4 通过 `@tailwindcss
|
|
336
|
+
- Tailwind CSS v4 通过 `@rsbuild/plugin-tailwindcss` 保持在每个生成应用内部;共享 base style 不应由 vertical 重复定义。
|
|
338
337
|
- SSR 首屏依赖 Modern/Rspack 产出共享 token CSS 和应用自己的 CSS。Vertical CSS 通过 manifest 归属加载,不复制到 shell 源码中。
|
|
339
338
|
|
|
340
339
|
版本切换必须从同一个 vertical build marker 选择 UI、API、CSS、i18n JSON 与 MF manifest 证据。只切换 shell 渲染里的 UI marker 不足以证明完整版本切换。
|
package/package.json
CHANGED
|
@@ -19,32 +19,32 @@
|
|
|
19
19
|
"modern.js",
|
|
20
20
|
"ultramodern.js"
|
|
21
21
|
],
|
|
22
|
-
"version": "3.5.0-ultramodern.
|
|
22
|
+
"version": "3.5.0-ultramodern.38",
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"registry": "https://registry.npmjs.org/",
|
|
25
25
|
"access": "public"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"mermaid": "^11.16.0",
|
|
29
|
-
"@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.5.0-ultramodern.
|
|
29
|
+
"@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.5.0-ultramodern.38"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@rsbuild/plugin-sass": "2.0.
|
|
33
|
-
"@rspress/core": "2.0.
|
|
34
|
-
"@rspress/plugin-llms": "2.0.
|
|
35
|
-
"@rspress/shared": "2.0.
|
|
36
|
-
"@shikijs/transformers": "^4.3.
|
|
32
|
+
"@rsbuild/plugin-sass": "2.0.1",
|
|
33
|
+
"@rspress/core": "2.0.17",
|
|
34
|
+
"@rspress/plugin-llms": "2.0.17",
|
|
35
|
+
"@rspress/shared": "2.0.17",
|
|
36
|
+
"@shikijs/transformers": "^4.3.1",
|
|
37
37
|
"@types/fs-extra": "11.0.4",
|
|
38
|
-
"@types/node": "^26.
|
|
39
|
-
"@typescript/native-preview": "7.0.0-dev.
|
|
38
|
+
"@types/node": "^26.1.1",
|
|
39
|
+
"@typescript/native-preview": "7.0.0-dev.20260707.2",
|
|
40
40
|
"classnames": "^2.5.1",
|
|
41
41
|
"clsx": "^2.1.1",
|
|
42
|
-
"fs-extra": "^11.3.
|
|
42
|
+
"fs-extra": "^11.3.6",
|
|
43
43
|
"react": "^19.2.7",
|
|
44
44
|
"react-dom": "^19.2.7",
|
|
45
45
|
"rsbuild-plugin-open-graph": "1.1.3",
|
|
46
46
|
"ts-node": "^10.9.2",
|
|
47
|
-
"typescript": "^
|
|
47
|
+
"typescript": "^7.0.2"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"dev": "rspress dev",
|