Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

hyperframes_version mp4 tag is always 0.0.0-dev: readEngineVersion() resolves ../../package.json and overshoots the package root

クローズ
#4,365 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript

調査の方向性

Start with packages/engine/src/utils/renderProvenance.ts and compare its source, standalone-engine, and bundled CLI layouts, including dist/cli.js and dist/fontLocalizeCli.js. Reconcile the report with open PR #3695 before changing anything, then verify the foreign-package fallback and actual MP4 version tagging using the reproduction and ffprobe command. Done means current-head behavior is correct across the packaging matrix.

索引モデルが issue の本文から書いたものです。

説明

difficulty/medium triage/needs-triage

Summary

readEngineVersion() resolves ../../package.json, which overshoots the package root in the published layout. The lookup throws MODULE_NOT_FOUND, a bare catch swallows it, and every rendered mp4 is stamped hyperframes_version = 0.0.0-dev instead of the real version.

hyperframes_renderer is stamped correctly, so the tag block looks healthy at a glance.

Affected

[email protected] (current). Present in both dist/cli.js and dist/fontLocalizeCli.js.

The code

dist/cli.js:74652

function readEngineVersion() {
  try {
    const version2 = createRequire(import.meta.url)("../../package.json").version;
    return typeof version2 === "string" && version2.length > 0 ? version2 : UNKNOWN_VERSION;
  } catch {
    return UNKNOWN_VERSION;   // UNKNOWN_VERSION = "0.0.0-dev"
  }
}

Reproduce

mkdir /tmp/hf && cd /tmp/hf && npm pack [email protected] && tar xzf hyperframes-0.8.68.tgz
node -e '
const p = require("path");
const cli = p.resolve("package/dist/cli.js");
for (const rel of ["../../package.json", "../package.json"]) {
  const r = p.normalize(p.join(p.dirname(cli), rel));
  console.log(rel, "->", r, require("fs").existsSync(r) ? "EXISTS" : "MISSING");
}'

Output:

../../package.json -> /tmp/hf/package.json          MISSING
../package.json    -> /tmp/hf/package/package.json  EXISTS

End to end: render any composition to mp4 and read the tags back.

ffprobe -v error -show_entries format_tags -of default=noprint_wrappers=1 out.mp4 | grep hyperframes

Expected hyperframes_version=0.8.68, actual hyperframes_version=0.0.0-dev.

Suggested fix

../../package.json → ../package.json at both sites.

Separately worth considering: the bare catch is why this went unnoticed. A MODULE_NOT_FOUND here means the build layout moved, which is not the same as "version unavailable" — logging it, or distinguishing it from a genuinely absent version, would surface the next occurrence rather than silently degrading to a sentinel that reads like real data.

Why it matters

The tag is the only in-band record of which engine produced a file. When it is a constant, a rendered mp4 carries no evidence of its own provenance, and a pinned version cannot be verified after the fact from the artifact — only from whatever external notes happened to be kept.

Triage follow-up — September 23, 2026

Existing implementation: #3695 (fix(engine): resolve provenance version from the owning package), which predates this report. It is open and awaiting review; please reconcile this report with that PR before starting another implementation.

Current main fa4261bee still contains the depth-specific lookup in packages/engine/src/utils/renderProvenance.ts. The reporter's correction is important: changing ../../ to ../ fixes the flat bundle but breaks the source layout.

Review scope: source, standalone engine, bundled CLI, foreign-package fallback, and actual output-version tagging. The proposed PR's tests were not rerun in this triage pass. difficulty/medium reflects the packaging/test matrix; the issue stays in triage until current-head verification and scope reconciliation are complete.

主要言語
TypeScript
スター
54.1k
フォーク
4.9k
平均マージ
9時間 4分
マージ済み PR(30日)
662

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

heygen-com/hyperframes のほかの issue

heygen-com/hyperframes の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。