Skip to content

feat: publish as @frsource/box3d-wasm, track Box3D via git dependency, emit types - #1

Merged
FRSgit merged 8 commits into
mainfrom
feat/frsource-release-automation
Oct 7, 2026
Merged

FRSgit merged 8 commits into
mainfrom
feat/frsource-release-automation

Conversation

@FRSgit

@FRSgit FRSgit commented Oct 6, 2026 •

Copy link
Copy Markdown
Member

Summary

Turns the fork into a published package that follows Box3D automatically.

  • @frsource/box3d-wasm name, repo links, publishConfig.access: public, semantic-release via @frsource/semantic-release-config (main → latest, single channel). The July next prerelease channel and sync-upstream.yml are dropped: Box3D has tagged once in three months, so they would have frozen latest.
  • npm trusted publishing (OIDC): the release job has id-token: write and no NPM_TOKEN; @semantic-release/npm 13 does the token exchange itself. Node 24 ships npm 11.19 (minimum 11.5.1).
  • Box3D as a git dependency: @erincatto/box3d: github:erincatto/box3d#<sha> in package.json replaces scripts/versions.json + fetch-deps.sh. build.sh compiles from node_modules/@erincatto/box3d. pnpm replaces npm because npm refuses a git dependency without a package.json.
  • Renovate bumps the engine as a digest update. renovate.json adds the rule the shared preset lacks: feat(engine) commit type so semantic-release releases it, automerge, schedule: at any time.
  • Generated types: emcc --emit-tsd writes dist/box3d.d.ts / dist/box3d.deluxe.d.ts from the embind registrations; exports points types at them (plus dist/entry.d.ts for the auto entry). Object-valued params (val) are any for now.
  • Engine bump to e77352c (2026-10-03, 29 commits): two renames in glue.cpp (b3Body_Get{Local,World}CenterOfMass → b3Body_Get{Local,World}Center). JS API unchanged.
  • csrc/flat.cpp clang-formatted (upstream never ran lint:native on it); nproc fallback for macOS in build.sh.

Verified locally (emsdk 6.0.2, node 22.14, pnpm 12.5.1)

  • pnpm install --frozen-lockfile, clean pnpm build (standard + deluxe + .d.ts), pnpm test 26/26, pnpm lint, pnpm lint:native.
  • Baseline at the old pin built and passed first; the bump was then applied on top.

Before merging

  • CI run on this PR green with emsdk 4.0.18 (local verification used 6.0.2).
  • Trusted publisher on npmjs.com for @frsource/box3d-wasm: GitHub Actions, owner FRSOURCE, repository box3d-wasm, workflow filename ci.yml, no environment. Tick "allow npm publish": configurations created after 2026-09-03 default to npm stage publish only, and semantic-release runs npm publish. The config expires if the first publish does not happen within 2 days of creating it.
  • If npmjs.com does not offer package settings for a name that has never been published, bootstrap with one manual npm publish from a local build, then add the trusted publisher.

🤖 Generated with Claude Code

@FRSgit
FRSgit marked this pull request as ready for review October 6, 2026 21:17
FRSgit and others added 2 commits October 7, 2026 00:10
The fork is the product: the package, repository, bug tracker and
homepage now point at FRSOURCE, the scope is public, and the README
says what the fork adds over monteslu/box3d-wasm.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
emcc --emit-tsd writes dist/box3d.d.ts and dist/box3d.deluxe.d.ts at
link time, so the published types cannot drift from the binding. The
auto-detecting entry gets a hand-written entry.d.ts that re-exports the
standard flavour's types, and package.json exports point at them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@FRSgit
FRSgit force-pushed the feat/frsource-release-automation branch from e97c99e to 192a5fc Compare October 6, 2026 22:12
FRSgit and others added 6 commits October 7, 2026 00:13
Box3D is now the @erincatto/box3d devDependency pinned to a commit of
github:erincatto/box3d, so pnpm install fetches the engine source and
Renovate bumps the pin as a digest update (committed as feat(engine) and
automerged once CI is green). scripts/fetch-deps.sh and versions.json
are gone, and the build reads the source from node_modules.

The pin moves from 29bf523 to e77352c (2026-10-03), which renamed
b3Body_Get{Local,World}CenterOfMass to b3Body_Get{Local,World}Center.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
emsdk installs emscripten's npm deps with --production, so emcc falls
back to the project's tsc (TypeScript 6) and runs it from the emsdk
directory. TypeScript 6 walks up from there and, with the cache inside
the workspace, finds the project tsconfig.json and exits with TS5112.
Caching emsdk one level above the workspace keeps that search empty.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…orkspace

actions/cache rejects relative paths that leave the workspace, so the
only way to keep emsdk out of the tsconfig.json search path is to drop
actions-cache-folder. The uncached install takes about thirty seconds,
roughly what restoring the 500 MB cache tarball took.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
emscripten 4.0.18 passes --outFile to tsc when generating the embind
declarations, and TypeScript 6 rejects that option as deprecated
(TS5101). emscripten stopped passing it in 6.0.0; 6.0.2
is the version the local build and tests were run with.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ence

Centered header, quick start, flavour table and a reference that covers
every bound option and method: world, bodies, shapes, the nine joint
types, queries, events, memory handling and the generated types.
Defaults are taken from the pinned Box3D definitions.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Box3D's default shape density is 1000 (water) and contact events are
off until enableContactEvents is set.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@FRSgit
FRSgit merged commit edfc2c1 into main Oct 7, 2026
3 checks passed
@FRSgit
FRSgit deleted the feat/frsource-release-automation branch October 7, 2026 10:35
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