fix: build with author 0.5.1, and keep every script's letters in download names

Merged
AL
1d ago
+42-25

Closes #12

Changes

  • author 0.5.1 (package.json, pnpm-lock.yaml): Question Set's intro title and results heading are stored as plain text, not wrapped in <div>, and an apostrophe shows as typed there (missing-elements/h5p-offline-player#164). pnpm resolves one copy, with player 1.5.1 and pack 1.1.0 as before.
  • Download names (src/build-source.ts, packageName): letters, marks and digits in any script, lower case, joined by hyphens, NFC, at most 60 characters. "Die größten Ereignisse" downloads as die-größten-ereignisse.h5p, where it was die-gro-ten-ereignisse.h5p, and "Річки України" as річки-україни.h5p, where it was activity.h5p.

Testing

pnpm typecheck, pnpm build, pnpm e2e: 11 passed. Changed or new in e2e/build.spec.ts:

  • The link test now carries "Größte Flüsse" (plain base64url, so its UTF-8 bytes go through the fragment) and "Річки України", and checks both download names.
  • New: a Question Set's cover title, "Germany's Surrender: die größten Ereignisse", reads exactly that inside the player. With author 0.5.0 the same check read <div>…</div>, as the live page shows now.

After merging, the deploy puts 0.5.1 on the live page.


Summary by cubic

Upgrades @missing-elements/h5p-author to fix Question Set titles appearing with literal <div> tags. Download names now preserve letters from any writing system instead of stripping non-ASCII characters.

  • Names are lowercased, normalized, hyphenated, and limited to 60 characters.
  • End-to-end tests cover rendered Question Set titles and German and Ukrainian download names.