Skip to content

chore: align the toolchain on pnpm 12, TypeScript 7, Biome 2.6 and Vitest 5 - #26

Merged
rqbazan merged 8 commits into
mainfrom
chore/align-toolchain
Nov 3, 2026
Merged

rqbazan merged 8 commits into
mainfrom
chore/align-toolchain

Conversation

@rqbazan

@rqbazan rqbazan commented Nov 3, 2026

Copy link
Copy Markdown
Member

Summary

This moves theme-toggle to the toolchain the other Lab repos share: pnpm 12, TypeScript 7, Biome 2.6, Vitest 5 and @rrlab/cli 1.7.0. Its git hooks now come from @rrlab/cli, and gitleaks scans each commit and each pull request.

 mise.toml
-pnpm 10.30.3
+min_version 2026.10.19; pnpm 12.16.1; gitleaks 8.30.1   (mise.lock in format 3; Node locked at 24.22.2)
 package.json
-packageManager: pnpm@10.30.3
+devEngines.packageManager: pnpm ^12.16.1, onFail error
-typescript ^6.0.3, @biomejs/biome ^2.0.0 (2.5.1), vitest ^4 with @vitest/browser* 4.1.12, playwright 1.61.1
+typescript ^7.0.2, @biomejs/biome ^2.6.4, vitest 5.0.5 with @vitest/browser* 5.0.5, playwright 1.64.1, vitest-browser-react 2.3.0
-tsdown ^0.22, oxlint ^1.0.0 (1.71.0), oxfmt ^0.73.0, oxlint-tsgolint ^0.25.0, lefthook ^2.1.9
+tsdown ^0.23.4, oxlint ^1.90.0, oxfmt ^0.75.0, oxlint-tsgolint ^7.0.2005, lefthook ^2.2.2
-@rrlab/cli ^1.3.2 and its plugins and configs
+@rrlab/cli ^1.7.0, biome-plugin ^1.2.3, biome-config ^0.0.7, oxc-plugin ^1.3.0, ts-config ^0.0.6, tsdown-config ^0.2.1, tsdown-plugin ^1.3.0, vitest-plugin ^0.3.0
 lefthook.yml
-inline jobs: rr jsc, rr tsc
+extends @rrlab/cli's base.yml (jsc, tsc, gitleaks), a shared-hooks guard; pre-push pnpm test (unchanged)
 .github/workflows
+ci.yml: checks ("Check, test and build") and secrets (gitleaks over the pull request's commits); Test passes only when both do
+mise-action v5.2.3 with mise 2026.10.19; zizmor 1.31.1; permissions granted per job

Exceptions

None.

Calls made here

  • vitest is pinned exactly to 5.0.5, where the repo otherwise uses ^: @vitest/browser and @vitest/browser-playwright 5.0.5 require exactly vitest 5.0.5, and ^5.0.5 resolved 5.1.0.
  • Test check: the work moved to a checks job, secrets is the scan the other Lab repos run, and Test needs both with if: always(), so a failed scan fails the required check instead of skipping it. Triggers are unchanged (pull requests only).
  • Biome 2.6 formats Markdown and YAML: biome.json skips .mise/locks, .changeset/*.md, CHANGELOG.md and pullfrog.yml, and uses the installed Biome's schema. brand/README.md took Biome's table alignment.
  • Changeset: a patch for @variablelab/theme-toggle. rr pack's output changed with tsdown 0.23 and TypeScript 7: the bundle's comments and the declarations' layout differ, and the API doesn't.
  • Left as they were: release.yml's create-github-app-token pin; workflow-audit.yml's triggers; vite 8.1.0's advisories, tracked in Dependency audit found known vulnerabilities #25.

Evidence

  • Before: main runs pnpm 10, TypeScript 6 and Vitest 4, and its hooks have no secret scan.
    After: checked on this branch:

    Check Result
    pnpm rr check Biome checked 29 files, no fixes; oxlint's type-aware check passes on TypeScript 7.0.2
    pnpm test Vitest 5.0.5 in the browser: 2 files, 25 tests passed
    rr pack tsdown 0.23.4 emits dist/initial.js, dist/index.mjs and the declarations with TypeScript 7.0.2
    Fresh clone: mise install twice, then pnpm install git status empty; lefthook wrote pre-commit and pre-push
    Fresh clone: a staged fake ghp_ token commit refused, leaks found: 1, HEAD unchanged; a harmless commit then passes all four jobs

Merge Danger

Door: two-way

Reverting the squash restores main.

Blast Radius: contributors, CI and the next release

  • Contributors need mise 2026.10.19 or later and pnpm 12. npm inside the repo stops with EBADDEVENGINES, as devEngines intends.
  • The next release publishes a patch of @variablelab/theme-toggle built by tsdown 0.23 and TypeScript 7.

🤖 Generated with Claude Code

https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g

rqbazan and others added 7 commits November 3, 2026 12:21
Pin pnpm 12.16.1 and gitleaks 8.30.1 in mise.toml with a min_version, lock
Node 24.22.2, and declare pnpm through devEngines instead of packageManager.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g
Bump the dev toolchain: TypeScript 7.0.2, Biome 2.6.4, Vitest 5.0.5 with
its browser packages, Playwright 1.64.1, vitest-browser-react 2.3.0, tsdown
0.23.4, oxlint 1.90.0, oxfmt 0.75.0, oxlint-tsgolint 7.0.2005, lefthook
2.2.2 and the current @rrlab/* packages.

Biome 2.6 formats Markdown and YAML, so biome.json skips the files other
tools write (the changesets, CHANGELOG.md, the Pullfrog workflow and mise's
lock sidecars), and brand/README.md takes its table formatting. vitest is
pinned to 5.0.5, the exact version its browser packages peer on.

The rebuilt dist/ differs from 2.0.2's in comments and in the declaration
file's layout only, so it ships as a patch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g
lefthook.yml extends the base.yml that @rrlab/cli ships, which adds gitleaks
on the staged changes to the Biome fixes and the type check, and a
shared-hooks job fails a commit when that file is missing from node_modules.
The pre-push tests stay.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g
Every workflow but Pullfrog's sets up mise 2026.10.19 through mise-action
v5.2.3, pinned by SHA, and Workflow audit runs zizmor 1.31.1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g
A secrets job runs gitleaks, pinned through mise, over the pull request's
commits beside the checks, and the required Test check now reports both,
so it fails when either does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g
The workflow drops its contents: read grant to `permissions: {}` and gives
it to the audit job instead, the shape CI, Release and Dependency audit use.
The job's token keeps the same permission.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g
mise 2026.10.19 kept mise.lock in lockfile format 0 and warned on each run that it is outdated. `mise lock --upgrade` rewrites it in format 3, which records the request each version resolves from; the locked versions, platforms and checksums stay the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g
@changeset-bot

changeset-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4ed3755

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@variablelab/theme-toggle Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the toolchain alignment on 900d564: pnpm 12, TypeScript 7, Biome 2.6, Vitest 5, shared git hooks, and the CI secret-scan gate. Library source is untouched.

  • Runtime pins — mise 2026.10.19 locks Node 24.22.2, pnpm 12.16.1 and gitleaks 8.30.1, with checksums in mise.lock.
  • Package manager contract — packageManager is replaced by devEngines.packageManager (pnpm ^12.16.1, onFail: error). CI still installs the mise pin.
  • Dev dependencies — TypeScript 7.0.2, Biome 2.6.4, Vitest 5.0.5 pinned exactly (matching @vitest/browser*), and @rrlab/cli 1.7.0 with its plugins.
  • Git hooks — lefthook.yml extends @rrlab/cli's base.yml (Biome, typecheck, gitleaks) and fails the commit if that file is missing. Pre-push still runs the tests.
  • CI gate — checks and secrets run in parallel. The required Test job passes only when both succeed. Workflows use hash-pinned mise-action v5.2.3 and zizmor 1.31.1, with permissions granted per job.
  • Formatter scope — Biome skips lockfiles, changesets, the changelog and generated pullfrog.yml. brand/README.md is only a table reflow.
  • Release note — a patch changeset for declaration and comment layout. The API is unchanged.

Pullfrog  | View workflow run | Using grok-4.7 | 𝕏

Corepack installs the newest release that a devEngines range allows. The exact version keeps it on the pnpm that mise pins and that wrote the lockfile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01J1Ak7btEZVEoTBDd6NBH9g

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

Reviewed the commit since 900d564. The package-manager gate now requires the same pnpm the toolchain already installs.

  • Exact pnpm pin — devEngines.packageManager.version and the lockfile specifier are 12.16.1, matching mise.toml, instead of ^12.16.1. onFail stays error.

Pullfrog  | View workflow run | Using grok-4.7 | 𝕏

@rqbazan
rqbazan merged commit 2017cd6 into main Nov 3, 2026
11 checks passed
@rqbazan
rqbazan deleted the chore/align-toolchain branch November 3, 2026 22:49
@vland-bot vland-bot Bot mentioned this pull request Nov 3, 2026
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