diff --git a/.changeset/shacl-property-paths-and-prefix-resolution.md b/.changeset/shacl-property-paths-and-prefix-resolution.md deleted file mode 100644 index a78dac0..0000000 --- a/.changeset/shacl-property-paths-and-prefix-resolution.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -"@_linked/core": patch ---- - -### SHACL property path support - -Property decorators now accept full SPARQL property path syntax: - -```ts -@literalProperty({path: 'foaf:knows/foaf:name'}) // sequence -@literalProperty({path: '|'}) // alternative -@literalProperty({path: '^foaf:knows'}) // inverse -@literalProperty({path: 'foaf:knows*'}) // zeroOrMore -``` - -New exports from `src/paths/`: -- `PathExpr`, `PathRef` — AST types for property paths -- `parsePropertyPath(input): PathExpr` — parser for SPARQL property path strings -- `normalizePropertyPath(input): PathExpr` — normalizes any input form to canonical AST -- `pathExprToSparql(expr): string` — renders PathExpr to SPARQL syntax -- `serializePathToSHACL(expr): SHACLPathResult` — serializes to SHACL RDF triples - -`PropertyShape.path` is now typed as `PathExpr` (was opaque). Complex paths flow through the full IR pipeline and emit correct SPARQL property path syntax in generated queries. - -### Strict prefix resolution in query API - -`QueryBuilder.for()` and `.forAll()` now throw on unregistered prefixes instead of silently passing through. New export: -- `resolveUriOrThrow(str): string` — strict prefix resolution (throws on unknown prefix) - -### SHACL constraint field fixes - -- `hasValue` and `in` config fields now correctly handle literal values (`string`, `number`, `boolean`) — previously all values were wrapped as IRI nodes -- `lessThan` and `lessThanOrEquals` config fields are now wired into `createPropertyShape` and exposed via `getResult()` -- New `PropertyShapeResult` interface provides typed access to `getResult()` output diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e7b281..cca698b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,42 @@ # Changelog +## 2.2.0 + +### Patch Changes + +- [#34](https://github.com/Semantu/linked/pull/34) [`e2ae4a2`](https://github.com/Semantu/linked/commit/e2ae4a28e5be28716e1634ca81d9c379a291cbc6) Thanks [@flyon](https://github.com/flyon)! - ### SHACL property path support + + Property decorators now accept full SPARQL property path syntax: + + ```ts + @literalProperty({path: 'foaf:knows/foaf:name'}) // sequence + @literalProperty({path: '|'}) // alternative + @literalProperty({path: '^foaf:knows'}) // inverse + @literalProperty({path: 'foaf:knows*'}) // zeroOrMore + ``` + + New exports from `src/paths/`: + + - `PathExpr`, `PathRef` — AST types for property paths + - `parsePropertyPath(input): PathExpr` — parser for SPARQL property path strings + - `normalizePropertyPath(input): PathExpr` — normalizes any input form to canonical AST + - `pathExprToSparql(expr): string` — renders PathExpr to SPARQL syntax + - `serializePathToSHACL(expr): SHACLPathResult` — serializes to SHACL RDF triples + + `PropertyShape.path` is now typed as `PathExpr` (was opaque). Complex paths flow through the full IR pipeline and emit correct SPARQL property path syntax in generated queries. + + ### Strict prefix resolution in query API + + `QueryBuilder.for()` and `.forAll()` now throw on unregistered prefixes instead of silently passing through. New export: + + - `resolveUriOrThrow(str): string` — strict prefix resolution (throws on unknown prefix) + + ### SHACL constraint field fixes + + - `hasValue` and `in` config fields now correctly handle literal values (`string`, `number`, `boolean`) — previously all values were wrapped as IRI nodes + - `lessThan` and `lessThanOrEquals` config fields are now wired into `createPropertyShape` and exposed via `getResult()` + - New `PropertyShapeResult` interface provides typed access to `getResult()` output + ## 2.1.0 ### Minor Changes diff --git a/package.json b/package.json index 44ddada..e3f9fab 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@_linked/core", - "version": "2.1.0", + "version": "2.2.0", "license": "MIT", "description": "Linked.js core query and SHACL shape DSL (copy-then-prune baseline)", "repository": {