From 026b61d73957ac626f51ec6df3b157df63efad29 Mon Sep 17 00:00:00 2001 From: johnxie Date: Thu, 10 Sep 2026 16:54:54 -0700 Subject: [PATCH] docs: polish README and relax engines to Node 20 Add badges and an honest vs WHATWG URL table. engines >=20 is the lowest line Vitest 4 can prove; stay 0.x until URI Template. No parser or API changes. Co-authored-by: Cursor --- .changeset/node20-and-docs.md | 5 +++++ .github/workflows/ci.yml | 2 +- CONTRIBUTING.md | 4 ++++ README.md | 27 +++++++++++++++++++++++---- package-lock.json | 2 +- package.json | 2 +- 6 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 .changeset/node20-and-docs.md diff --git a/.changeset/node20-and-docs.md b/.changeset/node20-and-docs.md new file mode 100644 index 0000000..3e8b8bd --- /dev/null +++ b/.changeset/node20-and-docs.md @@ -0,0 +1,5 @@ +--- +"@taskade/uri-parser": minor +--- + +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 and a “use WHATWG URL unless you need a lossless AST / host-path / no-scheme parse” table. Still 0.x — URI Template is not in this release. 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 bc7af01..c4c4266 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -77,3 +77,7 @@ This parser follows the temporal-parser philosophy: ## Questions? Feel free to open an issue for discussion! + +## 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 8580251..d9f006f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,25 @@ A lexer and parser for URIs with support for various URL forms, built with compiler design principles. +By [Stan Chang](https://lxcid.com/) ([@lxcid](https://github.com/lxcid)). + +[![npm](https://img.shields.io/npm/v/@taskade/uri-parser?style=flat-square&color=FF2D60)](https://www.npmjs.com/package/@taskade/uri-parser) +[![npm downloads](https://img.shields.io/npm/dm/@taskade/uri-parser?style=flat-square)](https://www.npmjs.com/package/@taskade/uri-parser) +[![CI](https://img.shields.io/github/actions/workflow/status/taskade/uri-parser/ci.yml?branch=main&style=flat-square)](https://github.com/taskade/uri-parser/actions/workflows/ci.yml) +[![License: MIT](https://img.shields.io/github/license/taskade/uri-parser?style=flat-square)](./LICENSE.md) + +Sibling: [`@taskade/temporal-parser`](https://github.com/taskade/temporal-parser) (same compiler approach for ISO 8601 / RFC 3339 / IXDTF). + +## When to use this + +Use the platform `URL` / WHATWG parser unless you need a lossless AST, host-path (no scheme), network-path (`//host/...`), or a custom grammar on the same token stream. + +| Need | Use | +| --- | --- | +| Everyday resolve / normalize / `href` | [`URL`](https://developer.mozilla.org/en-US/docs/Web/API/URL) (WHATWG) | +| Lossless AST, host-path, no-scheme, exposed lexer | **this package** | +| Date/time strings | [`@taskade/temporal-parser`](https://github.com/taskade/temporal-parser) | + ## Features - **Flexible parsing**: Handles absolute URLs, network-path URLs, host-path URLs, and relative paths @@ -326,13 +345,13 @@ If you need different semantics, you can: - Extend or replace parts of the grammar - Apply your own normalization rules -## Contributing +## Related -See [CONTRIBUTING.md](./CONTRIBUTING.md) for development setup and guidelines. +- [`@taskade/temporal-parser`](https://github.com/taskade/temporal-parser) — same compiler approach for ISO 8601, RFC 3339, and IXDTF -## 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 121b346..0c4c184 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 49353fb..71fd6be 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "CHANGELOG.md" ], "engines": { - "node": ">=22" + "node": ">=20" }, "scripts": { "build": "npm run clean && node scripts/build.mjs && npm run build:types",