Skip to content

deps: runtime dependencies use the latest range and preview-only packages are installed unconditionally #71

Closed

Description

@iguangfei

Observation on main faf1d88 (package.json)

  1. Floating runtime ranges. isomorphic-git and zod are declared as "latest" in dependencies. Consumers installing @deckflow/deckuse from npm do not use this repo's lockfile, so two installs of the same Deckuse version can resolve different major versions of the library that writes workspace history and the library that validates every command.
  2. Preview-only packages are hard dependencies. echarts, tailwindcss, @fortawesome/fontawesome-free and playwright-core are referenced only from the render path (src/render.ts, src/render-cache.ts, src/render-pptx-browser.ts). Structural work (init, apply, validate, export) does not need them, and the README already states that export and structural validation work without a browser.

Impact

Acceptance

  • No latest ranges in dependencies; use caret ranges on a tested major.
  • Measure install time and size with and without the preview packages.
  • If the difference is material, move them to optionalDependencies or a separate package, with render --preflight reporting the missing piece as a structured, non-retryable state.

Activity

  1. zhaoxiongfei commented on Nov 13, 2026

    @zhaoxiongfei
    Member

    固定 isomorphic-git 和 zod 的已测试主版本范围。四个预览依赖移为可选且按需加载。一次本地暖缓存对照为 160.4 MB / 2.31 秒,对比省略四包后的 59.1 MB / 0.85 秒。实际 tarball 通过 --omit=optional 的新建、编辑、校验和导出,预检明确返回 RENDER_DEPENDENCIES_MISSING、缺失列表及 retryable:false。完整安装通过 Chrome PNG 渲染。

    已随 PR #74 合并到 main(46ff80d)。GitHub 两组 CI、本地 470 项测试和 npm 安装包检查通过。
    #74

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions