Skip to content

Migrate tooling to pnpm, Biome, and tsdown - #34

Merged
rosskevin merged 3 commits into
mainfrom
update-tooling
Jun 3, 2026
Merged

rosskevin merged 3 commits into
mainfrom
update-tooling

Conversation

@rosskevin

@rosskevin rosskevin commented Jun 3, 2026 •

Copy link
Copy Markdown
Member

Executive Summary

Modernizes the project's entire build and developer toolchain in a single pass: package management moves from Yarn 4 → pnpm 10, linting/formatting from ESLint + Prettier → Biome, and bundling from tsup → tsdown. The published package keeps the same shape (same .js/.d.ts entry points) and now additionally ships source that the declaration source-map resolves to. Contributors get a faster, actively-maintained toolchain; consumers see no API changes.

  • For contributors: one pnpm install, one tool for lint+format (pnpm check-biome), and pnpm check to run types + lint + tests together; faster builds via Rolldown-based tsdown.
  • Consumer impact: no API changes. One requirement change — the package now requires Node ≥ 24 (was ≥ 20).
  • Security & quality: lockfile churn aside, the real source/config delta is small (~40 net lines); 18 tests, tsc -b, and Biome are all green.

🔗 Pull request: #34 — Migrate tooling to pnpm, Biome, and tsdown

What changed

Package manager: Yarn 4 → pnpm 10

  • packageManager set to pnpm@10.33.0; yarn.lock, .yarnrc.yml, and the vendored .yarn/ release removed; pnpm-lock.yaml added.
  • Single-package pnpm.onlyBuiltDependencies approves esbuild + @biomejs/biome build scripts (pnpm 10 blocks them by default).
  • Scripts now pnpm-based; clean:yarn → scripts/clean-pnpm.ts; reset/release call pnpm.

Lint/format: ESLint + Prettier → Biome

  • biome.jsonc extends @alienfast/biome-config/base. noUnresolvedImports is disabled (ambient .d.ts + virtual:* false positives) and useImportExtensions is disabled (this is a published NodeNext ESM lib — relative imports must keep their emitted .js specifiers, which Biome wanted to rewrite to .ts); src/__tests__/data/** fixtures are excluded.
  • Removed eslint.config.mjs, .prettierignore, the prettier package.json key, and ~20 now-dead eslint-disable comments. Codebase normalized to Biome (package.json keys sorted, import type, etc.).

Bundler: tsup → tsdown

  • tsdown.config.ts replaces tsup.config.ts. fixedExtension: false preserves the published .js/.d.ts contract instead of tsdown's node default of .mjs/.d.mts, so exports/main resolve unchanged.
  • Dropped the ignoreDeprecations: "6.0" tsconfig hack — it only existed because tsup's DTS step injected a deprecated baseUrl; tsdown's oxc-based generator doesn't, so tsconfig.json is clean again.
  • Now publishes src/ (not src/__tests__) plus index.d.ts.map so type → source navigation resolves for consumers. Dropped the vestigial rollup devDependency.

CI (.github/workflows/build.yml, setup, build-cache)

  • pnpm-based setup (pnpm/action-setup + setup-node cache: pnpm, --frozen-lockfile).
  • Action bumps: checkout v4 → v6, setup-node v4 → v6, cache v4 → v5, pnpm/action-setup v4 → v6.
  • Added a concurrency group (cancels superseded PR runs only — never interrupts a release on main/next); replaced the repeated git fetch --unshallow --tags steps with fetch-depth: 0 on checkout.

Code Impact

Category Added Removed Net
src (app) 28 33 −5
src (tests) 44 76 −32
CI (.github) 36 44 −8
Config / build / docs 197 191 +6
Subtotal (excl. lockfiles) 305 344 −39
Lockfiles + vendored .yarn 5,274 9,897 −4,623
Total 5,579 10,241 −4,662

The actual hand-written delta is tiny (~40 net lines); the large numbers are entirely the yarn.lock → pnpm-lock.yaml swap and removal of the vendored Yarn release.

Breaking Changes

  • Contributors: the repo now uses pnpm. yarn install/yarn <script> no longer work — use pnpm install and pnpm <script>.
  • Consumers: engines.node raised from >=20 to >=24 (drops Node 20/22). Likely a major version bump under semver.

Testing

  • ✅ pnpm build — ESM + DTS (.js/.d.ts/.js.map/.d.ts.map)
  • ✅ pnpm check-types (tsc -b)
  • ✅ pnpm test — 18 passed
  • ✅ pnpm check-biome — no findings
  • ✅ npm pack --dry-run — tarball ships dist/ + src/index.ts + src/utils.ts, no test fixtures

- pkg manager: yarn 4 -> pnpm 10 (lockfile, scripts, .npmrc, single-package onlyBuiltDependencies)
- lint/format: eslint + prettier -> biome via @alienfast/biome-config/base; normalize codebase; strip dead eslint-disable comments
- bundler: tsup -> tsdown; preserve .js/.d.ts exports contract (fixedExtension: false); drop tsup-only ignoreDeprecations hack; publish src + .d.ts.map so type->source maps resolve
- ci: pnpm-based setup action; bump actions (checkout v6, setup-node v6, cache v5, pnpm/action-setup v6); add concurrency group + checkout fetch-depth: 0
@rosskevin rosskevin added the major Increment the major version when merged label Jun 3, 2026
rosskevin added 2 commits June 3, 2026 10:45
- grant id-token: write so npm 11 can exchange an OIDC token (token-less publish + provenance)
- auto npm plugin setRcToken: false: stop auto requiring/writing NPM_TOKEN so npm publish uses OIDC instead of an .npmrc token

Requires a Trusted Publisher configured on npmjs.com for this repo + build.yml.
@alienfast-build

Copy link
Copy Markdown
📦 Published PR as canary version: 4.0.0--canary.34.26896795176.0

✨ Test out this PR locally via:

npm install vite-plugin-i18next-loader@4.0.0--canary.34.26896795176.0
# or 
yarn add vite-plugin-i18next-loader@4.0.0--canary.34.26896795176.0

@rosskevin
rosskevin merged commit 2e16ba4 into main Jun 3, 2026
4 checks passed
@rosskevin
rosskevin deleted the update-tooling branch June 3, 2026 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

major Increment the major version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants