Skip to content

Conversation

@flyon
Copy link
Member

@flyon flyon commented Feb 1, 2026

Motivation

  • Extract the Shape/SHACL query DSL into a standalone rebrand/linked-js package that does not depend on RDF model classes or React while preserving the ability to build the plain JS query objects.
  • Provide a minimal, testable slice of functionality to validate that Shape.select(...) calls translate into the same select-path JS object format used by the larger project.

Description

  • Added a minimal package skeleton under rebrand/linked-js including TypeScript configs, dual-output helper (scripts/dual-package.js), and Jest config for tests.
  • Implemented a small shape metadata system and decorators with Shape, ShapeDefinition, PropertyShape, and linkedShape/literalProperty/objectProperty in src/shapes/* to register property shapes without RDF model types.
  • Implemented a lightweight query builder (QueryBuilderObject, QueryShape, QueryValue, SelectQueryFactory) that proxifies a dummy shape instance to trace property accesses and produce a serializable SelectQuery object in src/queries/SelectQuery.ts.
  • Replaced the placeholder test with src/tests/query-basic.test.ts which installs a dummy QueryCaptureStore as the shape queryParser, runs Person.select(p => p.name), captures the produced query object, and asserts on its structure and property-shape metadata.

Testing

  • Compiled and ran the package build and tests with: cd rebrand/linked-js && node ../../node_modules/.bin/rimraf ./lib && node ../../node_modules/.bin/tsc -p tsconfig-cjs.json && node ../../node_modules/.bin/tsc -p tsconfig-esm.json && node ./scripts/dual-package.js && node ../../node_modules/.bin/jest --config jest.config.cjs.
  • The Jest suite completed with the single new test passing: 1 passed, 1 total.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants