Skip to content

Vendor prebuilt multiplayer bundles so both experiments actually run - #1

Open
htsukamoto5 wants to merge 2 commits into
mainfrom
chore/vendor-multiplayer-bundles
Open

Vendor prebuilt multiplayer bundles so both experiments actually run#1
htsukamoto5 wants to merge 2 commits into
mainfrom
chore/vendor-multiplayer-bundles

Conversation

@htsukamoto5

Copy link
Copy Markdown
Member

Problem

Neither experiment file could load. The @jspsych-multiplayer script tags pointed at npm, where:

package npm status
plugin-multiplayer-reference-game not published — hard 404
adapter-multiplayer-local 0.1.0, but pre-namespace-migration
plugin-multiplayer-sync 0.1.0, but pre-namespace-migration
plugin-multiplayer-role 0.1.0, but pre-namespace-migration

Both files pin jsPsych core to the #3694 preview build, which moved the multiplayer API to the jsPsych.multiplayer namespace. The published 0.1.0 bundles predate that and still call the old core API (verified: plugin-multiplayer-sync@0.1.0 calls pluginAPI.wait), so they are incompatible with the pinned core.

Change

Vendor all four browser bundles into vendor/ and load them over jsDelivr, SHA-pinned.

All four are vendored, not just the 404ing one — pinning only reference-game would have traded a visible 404 for a subtler runtime failure against the migrated core.

  • Built with npm run build from jspsych/jspsych-multiplayer@69c0d7b
  • vendor/README.md documents provenance and the teardown steps
  • Replaces the stale TODO: pin to a real published version comment with the actual situation

Verification

  • All four jsDelivr URLs return HTTP 200 with byte sizes matching the local builds
  • Both files served locally and play-tested two-tab: lobby → role assignment → rounds → submit, no console errors

⚠️ Merge strategy

Please merge with a merge commit (not squash, not rebase).

The <script> tags are pinned to 5046bf0, the commit that adds vendor/. Squash and rebase both rewrite commit SHAs, which would orphan that commit and can break the jsDelivr URLs. A merge commit preserves it.

If it does get squashed, the fix is a follow-up PR re-pinning both HTML files to the new main SHA.

Teardown

This whole directory is temporary. Once jspsych-multiplayer#35 (Version Packages) merges and republishes, repoint the tags to cdn.jsdelivr.net/npm/... and delete vendor/.

htsukamoto5 and others added 2 commits July 29, 2026 17:00
The @jspsych-multiplayer packages cannot currently be loaded from npm:
plugin-multiplayer-reference-game is unpublished (404), and the published
0.1.0 builds of the local adapter, sync and role plugins predate the
jsPsych.multiplayer namespace migration, so they are incompatible with the
#3694 preview core these experiments pin.

Vendor all four browser bundles (built from jspsych-multiplayer@69c0d7b) so
both experiment files load from a plain URL with no build step. See
vendor/README.md for provenance and removal steps once PR #35 publishes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Repin the four @jspsych-multiplayer script tags in both experiment files from
npm (unpublished / pre-migration) to the SHA-pinned vendor/ bundles added in
the previous commit, and replace the stale "pin to a real published version"
TODO with the actual situation.

Both files now load with no build step and no 404s.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

1 participant