@uniweb/build 0.33.0 → 0.34.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniweb/build",
3
- "version": "0.33.0",
3
+ "version": "0.34.0",
4
4
  "description": "Build tooling for the Uniweb Component Web Platform",
5
5
  "type": "module",
6
6
  "exports": {
@@ -60,14 +60,14 @@
60
60
  "sharp": "^0.35.3",
61
61
  "yaml": "^2.5.0",
62
62
  "@uniweb/schemas": "^0.2.13",
63
- "@uniweb/projections": "^0.5.4",
64
- "@uniweb/theming": "^0.1.15",
65
63
  "@uniweb/content-reader": "^1.2.4",
64
+ "@uniweb/theming": "^0.1.15",
66
65
  "@uniweb/semantic-parser": "^1.4.0",
66
+ "@uniweb/projections": "^0.5.5",
67
67
  "@uniweb/content-writer": "^0.3.4"
68
68
  },
69
69
  "optionalDependencies": {
70
- "@uniweb/runtime": "^0.13.5"
70
+ "@uniweb/runtime": "^0.13.6"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0",
@@ -76,7 +76,7 @@
76
76
  "@tailwindcss/vite": "^4.0.0",
77
77
  "@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
78
78
  "vite-plugin-svgr": "^4.0.0",
79
- "@uniweb/core": "^0.16.0"
79
+ "@uniweb/core": "^0.17.0"
80
80
  },
81
81
  "peerDependenciesMeta": {
82
82
  "vite": {
@@ -349,8 +349,28 @@ export function parseFetchConfig(fetch) {
349
349
  warnUnknownFetchKeys(fetch, 'query')
350
350
  if (fetch.filter !== undefined) warnFilterDeprecated()
351
351
  return {
352
+ // ⭐ **`query` IS EMITTED, and that is what makes the two producers agree.**
353
+ // The sync lane has always emitted it (`uwx/site.js`) and this one did not,
354
+ // for the same declaration — so `resolveQuerySource` fired on a published
355
+ // site and never on a `--link`-deployed one. Measured 2026-09-02 against a
356
+ // host declaring `config.records`:
357
+ //
358
+ // --link endpoint undefined, path /data/articles.json ← the STATIC file
359
+ // publish endpoint /_api/q/articles ← the live lane
360
+ //
361
+ // Same site, same declaration, two verbs, two data sources. Publishing to a
362
+ // platform that declares a live lane is supposed to READ from it — the
363
+ // compiled `/data/*.json` is the escape hatch for entities with no known
364
+ // data schema, which never sync, not a second way to serve the ones that do.
365
+ //
366
+ // ⚠️ Not in the cache key: `deriveCacheKey` hashes {path,url,endpoint,schema,
367
+ // transform}, so adding this moves no cached entry.
368
+ query: fetch.query,
352
369
  path: queryDataUrl(fetch.query),
353
370
  url: undefined,
371
+ // The BINDING KEY — the `content.data.<key>` a component reads. Defaults to
372
+ // the query name, which is why the two were confusable; `query` above now
373
+ // carries the identity so this one only has to carry the key.
354
374
  schema: fetch.schema || fetch.query,
355
375
  prerender: fetch.prerender ?? true,
356
376
  merge: fetch.merge ?? false,
package/src/uwx/site.js CHANGED
@@ -251,7 +251,11 @@ function buildPageData(config, ctx) {
251
251
  //
252
252
  // `schema` (the query name) is BOTH the content.data key and part of the
253
253
  // dataStore cache key (deriveCacheKey hashes {path,url,endpoint,schema,…};
254
- // the shorthand is ignored). Mirrors the static build's parseFetchConfig.
254
+ // the shorthand is ignored). Mirrors the static build's parseFetchConfig
255
+ // ⚠️ which it did NOT until 2026-09-02. This line emitted `query` and that
256
+ // one did not, for the same declaration, so `resolveQuerySource` fired on a
257
+ // published site and never on a `--link`-deployed one: same site, two verbs,
258
+ // two data sources. The claim was here the whole time; the mirroring was not.
255
259
  // ⭐ `query`, END TO END — no crossing. An earlier version emitted `collection`
256
260
  // here on the belief that this field was the backend's to name. MEASURED
257
261
  // otherwise: framework already ships `transform`, `detailPage`, `merge` and