Modernize tooling: upgrade deps, switch to vitest and biome#32
Merged
Conversation
- Bump gtfs-stream 2.2→3.0 (fixes silent-failure #17 and protobufjs critical vuln), update import style to named { plain } export - Patch/minor bumps: mysql2, @types/chai, @typescript-eslint/*, ts-node - npm audit fix resolves transitive minimatch/flatted/picomatch/ajv/glob vulns (supersedes dependabot PRs #27, #28, #29, #30) - Fix README examples per #19: remove bogus calendars destructure and stray 4th arg to RaptorAlgorithmFactory.create; bump Node requirement to 20+ (chai 6 is ESM-only, Node 16/18 EOL) - Migrate tests from mocha+chai to vitest; rewrite 9 spec files - Replace eslint with @biomejs/biome; apply safe lint autofixes (useImportType, useNodejsImportProtocol, useTemplate, Object.hasOwn) - tsconfig: add skipLibCheck for vitest/vite type resolution
3 tasks
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
Maintenance PR that does three things:
1. Dependency upgrades & docs
gtfs-stream2.2.0 → 3.0.0 — fixes the silentfinish/endfailure from loadGTFS doesn't work. #17 (3.0 usespumpify.objwhich forwards end/error correctly; verified by loading the Google sample feed end-to-end) and resolves the criticalprotobufjsRCE vuln chain.mysql2,@types/chai,@typescript-eslint/*,ts-node.npm audit fixcleans up transitive vulns inminimatch,flatted,picomatch,ajv,glob,brace-expansion— supersedes dependabot PRs Bump minimatch #27, Bump flatted from 3.3.3 to 3.4.2 #28, Bump picomatch from 2.3.1 to 2.3.2 #29, Bump protobufjs and gtfs-stream #30.calendarsdestructure and the stray 4th argument toRaptorAlgorithmFactory.create. Bump Node requirement to 20+ (chai 6 is ESM-only; Node 16 EOL 2024-04, Node 18 EOL 2025-04).2. Tests: mocha + chai → vitest
mocha,chai,@types/mocha,@types/chai.vitest. Rewrite 9.spec.tsfiles:chai.expect(x).to.equal(y)→expect(x).toBe(y),.to.deep.equal→.toEqual, addimport { describe, it, expect } from "vitest".test→vitest run,watch-test→vitest,gtest→vitest run -t.3. Lint: eslint → biome
eslint,@typescript-eslint/eslint-plugin,@typescript-eslint/parser,.eslintrc.json.@biomejs/biomeandbiome.json(linter only; formatter disabled so we don't churn project whitespace). Disable a few rules that conflicted with intentional style (noNonNullAssertion,noStaticOnlyClass,noPrototypeBuiltins).useImportType,useNodejsImportProtocol,useTemplate,Object.hasOwninstead ofObject.prototype.hasOwnProperty.call, etc.tsconfig.json: addskipLibCheck: true(needed for vitest/vite type chain).Verification
npm test(lint + vitest) passes — 48 tests, 9 filesnpx tsc --noEmitcleanloadGTFSagainst the Google sample GTFS feed loads successfully (11 trips, 9 stops,endfires — confirming loadGTFS doesn't work. #17 is resolved)npm audit: 12 → 0 vulnerabilities3776630)Closes / supersedes