The README described a library that did not exist in places. It showed
@ValidateNested({ each: true }), which did not compile; told users to enable
emitDecoratorMetadata, which the library never reads; and documented none of the
mapping API. Its Quick Start now runs verbatim — verified by compiling and
executing it against the local source.
- README: document field-name mapping, access control, options, error helpers
and the 30 new validators; drop the emitDecoratorMetadata instruction; add a
Notes and Limitations section covering circular references, validate() on
plain objects, and the fact that @JsonProperty stops the original name from
being accepted unless you add @JsonAlias
- CHANGELOG.md: new, covering 0.1.0
- example.ts: rewritten as a tour of the current API — read-only ids, write-only
secrets, renamed fields, conditional validation, flattened errors, and a
base-class rule reaching a subclass
- docs: the playground hand-listed its symbol table in three parallel places and
exposed IsEmail, which is not an export. It now derives scope from the bundle,
so new decorators work there as soon as they ship. Bundle regenerated
- version 0.1.0
136 tests, 97% statement and 100% function coverage.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SAcqrz3FcadkYr3xG32CjK
67 lines
1.9 KiB
JSON
67 lines
1.9 KiB
JSON
{
|
|
"name": "cereale",
|
|
"version": "0.1.0",
|
|
"description": "Spring-like decorators for JSON mapping and validation in TypeScript",
|
|
"type": "module",
|
|
"main": "./dist/cjs/index.js",
|
|
"module": "./dist/esm/index.js",
|
|
"types": "./dist/esm/index.d.ts",
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/esm/index.d.ts",
|
|
"import": "./dist/esm/index.js",
|
|
"require": "./dist/cjs/index.js"
|
|
}
|
|
},
|
|
"sideEffects": false,
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "rm -rf dist && tsc -p tsconfig.cjs.json && tsc -p tsconfig.esm.json && echo '{\"type\": \"commonjs\"}' > dist/cjs/package.json",
|
|
"build:docs": "esbuild src/index.ts --bundle --format=iife --global-name=Cereale --minify --tsconfig=tsconfig.json --outfile=docs/cereale.js",
|
|
"demo": "node --no-warnings=ExperimentalWarning --loader ts-node/esm src/example.ts",
|
|
"type-check": "tsc --noEmit",
|
|
"test": "vitest run",
|
|
"test:watch": "vitest",
|
|
"test:coverage": "vitest run --coverage",
|
|
"lint": "eslint .",
|
|
"lint:fix": "eslint . --fix",
|
|
"verify": "npm run type-check && npm run lint && npm run test && npm run build",
|
|
"prepublishOnly": "npm run verify"
|
|
},
|
|
"engines": {
|
|
"node": ">=20.0.0"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/Avalon-Vanguard/cereale.git"
|
|
},
|
|
"keywords": [
|
|
"json",
|
|
"mapping",
|
|
"validation",
|
|
"decorators",
|
|
"spring",
|
|
"typescript"
|
|
],
|
|
"author": "Avalon Vanguard",
|
|
"license": "MIT",
|
|
"bugs": {
|
|
"url": "https://github.com/Avalon-Vanguard/cereale/issues"
|
|
},
|
|
"homepage": "https://github.com/Avalon-Vanguard/cereale#readme",
|
|
"devDependencies": {
|
|
"@eslint/js": "^10.0.1",
|
|
"@types/node": "^25.6.0",
|
|
"@vitest/coverage-v8": "^4.1.4",
|
|
"esbuild": "^0.25.0",
|
|
"eslint": "^10.2.1",
|
|
"globals": "^17.5.0",
|
|
"ts-node": "^10.9.2",
|
|
"typescript": "^6.0.2",
|
|
"typescript-eslint": "^8.58.2",
|
|
"vitest": "^4.1.4"
|
|
}
|
|
}
|