Skip to content

Phase 1 core baseline + query tests#15

Open
flyon wants to merge 71 commits intodevfrom
rebrand
Open

Phase 1 core baseline + query tests#15
flyon wants to merge 71 commits intodevfrom
rebrand

Conversation

@flyon
Copy link
Copy Markdown
Member

@flyon flyon commented Feb 4, 2026

Change Summary

  • Phase 1 core extraction baseline under (copied src + configs)
  • Added query fixtures and full query/object + type inference tests
  • Updated plan and build config to exclude tests from build

Change type

  • feat: (new feature for the user, not a new feature for build script)
  • fix: (bug fix for the user, not a fix to a build script)
  • docs: (changes to the documentation)
  • style: (formatting, missing semi colons, etc; no production code change)
  • refactor: (refactoring production code, eg. renaming a variable)
  • test: (adding missing tests, refactoring tests; no production code change)
  • chore: (updating grunt tasks etc; no production code change)

Test/ Verification

lincd@1.0.3 build
rimraf ./lib && yarn compile && yarn dual-package && yarn copy-to-lib && echo '✅ Done'

Internal Error: lincd@workspace:.: This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile
at V0.getCandidates (/Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:435:5145)
at kf.getCandidates (/Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:391:1264)
at /Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:439:8033
at df (/Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:390:11070)
at ge (/Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:439:8013)
at async Promise.allSettled (index 0)
at async io (/Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:390:10398)
at async /Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:439:8545
at async ti.startProgressPromise (/Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:390:47579)
at async je.resolveEverything (/Users/rene/.cache/node/corepack/v1/yarn/3.6.1/yarn.js:439:6573) (rebrand/core)

lincd@1.0.3 test
jest (rebrand/core)

Additional information / screenshots (optional)

  • None

flyon and others added 30 commits February 1, 2026 08:18
Rewrote the @_linked/core extraction plan from scratch with resolved
design decisions, detailed sub-steps, and lessons from prior attempts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
After each completed step, mark it done in the plan with the commit
hash so the plan file is the single source of truth for progress.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Phase 1 now creates rebrand/core/ from scratch (not reusing linked-js2),
sets up build configs with root node_modules, restructures tests into
query.test.ts (object assertions) and query.types.test.ts (type inference),
backed by shared query factories for reuse by memstore. Also updated
ontology decision to use namespace functions and clarified shared test
fixture design for cross-package reuse.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Query factories return promises (not captured objects) so they stay
pure and reusable by memstore. Type tests for void/DeleteResponse
operations need only one test per operation type.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…-pruning-v1

Add core extraction plan and linked-js2 baseline scaffold
René Verheij and others added 13 commits February 10, 2026 13:07
- Add tmpEntityBase and entity() helper to query-fixtures.ts
- Update all bare IDs (p1, p2, p3, etc.) to full URIs
- Update query.test.ts assertions to match new URIs
- Remove unused eventemitter3 from tsconfig types
- Add next-tick as dependency (needed by Shape.ts)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Copy entire src/ into rebrand/rdf-mem-store/src/
- Create package.json with @_linked/core peer dep, rdflib/next-tick/eventemitter3 deps
- Add tsconfig with paths mapping to ../core/src/*
- Add jest.config.js with moduleNameMapper for @_linked/core
- Copy dual-package.js build script
- Symlink @_linked/core in node_modules (not tracked)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove 4 directories (queries/, shapes/, ontologies/, css/) and 30+
individual files that are now provided by @_linked/core or are
React-specific / unused.

Kept: models.ts, Datafactory.ts, RDF collections (QuadSet, NodeSet,
etc.), events, LocalQueryResolver, URI, Debug, and RDF interfaces.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Redirect 17 imports across 10 source files from local paths to
@_linked/core (CoreMap, CoreSet, ICoreIterable, Prefix, queries,
shapes, ontologies).

Add models.test.ts smoke test (6 tests) validating NamedNode
singleton, Literal, set/getOne/getAll, Quad singleton, getAllInverse.

Build: 0 errors outside LocalQueryResolver.ts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add get id() on NamedNode aliasing uri, satisfying NodeReferenceValue
- Create utils/toNamedNode.ts: converts {id: string} to NamedNode,
  passes through existing NamedNode instances
- Add 5 new tests (id alias, interface compat, toNamedNode passthrough,
  plain ref conversion, singleton check)

11/11 tests pass. Build clean outside LocalQueryResolver.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Convert all core type boundaries in LocalQueryResolver to use toNamedNode
bridge: PropertyShape.path, ontology values (rdf.type, xsd.*), nodeKind
comparisons. Add getInstancesByType, shapeSetToNodeSet, toPropertyPath
helpers. Add 9 end-to-end resolver tests using shared query fixtures.
tsc 0 errors, 20/20 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Port all non-React select query tests from src/tests/utils/query-tests.tsx
to rdf-mem-store resolver tests. Covers all 7 sections: basic property
selection, nested paths, where clauses (and/or/some/every/sequences),
aggregation & sub-select, type casting (.as), sorting & limiting.
Test data matches original exactly (4 persons, 2 dogs).
tsc 0 errors, 59/59 tests pass.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Phase 6: Extract InMemoryStore into src/InMemoryStore.ts implementing
IQuadStore from core. Simplified by removing LinkedStorage dependency
(uses targetGraph || defaultGraph directly).

Phase 7: Wire ResolverQueryParser to real createLocal/updateLocal/
deleteLocal. Fix node.save() hang by marking nodes non-temporary
(data already in global graph). Add 17 CRUD tests covering create,
update, delete with full result validation and graph state restoration.

Phase 8: Create index.ts with full export surface. Package builds
CJS+ESM. All 76 tests pass (11 model + 48 select + 17 CRUD).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove tsconfig paths mapping from base config (used by build) so
TypeScript resolves @_linked/core via the node_modules symlink to
core's built lib/esm output. This prevents core source files from
being compiled into rdf-mem-store's build output.

- Symlink now: node_modules/@_linked/core -> ../core/lib/esm
- Build output is now flat: lib/{cjs,esm}/index.js (no nesting)
- package.json exports reverted to clean paths
- Tests use tsconfig-test.json which keeps paths for ts-jest
- jest moduleNameMapper points directly to ../core/src/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds rebrand/package.json with npm workspaces config so that
@_linked/core is automatically symlinked for rdf-mem-store.
This replaces the manually created symlink and survives fresh
checkouts (just run `npm install` from rebrand/).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Rebrand: Extract @_linked/core and @_linked/rdf-mem-store (phases 0-8)
@socket-security
Copy link
Copy Markdown

socket-security bot commented Feb 10, 2026

René Verheij and others added 16 commits February 10, 2026 16:32
Extract @_linked/react package and align core registration
- Remove linked-js and linked-js2 (obsolete extraction attempts)
- Fix core/package.json scripts to use npx instead of ../../node_modules paths
- Move extraction plans to docs/ with numbered prefixes and YAML frontmatter
- Add AGENTS.md with workspace structure, planning workflow, and doc requirements
- Add changelog sections to rdf-mem-store and react READMEs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Clean up rebrand workspace, add AGENTS.md workflow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant