Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings #272 to main.
experiment_idin datapipe-client. The client accepts the same name as the jsPsych extension.experimentIDkeeps working.saveData({ session })andsession.ready(). A streamed submission no longer waits on a flush that a background tab throttles (Early Zenodo Notes #273).experiment_idandsession.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_idandsessionwith a script tag that still loads 0.1.0, and 0.1.0 understands neither.🤖 Generated with Claude Code