@tnotesjs/core 0.4.1 → 0.4.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.
@@ -28,7 +28,8 @@ var DEFAULT_OPTIMIZE_DEPS_INCLUDE = [
28
28
  // Mermaid 11 的 ESM chunk 默认导入 CommonJS fastdom。pnpm 的严格
29
29
  // 依赖布局下 Vite 无法从知识库根目录自动发现这条嵌套依赖,开发
30
30
  // 模式会直接把 fastdom.js 当作 ESM 加载并导致整页白屏。
31
- "@tnotesjs/core > mermaid > fastdom"
31
+ "@tnotesjs/core > mermaid > fastdom",
32
+ "@tnotesjs/core > mermaid > fastdom/extensions/fastdom-promised.js"
32
33
  ];
33
34
 
34
35
  // vitepress/configs/constants.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tnotesjs/core",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "TNotes 知识库核心框架 —— 基于 VitePress 的笔记管理系统",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@10.17.1",
@@ -4,8 +4,11 @@ import { DEFAULT_OPTIMIZE_DEPS_INCLUDE } from './dependencyOptimization'
4
4
 
5
5
  describe('Vite dependency optimization', () => {
6
6
  it('pre-bundles Mermaid nested CommonJS fastdom dependency', () => {
7
- expect(DEFAULT_OPTIMIZE_DEPS_INCLUDE).toContain(
8
- '@tnotesjs/core > mermaid > fastdom',
7
+ expect(DEFAULT_OPTIMIZE_DEPS_INCLUDE).toEqual(
8
+ expect.arrayContaining([
9
+ '@tnotesjs/core > mermaid > fastdom',
10
+ '@tnotesjs/core > mermaid > fastdom/extensions/fastdom-promised.js',
11
+ ]),
9
12
  )
10
13
  })
11
14
  })
@@ -9,4 +9,5 @@ export const DEFAULT_OPTIMIZE_DEPS_INCLUDE = [
9
9
  // 依赖布局下 Vite 无法从知识库根目录自动发现这条嵌套依赖,开发
10
10
  // 模式会直接把 fastdom.js 当作 ESM 加载并导致整页白屏。
11
11
  '@tnotesjs/core > mermaid > fastdom',
12
+ '@tnotesjs/core > mermaid > fastdom/extensions/fastdom-promised.js',
12
13
  ] as const