All notable changes to this project are documented in this file.
The format is based on Keep a Changelog.
5.0.1 - 2026-02-07
- Tests: New
test/api.test.tswith coverage for invalid inputs (set/getwith non-string), no-match behavior (getreturnsnullwhen no route matches), and edge cases.
5.0.0 - 2026-02-07
Major release: TypeScript migration, modern tooling, and CI updates.
- TypeScript: Library rewritten in TypeScript; source lives in
src/, built output indist/. Type definitions shipped viatypesinpackage.json. - TypeScript usage: README and example updated to ESM +
import Parth from 'parth'. Documented type imports:ParthOptions,ParthResult. - CI: GitHub Actions workflow (
.github/workflows/ci.yml) replacing Travis. Runsdist,lint,test, andverify:publishon Node 20, 22, and 24. - Publish verification:
verify:publishscript andtest/verify-publish/(pack, install in a consumer project, run smoke test). Runs automatically afternpm testviaposttest.
- API surface: Default export is the
Parthclass (constructor). No behavioral change from v4 for valid usage. - Entry point:
mainis nowdist/index.js(compiled from TypeScript).filesinpackage.jsonlimited todist. - Example:
example.jsreplaced byexample.ts(ESM, TypeScript). Removed the-llisting of internal properties. - Linting: ESLint flat config (
eslint.config.mjs). Config files renamed to.mjs(e.g.jest.config.mjs). - Testing: Mocha replaced with Jest; tests in
test/**/*.test.ts. - Engines: Node.js requirement raised to
>=20(from>=14). CI tests on Node 20, 22, and 24. - CI branch: Workflow runs only on
main(no longermaster/main).
- Travis CI:
.travis.ymland Travis badge from README. - Legacy JS:
index.js,lib/util.js, and.eslintrcremoved in favor of TypeScript and new ESLint config. - Dependency:
lodash.mergeremoved; implementation useslodash.clonedeeponly. - README: “parth properties” section (e.g.
store,regex) replaced by a short TypeScript section; “todo” section removed.
- package.json:
enginesfield corrected from a string to a proper object ("node": ">=20").
See git history for changes prior to the v5.0.0 TypeScript migration (e.g. git log -p on older tags).