Repository navigation
Migrate tooling to pnpm, Biome, and tsdown - #34
Merged
Merged
Conversation
- 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
- 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.
📦 Published PR as canary version:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.tsentry 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.pnpm install, one tool for lint+format (pnpm check-biome), andpnpm checkto run types + lint + tests together; faster builds via Rolldown-based tsdown.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
packageManagerset topnpm@10.33.0;yarn.lock,.yarnrc.yml, and the vendored.yarn/release removed;pnpm-lock.yamladded.esbuild+@biomejs/biomebuild scripts (pnpm 10 blocks them by default).clean:yarn→ scripts/clean-pnpm.ts;reset/releasecall pnpm.Lint/format: ESLint + Prettier → Biome
@alienfast/biome-config/base.noUnresolvedImportsis disabled (ambient.d.ts+virtual:*false positives) anduseImportExtensionsis disabled (this is a published NodeNext ESM lib — relative imports must keep their emitted.jsspecifiers, which Biome wanted to rewrite to.ts);src/__tests__/data/**fixtures are excluded.eslint.config.mjs,.prettierignore, theprettierpackage.json key, and ~20 now-deadeslint-disablecomments. Codebase normalized to Biome (package.json keys sorted,import type, etc.).Bundler: tsup → tsdown
tsup.config.ts.fixedExtension: falsepreserves the published.js/.d.tscontract instead of tsdown'snodedefault of.mjs/.d.mts, soexports/mainresolve unchanged.ignoreDeprecations: "6.0"tsconfig hack — it only existed because tsup's DTS step injected a deprecatedbaseUrl; tsdown's oxc-based generator doesn't, so tsconfig.json is clean again.src/(notsrc/__tests__) plusindex.d.ts.mapso type → source navigation resolves for consumers. Dropped the vestigialrollupdevDependency.CI (.github/workflows/build.yml, setup, build-cache)
pnpm/action-setup+setup-nodecache: pnpm,--frozen-lockfile).checkoutv4 → v6,setup-nodev4 → v6,cachev4 → v5,pnpm/action-setupv4 → v6.concurrencygroup (cancels superseded PR runs only — never interrupts a release onmain/next); replaced the repeatedgit fetch --unshallow --tagssteps withfetch-depth: 0on checkout.Code Impact
.github).yarnThe actual hand-written delta is tiny (~40 net lines); the large numbers are entirely the
yarn.lock→pnpm-lock.yamlswap and removal of the vendored Yarn release.Breaking Changes
yarn install/yarn <script>no longer work — usepnpm installandpnpm <script>.engines.noderaised from>=20to>=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 passedpnpm check-biome— no findingsnpm pack --dry-run— tarball shipsdist/+src/index.ts+src/utils.ts, no test fixtures