diff --git a/.changeset/node20-and-docs.md b/.changeset/node20-and-docs.md new file mode 100644 index 0000000..96776c6 --- /dev/null +++ b/.changeset/node20-and-docs.md @@ -0,0 +1,5 @@ +--- +"@taskade/temporal-parser": patch +--- + +Relax `engines.node` from `>=22` to `>=20` (the lowest line the Vitest 4 suite can run). CI now tests 20, 22, and 24. Node 18 is EOL and is not claimed. Docs-only: badges, playground link, and a “when to use this vs Temporal / luxon / date-fns” table. No parser or API changes. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a1afe9f..6940350 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [22.x, 24.x] + node-version: [20.x, 22.x, 24.x] steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c30bfc9..6050f49 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,3 +103,7 @@ Follow conventional commits: ## Questions? Feel free to open an issue for questions or discussions. + +## Development notes + +This project was developed with LLM assistance (GPT 5.2 / Claude Sonnet 4.5), under human direction for design decisions, architecture, and verification. All code is tested and reviewed on a best-effort basis. diff --git a/README.md b/README.md index 548f1d1..2e4f328 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,25 @@ A lexer and parser for ISO 8601, RFC 3339, and IXDTF temporal expressions, built with compiler design principles. +By [Stan Chang](https://lxcid.com/) ([@lxcid](https://github.com/lxcid)). + +[![npm](https://img.shields.io/npm/v/@taskade/temporal-parser?style=flat-square&color=FF2D60)](https://www.npmjs.com/package/@taskade/temporal-parser) +[![npm downloads](https://img.shields.io/npm/dm/@taskade/temporal-parser?style=flat-square)](https://www.npmjs.com/package/@taskade/temporal-parser) +[![CI](https://img.shields.io/github/actions/workflow/status/taskade/temporal-parser/ci.yml?branch=main&style=flat-square)](https://github.com/taskade/temporal-parser/actions/workflows/ci.yml) +[![License: MIT](https://img.shields.io/github/license/taskade/temporal-parser?style=flat-square)](./LICENSE.md) + +**Try it:** [interactive playground](https://lxcid.com/tools/temporal-playground/) · write-up: [announcing @taskade/temporal-parser](https://lxcid.com/2026/01/15/announcing-temporal-parser/) · sibling: [`@taskade/uri-parser`](https://github.com/taskade/uri-parser) + +## When to use this + +This library lexes and parses a temporal *string* into a typed AST (and stringifies it back). It does not do date math, and it does not validate calendar ranges. + +| Need | Use | +| --- | --- | +| ISO 8601 / RFC 3339 / IXDTF / durations / ranges → AST | **this package** | +| Date/time *values*, arithmetic, calendars | [TC39 Temporal](https://tc39.es/proposal-temporal/docs/) (`PlainDate.from`, …). Temporal has no general `parse()` for these forms — feed it fields from the AST | +| Format, locale, “add 3 days” on a `Date` | [luxon](https://github.com/moment/luxon) or [date-fns](https://github.com/date-fns/date-fns) | + ## Features - **Standards compliant**: ISO 8601, RFC 3339, and IXDTF support @@ -10,7 +29,7 @@ A lexer and parser for ISO 8601, RFC 3339, and IXDTF temporal expressions, built - **Type-safe**: Written in TypeScript with full type definitions - **Small footprint**: ~18KB minified - **Dual module support**: ESM and CommonJS builds -- **Well tested**: 91% test coverage with 271 test cases +- **Well tested**: 91% test coverage with 461 test cases ## Installation @@ -291,13 +310,13 @@ import type { } from '@taskade/temporal-parser'; ``` -## Contributing +## Related -See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines. +- [`@taskade/uri-parser`](https://github.com/taskade/uri-parser) — same compiler approach for URIs (RFC 3986) -## Development +## Contributing -This project was developed with LLM assistance (GPT 5.2/Claude Sonnet 4.5), under human direction for design decisions, architecture, and verification. All code is tested and reviewed on a best-effort basis. +See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines. ## License diff --git a/package-lock.json b/package-lock.json index fc2dd80..0b13c7a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,7 @@ "vitest": "^4.0.16" }, "engines": { - "node": ">=22" + "node": ">=20" } }, "node_modules/@babel/helper-string-parser": { diff --git a/package.json b/package.json index 18b2d96..df8ca79 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "CHANGELOG.md" ], "engines": { - "node": ">=22" + "node": ">=20" }, "scripts": { "build": "npm run clean && node scripts/build.mjs && npm run build:types",