Skip to content

Release: datapipe-client 0.2.0 samples, experiment_id, and saveData({ session }) - #274

Merged
jodeleeuw merged 6 commits into
mainfrom
test
Sep 22, 2026
Merged

jodeleeuw merged 6 commits into
mainfrom
test

Conversation

@jodeleeuw

Copy link
Copy Markdown
Member

Brings #272 to main.

  • Pinned script tags. Every docs sample loads an exact version of datapipe-client and extension-pipe, and the client pin follows each release on its own.
  • experiment_id in datapipe-client. The client accepts the same name as the jsPsych extension. experimentID keeps working.
  • saveData({ session }) and session.ready(). A streamed submission no longer waits on a flush that a background tab throttles (Early Zenodo Notes #273).
  • Samples and README. They use experiment_id and session.

After merging

This push to main opens the "Release datapipe-client" PR, which bumps the client to 0.2.0. Merge it right away. Until it merges, prod serves samples using experiment_id and session with a script tag that still loads 0.1.0, and 0.1.0 understands neither.

🤖 Generated with Claude Code

jodeleeuw and others added 6 commits September 21, 2026 18:30
An unpinned unpkg URL serves the newest release, so publishing one could
change a study that is already collecting data. Every sample now takes its
tag from components/dashboard/script-tags.js, pinned to extension-pipe
0.2.0 and datapipe-client 0.1.0, and the client README pins too.
__tests__/script-tags.test.js fails when the client pin falls behind
packages/client/package.json.

Also say on the streaming and sending-data pages that the library takes
experimentID while the extension's parameter is experiment_id.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The jsPsych extension and plugin call the experiment ID experiment_id, so
the client now takes that name too. experimentID keeps working, because
studies on an unpinned script tag pass it and so does the extension. If
both are given and differ, the one-shot calls throw and a session starts
inert with a warning. The wire format is unchanged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The docs samples now read datapipe-client's version from its package.json,
so the release PR's version bump moves their pin. That can't be done by a
sync script: changesets/action (cwd: packages/client) commits only files
under that directory, so an edit to components/ would never be committed.

The README is inside the package, so `version-packages` now runs
scripts/sync-readme-pin.mjs after `changeset version` to rewrite its pin.
The script fails if the README has no unpkg URL to pin, rather than
shipping one that points at the previous release.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The documented pattern was flush, read sessionId, submit. The flush was
only there to wait for the session to start, but it also waited on the
last staged write, which a backgrounded tab throttles hard, so the final
submission could sit for most of a minute (#273).

session.ready() waits for startup alone. saveData({ session }) awaits it
and sends the id, so callers no longer read sessionId themselves. The
sessionId option still works. The README, the dashboard sample and the
streaming docs now show the new pattern.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The client accepts experiment_id as of this release, so the samples and
README now use the same name as the jsPsych extension, and the notes
explaining that the two names differ are gone.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Pin docs script tags and accept experiment_id in datapipe-client
@jodeleeuw
jodeleeuw merged commit a2e472b into main Sep 22, 2026
5 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.

1 participant