Pin h5p-author 0.14.0, and copy the build tool from the author package

Merged
AL
3d ago
+24-59

Closes #78.

The toolkit's 1.7.0 release is on npm, its packages published from CI with provenance (missing-elements/h5p-toolkit#246). This moves the site's last pin to it, the author, and serves the build tool as the author package ships it.

What changes

  • The pin: package.json and the lockfile move @missing-elements/h5p-author to 0.14.0. The rest of the release, h5p-libraries 1.1.1, h5p-offline-player 1.7.0 and h5p-runtime 1.0.2, came in by Dependabot (#75, #76, #77), which this is rebased on. With the author at 0.14.0 the lockfile drops the copies 0.13.0 kept, libraries 1.1.0, player 1.6.0 and normalize 1.4.0, and takes normalize 1.4.1. pnpm dropped no libc: lines.
  • The build tool: bundles() in vite.config.ts no longer bundles the command line with this site's Vite. It copies dist/h5p-author.mjs and dist/h5p-author-LICENSES.txt from the author package, which builds them when it is packed since 0.14.0 (missing-elements/h5p-toolkit#247). The bytes route 3 runs are therefore the npm package's, which its provenance covers, and this site's build tools and their updates never touch them. The --version check stays. The now unused Vite build import and root path are gone.

Tested

  • Checks: pnpm install and pnpm build, which runs tsc, pass. After the rebase on main the files are the same as before it, and pnpm install --frozen-lockfile and pnpm build pass again.
  • The tool: /h5p/bundles/h5p-author.mjs and h5p-author-LICENSES.txt are byte-equal to the published package's dist/ files. The tool prints @missing-elements/h5p-author 0.14.0, library pack 1.1.1.
  • The listing: bundles/index.json says author 0.14.0 and pack 1.1.1, with 55 bundles. The archive is 14.9 MB.
  • The archive: unpacked alone, its tool built a Multiple Choice with --libraries parts, and printed the new line on the H5P core a site needs: "Needs H5P core 1.28 or newer on a site it is uploaded to: …".
  • The skill zips: both carry the package's SKILL.md unchanged, and the ChatGPT zip's plugin.json says 0.14.0.
  • The build page, served by vite preview, in Chromium: a #source= link to a Multiple Choice with no answer marked correct built and played in 0.6 s. It showed the note that no answer is marked correct, and the console had no errors.
  • The text: no built page and no source names an older version.

Summary by cubic

Pins @missing-elements/h5p-author to 0.14.0, completing the toolkit's 1.7.0 release, and serves the build tool as the author package ships it.

  • The bundles step now copies dist/h5p-author.mjs and h5p-author-LICENSES.txt from the package instead of bundling the CLI with this site's Vite.
  • The bytes chat builds run are the npm package's, covered by its provenance, and this site's build tools no longer touch them.
  • The lockfile drops the duplicate versions 0.13.0 kept (libraries 1.1.0, player 1.6.0, normalize 1.4.0) and takes normalize 1.4.1.
  • The --version check, archive, and bundle listing stay unchanged.

Closes #78.