发布

  • feat(extension): pin manifest version to the Desktop app version

    frostbyte_neo 发布于 2026-04-21 10:16:07 +00:00 | 30 次提交 在此版本后已推送到 master

    Users naturally expect the "Current version" label in chrome://extensions
    to match the version shown inside the MediaGo window. Tie both to a single
    source of truth: apps/electron/app/package.json, which Electron's build
    pipeline (apps/electron/tsdown.config.ts) already reads and exposes as
    process.env.APP_VERSION.

    manifest.config.ts now imports the same file and:

    • version — stripped down to the numeric prefix (split(/[-+]/)[0])
      so Chrome accepts it. Chrome's manifest parser only
      allows 1–4 dot-separated integers; SemVer pre-release
      or build suffixes (-beta.2, +build.7) get rejected
      at install time.
    • version_name — keeps the full SemVer string. It's free-form, not
      used for update-ordering, and is what chrome://extensions
      displays when present.

    Effect: bumping apps/electron/app/package.json once is enough to
    re-stamp both the Desktop binary and the bundled extension manifest.
    The extension's own packages/mediago-extension/package.json is a
    private workspace package — its version field is unused by the
    manifest and intentionally left alone to avoid a pointless sync step
    on every release.

    Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

    下载附件