v4 takes the @studiometa/js-toolkit name at 4.0.0-alpha.0 - #871
Conversation
The v4 prototype was `@studiometa/js-toolkit-v4`, private, at version 0.0.0, so nothing outside this repository could install it. It is now the package: `@studiometa/js-toolkit@4.0.0-alpha.0`, publishable, in `packages/js-toolkit/`. An npm workspace cannot hold two packages under one name, so v3 had to leave `main` for v4 to take it. It did, intact, on the `3.x` branch, which keeps the `latest` release, the documentation at js-toolkit.studiometa.dev and the three open pull requests that target v3. What moved: - `packages/v4/` → `packages/js-toolkit/`, with `git mv` so the history follows. `packages/js-toolkit/` (v3), `packages/docs/` (the 3.x documentation) and `packages/demo/` (the 3.x playground) are deleted here and live on `3.x`. - 360 occurrences of `@studiometa/js-toolkit-v4` across 122 files: the docs samples, the specs, the ported `@studiometa/ui` families, the packed-package consumers and the Vitest and TypeScript path aliases. The twoslash caches were regenerated by the docs build, since a cache is keyed on the sample and every sample changed. - Every `packages/v4` path: the root scripts, `generate-subpaths.js`, the lint and format configs, and the workflows. What the package gained, because it is published now: a `README.md` and a `LICENSE` in the tarball, `publishConfig.access`, and the repository, author, license, bugs and homepage fields. `check-package.js` asserts the packed top level, so it now expects those two files and still refuses anything that is not a build artifact. `src/coexistence.spec.ts` and `tsconfig.coexistence.json` are deleted. They are the only files that need both versions installed at once, and they stay on `3.x` where v3's sources are. RATIONALE.md says so where it describes the symbol that spec defends. Two things this move surfaced rather than caused: - `oxlint`'s component-authoring block applied to v3's sources and the 3.x demo. Retargeted at `migration/` and `demo/`, which is where this repository writes components now — minus `require-config` and `async-lifecycle-methods`, which encode a v3 shape: v4 lets an abstract base declare no config, and `mounted()` returns its cleanup, so making it `async` is the mistake rather than the rule. - `vite-plugin-decorators` filtered on `code: '@'` alone, so it handed `demo/index.html` to SWC, which parsed it as TypeScript and threw. The root never exposed the v4 demo's build script, so nothing ran into it. This commit exposes it as `npm run demo:build`, and adds the `id` filter the `code` filter needed. Documentation: js-toolkit-v4.studiometa.dev keeps its domain for the whole prerelease, and the Cloudflare Pages project `js-toolkit` now has `3.x` as its production branch, so js-toolkit.studiometa.dev keeps serving the 3.x pages from that branch. Verified before this commit deletes them: the first deploy from `3.x` landed as a production deployment carrying the custom domain. The two domains swap when 4.0.0 ships. Until then the install instructions say `@studiometa/js-toolkit@next`, since plain `npm install` gives 3.x. `focus-trap` moves from the root to this package: it is an optional peer of `@vueuse/integrations`, which VitePress uses, and the docs build fails without it. Verified: `npm run build`, `npm run lint`, `npm test` (113 files, 1569 tests), `npm run check:package` (596 files, 306.6 kB packed, Node, browser and TypeScript consumers), `npm run docs:build` and `npm run demo:build`. Release plumbing — the lockstep `postversion` hook, the publish workflow and the tag itself — is the next commit, not this one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011izFBQT4AsFcD4tVZz1f7R
Export sizeBundled per export with peer dependencies left external, dynamic imports excluded and the output minified; sizes are gzipped. @studiometa/js-toolkit
Unchanged (7)@studiometa/js-toolkit
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #871 +/- ##
==========================================
- Coverage 97.06% 94.55% -2.51%
==========================================
Files 176 38 -138
Lines 4561 1176 -3385
Branches 1330 498 -832
==========================================
- Hits 4427 1112 -3315
+ Misses 122 57 -65
+ Partials 12 7 -5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code ReviewRisk: Low — No demonstrable blocking defects were found in the files opened; the package rename and v4 workspace transition are safe to merge subject to the unreviewed files being validated separately. The change promotes the v4 prototype to Review usage: 1,596,123 in (1,292,449 cached) / 1,064 out tokens — $0.2576 (openrouter/openai/gpt-5.6-luna, thinking: low) Reviewed by @weareikko/code-review v0.9.5 for commit 3e74e36. |
mount benchmarksBase and head measured on this runner, alternating over 3 rounds each; every value is the median of the round medians. Running both sides on one machine is what removes cross-machine noise — a cached baseline from another runner would put it back. A move under 25%, or on a benchmark under 5 ms, is not reported as a change: it is inside the measured noise of a shared runner. The base commit has no benchmark suite, so every benchmark below is new. A base that failed to build or measure would have failed this job rather than appearing here.
|
What
v4 takes the
@studiometa/js-toolkitname at4.0.0-alpha.0, andmainbecomes the 4.x line.The prototype was
@studiometa/js-toolkit-v4,private, at version0.0.0. Nothing outside this repository could install it, which blocks the beta feedback, the@studiometa/ui2.0 port and any pilot project.An npm workspace cannot hold two packages under one name, so v3 had to leave
main. It did, intact, on3.x.The two lines
mainnext3.xlatestlateststays at 3.9.0. PRs #708, #749 and #750 are retargeted at3.x.Changes
packages/v4/→packages/js-toolkit/withgit mv, so the history follows.packages/js-toolkit/(v3),packages/docs/(3.x documentation) andpackages/demo/(3.x playground) are deleted here and live on3.x.@studiometa/js-toolkit-v4across 122 files — docs samples, specs, ported@studiometa/uifamilies, packed-package consumers, and the Vitest and TypeScript aliases. The twoslash caches were regenerated by the docs build, since a cache is keyed on the sample and every sample changed.packages/v4path: root scripts,generate-subpaths.js, the lint and format configs, the workflows.README.mdandLICENSEin the tarball,publishConfig.access, repository, author, license, bugs, homepage.check-package.jsexpects the two new top-level files and still refuses anything that is not a build artifact.src/coexistence.spec.tsandtsconfig.coexistence.jsonare deleted. They are the only files needing both versions installed at once, so they stay on3.x;RATIONALE.mdrecords where they went.@studiometa/js-toolkit@next, because plainnpm installgives 3.x until 4.0.0 ships.Two things this surfaced rather than caused
migration/anddemo/— minusrequire-configandasync-lifecycle-methods, which encode a v3 shape: v4 lets an abstract base declare no config, andmounted()returns its cleanup, so making itasyncis the mistake rather than the rule.vite-plugin-decoratorsfiltered oncode: '@'alone, so it handeddemo/index.htmlto SWC, which parsed it as TypeScript and threw. The root never exposed the v4 demo's build script, so nothing ran into it. This PR exposes it asnpm run demo:buildand adds theidfilter thecodefilter needed.Documentation domains
js-toolkit.studiometa.dev must keep serving the 3.x pages for the whole prerelease. The Cloudflare Pages project
js-toolkitnow has3.xas its production branch, anddocs.ymlon that branch names the branch explicitly, since an Actions checkout can be detached.Verified before this PR deletes
packages/docs: the first deploy from3.xlanded as aproductiondeployment carrying thejs-toolkit.studiometa.devalias.Verification
npm run build— cleannpm run lint— clean, apart from oneunicorn(no-useless-spread)warning that predates this branchnpm test— 113 files, 1569 tests, all passingnpm run check:package— 596 files, 306.6 kB packed; Node, browser and TypeScript packed consumers passnpm run docs:buildandnpm run demo:build— both passNot in this PR
The release plumbing: the lockstep
postversionhook, the publish workflow gate, the changelog and the tag itself.🤖 Generated with Claude Code
https://claude.ai/code/session_011izFBQT4AsFcD4tVZz1f7R