feat: rewrite in TypeScript and update build tools. to release as v2.0.0#51
Open
kristw wants to merge 2 commits into
Open
feat: rewrite in TypeScript and update build tools. to release as v2.0.0#51kristw wants to merge 2 commits into
kristw wants to merge 2 commits into
Conversation
- 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
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.
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
src/core/andsrc/lib/files from JavaScript to TypeScriptnode.ts→labelNode.tsto avoid a Vite/esbuild silent export-drop collision with the Node.js built-in module nametsconfig.json(ES2018 target, DOM lib, declaration emit)labella.js(ESM),labella.cjs(CJS),labella.umd.js,labella.umd.min.js,labella.d.ts(bundled types)vpsc.tsfrom WebCola — no new runtime dependencyexamples/*.htmlto use CDN links instead of Bower (d3 v3.5.17, d3kit v1.0.9, Angular v1.4.8, Bootstrap 3.4.1)vite examples→vite --open examples/index.htmlso../dist/resolves correctly from repo rootlabella.Node,labella.Force,labella.Distributor,labella.Renderer,labella.metrics,labella.utilTesting
npm run build— all 5 dist files produced with zero TS errorsnpm test— 70/70 tests passnpm run dev— demo site loads and renders correctly in browser