Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,15 @@ validate RPC inputs.
**not** `experimentalDecorators` and **not** `reflect-metadata`. Do not enable
`experimentalDecorators`; it changes decorator semantics and would break the
buffer/seal mechanism.
- **Single runtime dependency: `zod`.** Do not add heavyweight deps; this
package is meant to stay small.
- **No runtime dependencies. `zod` is an unversioned peer** (`"zod": "*"`), and
unversioned again in `devDependencies` so the build and the suite run against
whatever Zod is newest rather than against a range this package chose. The
consumer's copy is the one that must be used: a validator handed to
`@validate` is built from *their* Zod, and a second copy nested under this
package would make `z.object()` assemble schemas from a different class
identity than the ones it was given. Keep the runtime surface to what every
Zod major has had — `z.object()` and `schema.parse()` — and do not add
heavyweight deps; this package is meant to stay small.
- **Lint/format:** `oxlint` + `oxfmt`. Run `npm run format` before committing;
CI checks `npm run format:check`.
- Build **emits `.js`/`.d.ts`/`.js.map` next to sources**; these are
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ version, licence and Node floor for every package:

# Requirements

Node.js ≥ 22.12. `zod` v4 is a runtime dependency.
Node.js ≥ 22.12. `zod` is a peer dependency with no version constraint: the
schemas you write and the ones this package builds from them have to come from
one copy of Zod, so the version is yours to choose and yours to install.

# Install

```bash
npm i --save @imqueue/validation
npm i --save @imqueue/validation zod
```

# Usage
Expand Down
26 changes: 14 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@imqueue/validation",
"version": "1.1.2",
"version": "1.2.0",
"description": "Zod-backed field- and method-level validation via native (TC39) decorators for Node.js & TypeScript microservices — the input-validation layer of the @imqueue framework",
"keywords": [
"validation",
Expand Down Expand Up @@ -45,14 +45,15 @@
"funding": "https://imqueue.com/",
"author": "imqueue.com <support@imqueue.com> (https://imqueue.com)",
"license": "GPL-3.0-only",
"dependencies": {
"zod": "^4.4.3"
"peerDependencies": {
"zod": "*"
},
"devDependencies": {
"@types/node": "^24.9.1",
"oxfmt": "0.57.0",
"oxlint": "1.72.0",
"typescript": "^7.0.2"
"typescript": "^7.0.2",
"zod": "*"
},
"main": "index.js",
"types": "index.d.ts",
Expand Down
Loading