Skip to content

v2.1.0: bundle size −57%, fix consumer types, cross-browser Playwright CI, Node 20.4.0+ support#28

Merged
jEnbuska merged 16 commits into
mainfrom
copilot/reduce-bundle-size
Feb 22, 2026
Merged

v2.1.0: bundle size −57%, fix consumer types, cross-browser Playwright CI, Node 20.4.0+ support#28
jEnbuska merged 16 commits into
mainfrom
copilot/reduce-bundle-size

Conversation

Copilot AI commented Feb 22, 2026

Copy link
Copy Markdown
Contributor

A collection of build pipeline, type distribution, integration testing, and release tooling improvements.

Bundle size −57% (55 KB → 23 KB)

  • minify: true in tsup.config.ts
  • Replaced using keyword with try/finally in resolver classes — eliminates the __knownSymbol/__using/__callDispose polyfill block tsup was injecting for ES2022 targets

Consumer TypeScript types fixed

tsc --emitDeclarationOnly + verbatimModuleSyntax: true preserved raw .ts extensions in emitted .d.ts import paths, breaking any consumer without allowImportingTsExtensions. Switched to tsup dts: true — all declarations bundled into a single dist/index.d.ts. tsconfig.build.json deleted.

Node.js minimum lowered to 20.4.0

Removing using eliminates the 20.5.0 requirement. Only hard runtime dependency is Symbol.dispose/Symbol.asyncDispose (Node 20.4.0+). Added "engines": { "node": ">=20.4.0" }.

Example projects & cross-browser tests

  • examples/node-ts — bare Node.js TypeScript consumer; builds with tsc against the local package
  • examples/react-vite — Vite 7 + React 19 app with a Playwright test suite covering Chromium, Firefox, WebKit (Safari ✅), and Edge
  • npm test in examples/react-vite auto-installs Playwright browser binaries so it works out of the box after npm ci

CI

  • test-example-node: matrix over Node 20 × 22 × 24, fail-fast: false
  • test-example-react: Playwright suite; uploads report artifact on failure
  • Root tsconfig.json excludes examples/ — prevents tsc --noEmit walking sub-projects whose deps aren't installed at root
  • Root vitest.config.ts scopes test discovery to tests/**/*.test.ts — prevents Vitest picking up Playwright spec files
  • prettier and check-all extended to cover ./examples

Release tooling & docs

  • publish:beta script (npm publish --tag beta --access public) + abstract "Beta / Pre-release Process" section in CONTRIBUTING.md
  • DOM.Iterable is not required by this library — documented with a minimal lib config table
  • README: Safari ✅, Node LTS table (20/22/24), zero-dependencies badge
  • CHANGELOG entry for 2.1.0

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI and others added 2 commits February 22, 2026 11:45
Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
…h try/finally

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title [WIP] Reduce bundle size while maintaining TypeScript code quality Reduce bundle size 57% via minification and using keyword removal Feb 22, 2026
Copilot AI requested a review from jEnbuska February 22, 2026 11:49
…nk workflow

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title Reduce bundle size 57% via minification and using keyword removal Build: explicit dist cleanup, npm link script, and local testing docs Feb 22, 2026
Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title Build: explicit dist cleanup, npm link script, and local testing docs Reduce bundle size, clean build script, npm link workflow, and zero-deps callout Feb 22, 2026
…olve types correctly

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title Reduce bundle size, clean build script, npm link workflow, and zero-deps callout Fix consumer TypeScript types by switching declaration generation to tsup dts bundling Feb 22, 2026
Copilot stopped work on behalf of jEnbuska due to an error February 22, 2026 12:12
Copilot stopped work on behalf of jEnbuska due to an error February 22, 2026 12:14
…ests

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title Fix consumer TypeScript types by switching declaration generation to tsup dts bundling Bundle size, DTS fix, example projects, and npm workflow improvements Feb 22, 2026
Copilot AI changed the title Bundle size, DTS fix, example projects, and Playwright cross-browser tests v2.1.0: bundle size −57%, DTS consumer fix, cross-browser Playwright examples, CI integration Feb 22, 2026
Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title v2.1.0: bundle size −57%, DTS consumer fix, cross-browser Playwright examples, CI integration Fix CI: exclude examples/ from root tsc and vitest discovery Feb 22, 2026
…ript

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title Fix CI: exclude examples/ from root tsc and vitest discovery Fix check-all and CI: auto-install Playwright browsers, exclude examples from root tsc/vitest, v2.1.0 release Feb 22, 2026
…or node-ts example

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title Fix check-all and CI: auto-install Playwright browsers, exclude examples from root tsc/vitest, v2.1.0 release v2.1.0: bundle size −57%, fix consumer types, cross-browser Playwright examples, CI matrix, Node 20.4.0+ support Feb 22, 2026
Copilot AI and others added 2 commits February 22, 2026 13:30
…idance

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
…tsconfig guidance to README

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title v2.1.0: bundle size −57%, fix consumer types, cross-browser Playwright examples, CI matrix, Node 20.4.0+ support Document DOM.Iterable is not required; add TypeScript lib guidance to README Feb 22, 2026
… docs

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title Document DOM.Iterable is not required; add TypeScript lib guidance to README v2.1.0-beta.0: bundle size −57%, fix consumer types, cross-browser Playwright CI, Node 20.4.0+ support Feb 22, 2026
…ta docs

Co-authored-by: jEnbuska <11061511+jEnbuska@users.noreply.github.com>
Copilot AI changed the title v2.1.0-beta.0: bundle size −57%, fix consumer types, cross-browser Playwright CI, Node 20.4.0+ support v2.1.0: bundle size −57%, fix consumer types, cross-browser Playwright CI, Node 20.4.0+ support Feb 22, 2026
@jEnbuska
jEnbuska merged commit e66214f into main Feb 22, 2026
28 checks passed
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.

2 participants