@luca-financial/luca-schema 3.0.1 → 3.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/README.md +2 -0
- package/dist/esm/index.js +1 -0
- package/package.json +15 -15
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,14 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [3.0.2] - 2026-02-14
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
|
|
12
|
+
- Export `SCHEMA_VERSION` for consumers to read the contract version without schema-shape coupling.
|
|
13
|
+
- Add tests to verify `SCHEMA_VERSION` matches `lucaSchema.properties.schemaVersion.const` and example schemaVersion values.
|
|
14
|
+
- Update README validator utilities docs to include `SCHEMA_VERSION`.
|
|
15
|
+
|
|
8
16
|
## [3.0.1] - 2026-02-14
|
|
9
17
|
|
|
10
18
|
### Changed
|
package/README.md
CHANGED
|
@@ -231,6 +231,7 @@ This module exports helper utilities to inspect schemas and validate data:
|
|
|
231
231
|
|
|
232
232
|
```typescript
|
|
233
233
|
import {
|
|
234
|
+
SCHEMA_VERSION,
|
|
234
235
|
validate,
|
|
235
236
|
validateCollection,
|
|
236
237
|
getDateFieldPaths,
|
|
@@ -244,6 +245,7 @@ import {
|
|
|
244
245
|
} from '@luca-financial/luca-schema';
|
|
245
246
|
```
|
|
246
247
|
|
|
248
|
+
- `SCHEMA_VERSION` → schema contract version from `lucaSchema.properties.schemaVersion.const`
|
|
247
249
|
- `validate(schemaKey, data)` → `{ valid: boolean, errors: AjvError[] }`
|
|
248
250
|
- `validateCollection(schemaKey, array)` → `{ valid: boolean, errors: [{ index, entity, errors }] }`
|
|
249
251
|
- `getDateFieldPaths(schemaKey)` → `string[]` of `format: date` fields for a schema key
|
package/dist/esm/index.js
CHANGED
|
@@ -37,6 +37,7 @@ const schemas = {
|
|
|
37
37
|
export const accountSchema = schemas.account;
|
|
38
38
|
export const categorySchema = schemas.category;
|
|
39
39
|
export const lucaSchema = schemas.lucaSchema;
|
|
40
|
+
export const SCHEMA_VERSION = lucaSchemaJson.properties.schemaVersion.const;
|
|
40
41
|
export const statementSchema = schemas.statement;
|
|
41
42
|
export const recurringTransactionSchema = schemas.recurringTransaction;
|
|
42
43
|
export const recurringTransactionEventSchema =
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@luca-financial/luca-schema",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"description": "Schemas for the Luca Ledger application",
|
|
5
5
|
"author": "Johnathan Aspinwall",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -72,33 +72,33 @@
|
|
|
72
72
|
],
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"ajv": "^8.18.0",
|
|
75
|
-
"ajv-formats": "^
|
|
75
|
+
"ajv-formats": "^3.0.1"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@babel/cli": "^7.28.6",
|
|
79
79
|
"@babel/core": "^7.29.0",
|
|
80
80
|
"@babel/plugin-syntax-import-attributes": "^7.28.6",
|
|
81
|
-
"@babel/preset-env": "^7.29.
|
|
81
|
+
"@babel/preset-env": "^7.29.2",
|
|
82
82
|
"@babel/preset-typescript": "^7.28.5",
|
|
83
|
-
"@eslint/js": "^
|
|
84
|
-
"@types/jest": "^
|
|
85
|
-
"babel-jest": "^
|
|
86
|
-
"eslint": "^
|
|
87
|
-
"eslint-config-prettier": "^
|
|
88
|
-
"eslint-plugin-json": "^
|
|
83
|
+
"@eslint/js": "^10.0.1",
|
|
84
|
+
"@types/jest": "^30.0.0",
|
|
85
|
+
"babel-jest": "^30.3.0",
|
|
86
|
+
"eslint": "^10.0.3",
|
|
87
|
+
"eslint-config-prettier": "^10.1.8",
|
|
88
|
+
"eslint-plugin-json": "^4.0.1",
|
|
89
89
|
"eslint-plugin-prettier": "^5.5.5",
|
|
90
|
-
"fs-extra": "^11.3.
|
|
91
|
-
"globals": "^
|
|
90
|
+
"fs-extra": "^11.3.4",
|
|
91
|
+
"globals": "^17.4.0",
|
|
92
92
|
"husky": "^9.1.7",
|
|
93
|
-
"jest": "^
|
|
93
|
+
"jest": "^30.3.0",
|
|
94
94
|
"json-schema-to-typescript": "^15.0.4",
|
|
95
|
-
"lint-staged": "^
|
|
95
|
+
"lint-staged": "^16.4.0",
|
|
96
96
|
"prettier": "^3.8.1",
|
|
97
|
-
"rimraf": "^
|
|
97
|
+
"rimraf": "^6.1.3",
|
|
98
98
|
"ts-jest": "^29.4.6",
|
|
99
99
|
"ts-node": "^10.9.2",
|
|
100
100
|
"typescript": "^5.9.3",
|
|
101
|
-
"typescript-eslint": "^8.
|
|
101
|
+
"typescript-eslint": "^8.57.1"
|
|
102
102
|
},
|
|
103
103
|
"scripts": {
|
|
104
104
|
"build": "pnpm clean && pnpm generate:types && node scripts/build.js",
|