Skip to content

v2.0.0

Choose a tag to compare

@prosdev prosdev released this 26 Oct 20:12

A new generation of the template:

  • Node 26 and TypeScript 7, the native compiler.
  • Every package builds with the TypeScript compiler; tsup is gone.
  • pnpm 12 pins the Node version, which replaces Volta.
  • The README has diagrams of how the pieces fit together.

Changed

  • TypeScript 7.0.2. It ships no JavaScript compiler API, and tsup calls that API, so tsup is removed.
  • tsc builds every package. It writes one ES module and one declaration file per source file, with maps. Build scripts delete dist first.
  • Rollup builds the script-tag file. Rollup 4.65.0 with terser bundles tsc's output for the browser example. The minified file dropped from 731 B to 511 B.
  • Node 26. It becomes LTS on 2026-10-28. The template uses the @tsconfig/node26 preset, @types/node 26.6.5 and engines.node >=26. Node packages no longer see browser globals: DOM is set only in the browser tests' config.
  • pnpm 12.15.0 replaces Volta, which is unmaintained.
    • devEngines.runtime pins Node 26.12.1. pnpm downloads that Node and records it in the lockfile, and CI reads the same pin.
    • npm and npx refuse to run in the repository unless Node matches the pin exactly. Use pnpm dlx or pnpm exec instead.
  • Stricter installs.
    • minimumReleaseAgeStrict: true makes a too-new version fail the install.
    • pnpm 12 rejects misspelled settings.
    • Install scripts run only for packages listed in allowBuilds.
  • Renovate holds @types/node to 26.x.
  • README diagrams cover the package graph and build order, build outputs, where each version is pinned, the dependency update flow, and the release jobs with their permissions.

Changes for existing projects

A project created from v1.2.1 would change the following to match:

  1. Install pnpm 12: npm install -g pnpm@12.15.0. pnpm 10 can't switch itself to pnpm 12.
  2. package.json (root).
    • Set packageManager to pnpm@12.15.0 and engines.node to >=26.
    • Remove the volta block.
    • Add "devEngines": { "runtime": { "name": "node", "version": "26.12.1", "onFail": "download" } }.
    • Don't add devEngines.packageManager: npm pack rejects it.
  3. TypeScript 7.
    • Pin typescript to 7.0.2. Replace @tsconfig/node-lts with @tsconfig/node26@26.0.1, and pin @types/node to 26.6.5.
    • In the root tsconfig.json, extend @tsconfig/node26/tsconfig.json, and remove composite and the lib override.
    • Remove project references from package tsconfigs.
    • Put "lib": ["ES2025", "DOM"] in any tsconfig that needs browser globals.
  4. Builds.
    • Remove tsup and every tsup.config.ts.
    • Set each package's build to rm -rf dist && tsc -p tsconfig.json, and its dev to tsc -p tsconfig.json --watch.
    • Command packages append && chmod +x dist/cli.js to build.
    • Script-tag builds append && rollup -c, with a rollup.config.js that bundles dist/index.js as iife through @rollup/plugin-terser.
    • Imports between source files need file extensions (./thing.js), which NodeNext already enforces.
  5. pnpm-workspace.yaml. Add minimumReleaseAgeStrict: true, and an allowBuilds map with an entry for each dependency that has an install script (esbuild: false here). Then reinstall.
  6. Renovate. Change the @types/node rule's allowedVersions to 26.x.

Declarations change shape: one .d.ts per source file, where tsup produced one bundled file per entry. Run pnpm check:packages to confirm the packages still resolve for consumers.