Skip to content

DX sweep: rename to @widgrensit/asobi, point at sdk_demo_backend on :8084, publish on release#4

Merged
Taure merged 1 commit into
mainfrom
fix/dx-pre-release-sweep
May 1, 2026
Merged

DX sweep: rename to @widgrensit/asobi, point at sdk_demo_backend on :8084, publish on release#4
Taure merged 1 commit into
mainfrom
fix/dx-pre-release-sweep

Conversation

@Taure
Copy link
Copy Markdown
Contributor

@Taure Taure commented May 1, 2026

Summary

Cross-SDK DX sweep — asobi-js subset. Gets the package npm-publishable and pointed at the canonical demo backend.

  • package.json: rename @asobi/client@widgrensit/asobi (the @asobi scope is unowned; @widgrensit matches the rest of the org). Bump 0.1.00.2.0. engines.node >=18.0.0>=22.0.0 because the SDK relies on the global WebSocket which is only stable in Node 22+. Earlier Node versions can polyfill via ws and assigning to globalThis.WebSocket — documented in the README.
  • Full package metadata: repository, homepage, bugs, keywords, exports field, sideEffects: false, publishConfig.access: public.
  • prepare script runs tsc so npm install <git-url> produces a built dist/ (currently the package on main ships no dist/, so even the git-URL fallback wouldn't import).
  • README: install command updated to @widgrensit/asobi. New "Run a backend first" section pointing at widgrensit/sdk_demo_backend on :8084. Quickstart now subscribes to match.matched before queueing and documents match.matched vs match.joined for SDK consumers (matchmaker push vs reply to a client-initiated match.join). Added a note that on() returns an unsubscribe function.
  • CHANGELOG.md added.
  • Release workflow: existing tag-on-merge job now also runs npm ci, npm run build, and npm publish --provenance --access public. Requires an NPM_TOKEN repo secret.

Surfaced by the asobi-dx-js agent during the cross-SDK pre-release sweep.

Manual step before merge

Create an NPM_TOKEN repo secret (a publish-scope npm token for the @widgrensit org) so the release workflow can publish.

After merge, the existing release job will tag v0.2.0, create the GitHub release, build, and npm publish automatically. If you want to dry-run first, comment out the Publish to npm step.

Test plan

  • npm ci — clean install
  • npm run build — produces dist/
  • npm pack --dry-run — 25 kB tarball, 98 files, manifest looks right
  • Wire NPM_TOKEN and merge to verify publish works

Deferred

  • Typed payload generics on on<T>(event) and send<TReq, TRes>(...).
  • Vite/Phaser standalone example under examples/.
  • Mark deprecated REST API classes with @deprecated JSDoc.
  • websocket.ts robustness fixes (_parse_error, _reconnected events, null-channel guards).

…, npm publish on release

Cross-SDK DX sweep — asobi-js:

- package.json: rename @asobi/client -> @widgrensit/asobi (the @asobi
  scope is unowned), bump 0.1.0 -> 0.2.0, engines >=22.0.0 (the SDK
  uses the global WebSocket which is only stable in Node 22+).
- Add full package metadata: repository, homepage, bugs, keywords,
  exports field, sideEffects: false, publishConfig.
- Add prepare script so 'npm install <git-url>' produces a built dist/.
- README: bump install command to @widgrensit/asobi, add 'Run a backend
  first' pointing at widgrensit/sdk_demo_backend on :8084, replace the
  arena-mode quickstart with a demo-mode one that subscribes to
  match.matched before queueing and chains it explicitly. Document
  match.matched vs match.joined for SDK consumers, and that on()
  returns an unsubscribe function.
- CHANGELOG.md added.
- Release workflow: install + build + npm publish --provenance after
  tag/release. Requires NPM_TOKEN secret on the repo.
@Taure Taure merged commit da7ce65 into main May 1, 2026
2 checks passed
@Taure Taure deleted the fix/dx-pre-release-sweep branch May 1, 2026 14:38
Taure added a commit that referenced this pull request May 2, 2026
Rewrites the README so it reflects what asobi-js actually is — a thin transport client for the asobi protocol — and drops the broad feature-table claims (worlds, terrain, voting, economy, leaderboards, etc.) that overstated coverage.

Changes:
- Add Scope and Status sections; mark typed REST helpers as deprecated for v1.0
- Replace REST-heavy quickstart with a WebSocket-only example using `AsobiWebSocket`
- Add API reference block for `AsobiWebSocket`
- Move engine/framework integrations (Phaser/Three/Pixi) to opt-in `examples/` rather than bundled exports
- Remove the Features matrix that promised full coverage of unstable subsystems

Rebase note: this PR was rebased onto main after #4/#5/#7/#8 landed. The README conflict was resolved by keeping the PR's narrowed-scope structure (Scope/Status/API/adapters sections, no Features table) while preserving main's factual updates that don't conflict with the narrowing: the Node 22+ header, the @widgrensit/asobi package name, the "Run a backend first" section pointing at sdk_demo_backend on :8084, the Browser usage section, and the canonical link to the WebSocket protocol guide. The PR's deletion of the Features matrix and REST-flavoured quickstart was preserved — that deletion is the whole point of the PR.

No code change. Code refactor follows in a separate PR.
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