Skip to content

feat: rewrite in TypeScript and update build tools. to release as v2.0.0#51

Open
kristw wants to merge 2 commits into
twitter:masterfrom
kristw:feat/typescript-rewrite
Open

feat: rewrite in TypeScript and update build tools. to release as v2.0.0#51
kristw wants to merge 2 commits into
twitter:masterfrom
kristw:feat/typescript-rewrite

Conversation

@kristw

@kristw kristw commented May 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Complete rewrite of labella.js in TypeScript with a modern toolchain (Rollup + Vitest + Vite), published as v2.0.0. The public API is unchanged and all 70 tests pass.

Details

  • Migrate all src/core/ and src/lib/ files from JavaScript to TypeScript
  • Rename node.tslabelNode.ts to avoid a Vite/esbuild silent export-drop collision with the Node.js built-in module name
  • Add strict tsconfig.json (ES2018 target, DOM lib, declaration emit)
  • Replace Gulp + webpack + Karma with Rollup + Vitest + Vite
  • Build outputs: labella.js (ESM), labella.cjs (CJS), labella.umd.js, labella.umd.min.js, labella.d.ts (bundled types)
  • Vendor vpsc.ts from WebCola — no new runtime dependency
  • All 70 tests pass across 6 spec files
  • Update examples/*.html to use CDN links instead of Bower (d3 v3.5.17, d3kit v1.0.9, Angular v1.4.8, Bootstrap 3.4.1)
  • Fix demo dev server: changed vite examplesvite --open examples/index.html so ../dist/ resolves correctly from repo root
  • Public API unchanged: labella.Node, labella.Force, labella.Distributor, labella.Renderer, labella.metrics, labella.util

Testing

  • npm run build — all 5 dist files produced with zero TS errors
  • npm test — 70/70 tests pass
  • npm run dev — demo site loads and renders correctly in browser

- Migrate all src/core and src/lib files from JS to TypeScript
- Rename node.ts -> labelNode.ts to avoid Vite/esbuild collision with Node.js built-in
- Add strict tsconfig.json (ES2018 target, DOM lib, declarations)
- Replace Gulp/webpack/Karma with Rollup + Vitest + Vite
- Build outputs: ESM, CJS, UMD, UMD-min, bundled .d.ts
- All 70 tests passing across 6 spec files
- Update examples to use CDN links instead of Bower (d3 v3.5.17, d3kit v1.0.9, Angular v1.4.8, Bootstrap 3.4.1)
- Fix dev server: serve from repo root so ../dist/ resolves correctly
- Vendor vpsc.ts from WebCola (no new runtime dependency)
- Public API unchanged: labella.Node, Force, Distributor, Renderer, metrics, util
@CLAassistant

CLAassistant commented May 31, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@kristw kristw changed the title feat: rewrite in TypeScript with Rollup + Vitest toolchain (v2.0.0) feat: rewrite in TypeScript and update build tools. to release as v2.0.0 May 31, 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.

2 participants