@_linked/core 2.8.0-next.20260624100616 → 2.8.0
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 +69 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -126,6 +126,75 @@ dependent: true })` marks a shape whose instances may be cascade-deleted when re
|
|
|
126
126
|
semantics, and paginated nested selects (inner `LIMIT`/`OFFSET`) are still
|
|
127
127
|
emitted as sub-SELECTs.
|
|
128
128
|
|
|
129
|
+
## 2.7.0
|
|
130
|
+
|
|
131
|
+
### Minor Changes
|
|
132
|
+
|
|
133
|
+
- [#93](https://github.com/linked-cm/core/pull/93) [`89b3f55`](https://github.com/linked-cm/core/commit/89b3f5503329d88d0e6d9fe0a2a1418e06a58252) Thanks [@flyon](https://github.com/flyon)! - Development-mode source resolution and an instance-count diagnostic.
|
|
134
|
+
|
|
135
|
+
- **Conditional `development` exports.** `package.json` now declares a `development` export condition resolving to `./src/*.ts` (and `./src/index.ts` for the root). Vite's browser-side resolver picks the TypeScript source in dev mode, enabling HMR-on-source for `@_linked/core` from a consuming app. Production resolution (`import` → `lib/esm`, `require` → `lib/cjs`, `types`) is unchanged.
|
|
136
|
+
- **`LinkedStorage.getLoadedInstanceCount(): number`** — new public static method reporting how many `@_linked/core` instances are registered on the global tree (a diagnostic for the Vite-SSR-vs-Node-resolver dual-load split).
|
|
137
|
+
|
|
138
|
+
- [#93](https://github.com/linked-cm/core/pull/93) [`89b3f55`](https://github.com/linked-cm/core/commit/89b3f5503329d88d0e6d9fe0a2a1418e06a58252) Thanks [@flyon](https://github.com/flyon)! - Shape, package, and framework-vocabulary IRIs now use the canonical `linked.cm` namespace, with a configurable per-package publish root.
|
|
139
|
+
|
|
140
|
+
**New scheme (arch-aligned):**
|
|
141
|
+
|
|
142
|
+
- Shape IRIs: `https://linked.cm/shape/{packageSlug}/{ShapeName}` (PascalCase shape name; previously `https://data.lincd.org/module/{sanitized}/shape/{lowercased}`).
|
|
143
|
+
- Package IRIs: `https://linked.cm/pkg/{packageSlug}` (previously `…/module/{name}`).
|
|
144
|
+
- Framework vocabulary: `https://linked.cm/ont/linked-core/` (prefix `linked_core`; previously `https://purl.org/on/lincd/`, prefix `lincd`). The `Module` term is renamed to `Package`.
|
|
145
|
+
|
|
146
|
+
**New / changed public API:**
|
|
147
|
+
|
|
148
|
+
- `linkedPackage(name, { baseUri? })` — packages declare where they publish. `baseUri` defaults to `https://linked.cm/` (first-party); CN injects a workspace-scoped root (`{workspaceSlug}.id.create.now`) for private packages. The IRI slug is the package **basename** with the npm scope dropped (`@_linked/core` → `core`, `@linked.cm/blog` → `blog`); there is no separate slug param. Slugs must be globally unique within the publish root — the registry enforces this and reserves the first-party (`@_linked`) names.
|
|
149
|
+
- New exports `LINKED_DATA_ROOT`, `getPackageUri()`, `setPackagePublishConfig()`, `packageNameToSlug()` (replaces the removed `LINCD_DATA_ROOT`).
|
|
150
|
+
- The framework ontology export is now `coreOntology` (was `lincd`).
|
|
151
|
+
|
|
152
|
+
**Breaking:** generated shape/package/term IRIs change. Consumers that hardcoded `data.lincd.org` IRIs, imported `LINCD_DATA_ROOT`, or used the `lincd` ontology export must update. Stored data keyed on the old IRIs needs migration.
|
|
153
|
+
|
|
154
|
+
- [#93](https://github.com/linked-cm/core/pull/93) [`89b3f55`](https://github.com/linked-cm/core/commit/89b3f5503329d88d0e6d9fe0a2a1418e06a58252) Thanks [@flyon](https://github.com/flyon)! - SPARQL generation: structured property paths on named properties, and inner pagination for nested selects.
|
|
155
|
+
|
|
156
|
+
**Structured `sh:path` on named properties now resolve correctly.** A query that references a named property whose SHACL `sh:path` is structured (a sequence `[a, b]`, an inverse `^p`, or an alternative `a|b`) previously collapsed to a shadow IRI and matched nothing. It now emits the correct SPARQL property-path predicate. Simple single-predicate properties are unaffected (output unchanged).
|
|
157
|
+
|
|
158
|
+
**Nested selects can now bound a related collection with `.limit()` / `.offset()` / `.orderBy()`** — when the outer query targets a single subject:
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
// Up to 2 friends, ordered, for one person
|
|
162
|
+
Person.select((p) =>
|
|
163
|
+
p.friends
|
|
164
|
+
.select((f) => f.name)
|
|
165
|
+
.orderBy((f) => f.name)
|
|
166
|
+
.limit(2)
|
|
167
|
+
).for({ id });
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
This emits a real SPARQL sub-`SELECT … ORDER BY … LIMIT … OFFSET …` that bounds the collection per parent. `orderBy` accepts a proxy callback (`f => f.name`) or a property-name string and defaults to ascending.
|
|
171
|
+
|
|
172
|
+
Notes:
|
|
173
|
+
|
|
174
|
+
- Per-group pagination across **multiple** parents is not supported and now throws a clear error instead of silently applying a global limit. The same applies to `.limit()` on a deeper (grandchild) collection, and to `.limit()` called directly on a traversal without `.select(...)`.
|
|
175
|
+
- Queries with no inner pagination are emitted exactly as before.
|
|
176
|
+
|
|
177
|
+
### Patch Changes
|
|
178
|
+
|
|
179
|
+
- [#93](https://github.com/linked-cm/core/pull/93) [`89b3f55`](https://github.com/linked-cm/core/commit/89b3f5503329d88d0e6d9fe0a2a1418e06a58252) Thanks [@flyon](https://github.com/flyon)! - `initTree()` is now idempotent: if `global.lincd` already exists (which
|
|
180
|
+
happens structurally under Vite SSR — Vite resolves `@_linked/core/utils/Package`
|
|
181
|
+
from `src/`, and any `/* @vite-ignore */` dynamic import via Node's resolver
|
|
182
|
+
gets it from `lib/esm/`), the function attaches to the existing registry
|
|
183
|
+
instead of throwing or warning.
|
|
184
|
+
|
|
185
|
+
Previous behavior used a `_lincdMultiWarned` one-shot flag that logged a
|
|
186
|
+
warning on the second initialization. This was framed as "interim" but
|
|
187
|
+
was actually the correct semantic for the Vite-SSR-vs-Node-resolver split.
|
|
188
|
+
The new code expresses the same behavior as the explicit design rather
|
|
189
|
+
than as a workaround.
|
|
190
|
+
|
|
191
|
+
No API change. Existing consumers see the same `lincd` global tree they
|
|
192
|
+
saw before. Apps that previously saw "Multiple versions of Linked are
|
|
193
|
+
loaded — accepted during HMR/Vite interim" in their dev log will no
|
|
194
|
+
longer see that line.
|
|
195
|
+
|
|
196
|
+
Context: see create-now plan-011 report (docs/reports/009-legacy-lincd-eradication.md).
|
|
197
|
+
|
|
129
198
|
## 2.6.0
|
|
130
199
|
|
|
131
200
|
### Minor Changes
|