Skip to content

Drop libraries="hub" and settle auto-resize before 1.0 - #45

Merged
alekswebnet merged 1 commit into
mainfrom
fix/drop-hub-alias
Oct 18, 2026
Merged

alekswebnet merged 1 commit into
mainfrom
fix/drop-hub-alias

Conversation

@alekswebnet

Copy link
Copy Markdown
Contributor

Closes #44.

1.0 freezes the API, and Deprecation in docs/compatibility.md listed two forms that would then have stayed through all of 1.x. This takes both off the list.

Changes

  • hub is no longer special. The element's parseLibrarySources drops it and the console note. The embed command's --default-libraries, the embed page's &libraries= and the verifier's --libraries all drop it too. Written now, hub is a word like any other: the element reads it as a URL relative to the page, the embed command refuses it (not pack, none or a URL: hub), and the verifier looks for a file named hub and says there is none.
  • A bare auto-resize comes off the deprecation list. It was never an alias in the code: the element follows the content's height unless the value is off, so the bare attribute means "on" like any boolean attribute and will never go. The embed site's page, the verifier's page and the demo's /embed stopped writing it, since it suggested the attribute was needed.
  • The API table, which 1.0 makes the contract. The save-interval row names its property, saveInterval. The untrusted row drops "Needs the runtime at 0.2 or later", which the player's peer range (^0.2.0) already covers; docs/untrusted.md still explains the fail-closed check for an older runtime.
  • Docs: README, the embed and verify READMEs, docs/libraries.md, docs/privacy.md, docs/compatibility.md ("None is in that state now"), the setup skill, the demo's setup page, and AGENTS.md.

The rest of the API tables were read against the element: every attribute it reads, every public property, clearUserData(), and each event's detail match what the README says.

Testing

  • pnpm typecheck, all packages.
  • Player unit suite: 329 passed. library-sources.test.ts now pins hub as a URL and pack written twice as tried once.
  • Player browser tests libraries.test.ts and pack.test.ts in Chromium: 30 passed.
  • Embed: 26 passed. The site test that sent &libraries=hub to a site locked to a host list was the only check that such a site resolves pack to its own copy, so it now sends &libraries=pack rather than going.
  • Verify: 15 passed.
  • By hand on the dev server, the content-only formulas.h5p with libraries="hub" fails with bad-archive: "This package is missing H5P.QuestionSet-1.21, and http://localhost:5199/demo/hub did not supply them: Could not read the archive index". On a static host the address 404s instead. With libraries="pack" the same package plays from the pack. No console line names hub any more.

Not run: Firefox and WebKit, and the full browser suite; the change touches only how the attribute is parsed.

Release

Breaking for a page with libraries="hub", an embed address with &libraries=hub, a site written with --default-libraries hub, and a pipeline running --libraries hub. Each should write pack. The next player, embed and verify releases should list it first. Pre-1.0, so a minor.

🤖 Generated with Claude Code

`hub` has been read as `pack` since player 0.6. Kept into 1.0 it would have had to stay through
1.x, so the element, the embed site and the verifier stop special-casing it: it is a word like any
other, a URL relative to the page, and a page still writing it fails with an error naming that
address. A bare `auto-resize` is no alias, since anything but `off` means on, so it leaves the
deprecation list and our own pages stop writing it. The README's API table names the
`saveInterval` property, and loses a runtime note the peer range already enforces.

BREAKING CHANGE: libraries="hub" (element), &libraries=hub and --default-libraries hub (embed),
--libraries hub (verify) no longer mean the pack. Write pack.

Closes #44

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@alekswebnet
alekswebnet merged commit 49b4742 into main Oct 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop libraries="hub" and settle auto-resize before 1.0

1 participant