uniweb 0.30.0 → 0.31.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",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Create structured Vite + React sites with content/code separation",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -41,15 +41,15 @@
|
|
|
41
41
|
"js-yaml": "^4.1.0",
|
|
42
42
|
"prompts": "^2.4.2",
|
|
43
43
|
"tar": "^7.0.0",
|
|
44
|
-
"@uniweb/kit": "^0.13.
|
|
44
|
+
"@uniweb/kit": "^0.13.7",
|
|
45
|
+
"@uniweb/core": "^0.13.0",
|
|
45
46
|
"@uniweb/semantic-parser": "^1.3.1",
|
|
46
|
-
"@uniweb/
|
|
47
|
-
"@uniweb/runtime": "^0.12.10"
|
|
47
|
+
"@uniweb/runtime": "^0.13.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"@uniweb/
|
|
51
|
-
"@uniweb/
|
|
52
|
-
"@uniweb/
|
|
50
|
+
"@uniweb/semantic-parser": "^1.3.1",
|
|
51
|
+
"@uniweb/build": "^0.27.0",
|
|
52
|
+
"@uniweb/content-reader": "^1.2.4"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@uniweb/build": {
|
package/partials/agents.md
CHANGED
|
@@ -287,7 +287,7 @@ Paths are relative to the site package you identified in step 1 — `site/` in t
|
|
|
287
287
|
|
|
288
288
|
**Change a nav item.** First check how nav is produced. If `<site>/layout/header.md` lists the links (a markdown list, or a `yaml:nav` block), edit it there. If it doesn't, the Header is generating nav from the page hierarchy — change page titles and order in `site.yml` / `page.yml` instead.
|
|
289
289
|
|
|
290
|
-
**Update the project's Uniweb dependencies — and this file.** `uniweb update`. One command aligns every `@uniweb/*` dependency *and* refreshes this AGENTS.md together
|
|
290
|
+
**Update the project's Uniweb dependencies — and this file.** `npx uniweb@latest update`. One command aligns every `@uniweb/*` dependency *and* refreshes this AGENTS.md together. Preview with `--dry-run`. ⛔ **The `@latest` is doing the work** — a bare `uniweb update` runs the CLI this project already pins, which aligns you to the matrix you already have and correctly reports nothing to do. **Don't reach for `npm update` / `pnpm update`** — see *Staying current* in Part 5 for why that breaks things quietly.
|
|
291
291
|
|
|
292
292
|
**Change one section's columns / spacing / variant.** Check that type's `meta.js` `params:` first. If the knob exists, set it in that section's frontmatter and you're done, in the content lane. If it doesn't, it's a foundation change — see the warning in step 3.
|
|
293
293
|
|
|
@@ -1751,7 +1751,7 @@ fetch:
|
|
|
1751
1751
|
limit: 3
|
|
1752
1752
|
```
|
|
1753
1753
|
|
|
1754
|
-
**Lean lists with `deferred:`.** Collections with heavy fields (article bodies, large nested arrays) can declare `deferred: [body]` in `site.yml`. The cascade payload omits those fields; per-record full files are emitted at `/data/<name>/<slug>.json` (file-based collections) or fetched from an author-declared `detailUrl:` (API-backed). On dynamic-route pages the focused record's full data is delivered automatically; elsewhere components fetch on demand via `useEntityDetail`.
|
|
1754
|
+
**Lean lists with `deferred:`.** Collections with heavy fields (article bodies, large nested arrays) can declare `deferred: [body]` in `site.yml`. The cascade payload omits those fields; per-record full files are emitted at `/data/<name>/<slug>.json` (file-based collections) or fetched from an author-declared `detailUrl:` (API-backed). On dynamic-route pages the focused record's full data is delivered automatically; elsewhere components fetch on demand via `useEntityDetail`. The hook is safe to call on any collection: when there is no separate detail source it returns the record you passed in, because nothing was stripped from it.
|
|
1755
1755
|
|
|
1756
1756
|
**Component-side fetching.** When a component genuinely needs to fetch on its own (a search box, "load more", a lazy popover), use the kit hooks — `useFetched`, `useCacheEntry`, `useEntityDetail`. They share the framework's cache and dispatcher with declarative fetches; same-key requests dedupe automatically.
|
|
1757
1757
|
|
|
@@ -2024,8 +2024,9 @@ collector's event dimension into a cardinality problem.
|
|
|
2024
2024
|
|
|
2025
2025
|
### Choosing what a site sends
|
|
2026
2026
|
|
|
2027
|
-
By default a site sends `page_view`, `outbound_click` and `section_view
|
|
2028
|
-
|
|
2027
|
+
By default a site sends `page_view`, `outbound_click` and `section_view` — or,
|
|
2028
|
+
where a host supplies the collector, whatever that host declares it collects.
|
|
2029
|
+
Narrow or widen that with `emit`:
|
|
2029
2030
|
|
|
2030
2031
|
```yaml
|
|
2031
2032
|
# site.yml — your own collector
|
|
@@ -2044,10 +2045,19 @@ are read key by key, so naming `emit` alone overrides nothing else the host
|
|
|
2044
2045
|
declared. And declaring your own `endpoint:` always wins, so a site pointing at
|
|
2045
2046
|
its own collector keeps working on any host, including none.
|
|
2046
2047
|
|
|
2047
|
-
`minimal` is `page_view` alone. `standard` is the default
|
|
2048
|
-
yes, so an event added in a later framework
|
|
2049
|
-
changing anything — which is exactly why
|
|
2050
|
-
curated set that a release cannot grow behind
|
|
2048
|
+
`minimal` is `page_view` alone. `standard` is the default when you supply your
|
|
2049
|
+
own `endpoint:`. `all` is a standing yes, so an event added in a later framework
|
|
2050
|
+
release is included without you changing anything — which is exactly why
|
|
2051
|
+
`standard` exists as well: it is a curated set that a release cannot grow behind
|
|
2052
|
+
your back.
|
|
2053
|
+
|
|
2054
|
+
⭐ **Saying nothing means two different things, and which one depends on who
|
|
2055
|
+
supplies the address.** A site with its own `endpoint:` gets `standard`. A site
|
|
2056
|
+
on a **host-supplied** collector gets **whatever that host declares it
|
|
2057
|
+
collects** — it has no address of its own, so the arrangement is that the host
|
|
2058
|
+
does analytics for it, and the set grows when the host starts collecting
|
|
2059
|
+
something new. **Naming `emit` always wins**, so pin it if you would rather not
|
|
2060
|
+
follow your host.
|
|
2051
2061
|
|
|
2052
2062
|
A site can also set **`flushIntervalMs`** to widen the batching window (default
|
|
2053
2063
|
5000, milliseconds — `30` is thirty *milliseconds*). A host that supplies your
|
|
@@ -2216,7 +2226,8 @@ uniweb i18n init-freeform / update-hash / move / rename / prune --freeform
|
|
|
2216
2226
|
uniweb -v # Installed CLI version — and whether a newer one exists
|
|
2217
2227
|
uniweb doctor # Diagnose project configuration (--fix to auto-repair)
|
|
2218
2228
|
uniweb validate # Check file-based data against declared schemas (--strict for CI)
|
|
2219
|
-
uniweb update
|
|
2229
|
+
npx uniweb@latest update # Align @uniweb/* deps + AGENTS.md (--dry-run, --yes)
|
|
2230
|
+
# bare `uniweb update` aligns to the CLI you ALREADY have
|
|
2220
2231
|
uniweb inspect <path> # Show parsed content for a section or page (--raw for the AST)
|
|
2221
2232
|
|
|
2222
2233
|
uniweb <command> --help # Per-command flags — no side effects. Prefer this over guessing.
|
|
@@ -2284,15 +2295,28 @@ Either side can publish. Nothing about this changes how you build: the same foun
|
|
|
2284
2295
|
```bash
|
|
2285
2296
|
uniweb -v # installed CLI version, and whether a newer one is available
|
|
2286
2297
|
uniweb doctor # report drift in this project, changing nothing
|
|
2287
|
-
uniweb update --dry-run
|
|
2288
|
-
uniweb update
|
|
2298
|
+
npx uniweb@latest update --dry-run # preview exactly what update would change
|
|
2299
|
+
npx uniweb@latest update # apply: align @uniweb/* deps AND refresh AGENTS.md
|
|
2289
2300
|
```
|
|
2290
2301
|
|
|
2291
|
-
**`uniweb update` is the command for bringing a project up to date.** It aligns the project's `@uniweb/*` dependencies *and* this AGENTS.md to the version matrix of the CLI that runs it. Deps and documentation move together — that's the whole point of the verb.
|
|
2302
|
+
**`npx uniweb@latest update` is the command for bringing a project up to date.** It aligns the project's `@uniweb/*` dependencies *and* this AGENTS.md to the version matrix of the CLI that runs it. Deps and documentation move together — that's the whole point of the verb.
|
|
2303
|
+
|
|
2304
|
+
> ### ⛔ WRITE `@latest`. A BARE `uniweb update` IS USUALLY A NO-OP, AND IT SAYS SO CONVINCINGLY
|
|
2305
|
+
>
|
|
2306
|
+
> `update` reconciles this project against **the matrix of the CLI that runs it** — and in a project,
|
|
2307
|
+
> `uniweb` resolves to the copy in your own `node_modules`, pinned by your own `package.json`. That
|
|
2308
|
+
> copy has no way to know a newer release exists.
|
|
2309
|
+
>
|
|
2310
|
+
> ⇒ **It reports everything aligned and changes nothing — correctly.** It answered the question it
|
|
2311
|
+
> was asked, which is why the output looks like success rather than a mistake. The same applies to
|
|
2312
|
+
> `pnpm uniweb update` and to a stale global install.
|
|
2313
|
+
>
|
|
2314
|
+
> ⭐ **`@latest` is what makes it a question about the newest release** rather than about the one you
|
|
2315
|
+
> already have. It also bumps the pin, so the next bare invocation is no longer stale.
|
|
2292
2316
|
|
|
2293
2317
|
> **Don't run `npm update` or `pnpm update` on the `@uniweb/*` packages.** They're a matched set resolved by the CLI's version matrix, not independently versioned libraries you upgrade one at a time. Updating them directly gets you a combination nobody tested, and it won't refresh AGENTS.md — so this guide silently drifts out of sync with the code it describes, which is worse than being out of date, because nothing looks wrong.
|
|
2294
2318
|
|
|
2295
|
-
Two ordering rules: `update` won't refresh AGENTS.md while declared deps still lag the CLI, or while edited deps haven't been installed — either would put the doc ahead of the code. And updating the CLI itself is your package manager's job (`npm i -g uniweb@latest`, `pnpm add -g uniweb@latest`); `uniweb update` does not do that.
|
|
2319
|
+
Two ordering rules: `update` won't refresh AGENTS.md while declared deps still lag the CLI, or while edited deps haven't been installed — either would put the doc ahead of the code. And updating the CLI itself is your package manager's job (`npm i -g uniweb@latest`, `pnpm add -g uniweb@latest`); `uniweb update` does not do that.
|
|
2296
2320
|
|
|
2297
2321
|
### `package.json` `uniweb` block
|
|
2298
2322
|
|
package/src/commands/publish.js
CHANGED
|
@@ -409,8 +409,13 @@ export async function publish(args = []) {
|
|
|
409
409
|
if (!fnd.proceed) return { exitCode: fnd.refused ? 1 : 0 }
|
|
410
410
|
|
|
411
411
|
// 2. Build the site data (link mode): dist/site-content.json (+ per-locale),
|
|
412
|
-
// dist/data/*, dist/
|
|
413
|
-
//
|
|
412
|
+
// dist/data/*, dist/assets/*. Spawn the SAME CLI binary so the inner
|
|
413
|
+
// build can't resolve to a different installed version.
|
|
414
|
+
//
|
|
415
|
+
// ⛔ NO SEARCH INDEX. This listed `dist/_search/*` until 2026-08-26; the
|
|
416
|
+
// link lane stopped emitting one on 2026-08-01 (`@uniweb/build`
|
|
417
|
+
// `site/build-site-data.js` step 5) because only one of the two
|
|
418
|
+
// publishers produced it.
|
|
414
419
|
say.info('Building site…')
|
|
415
420
|
console.log('')
|
|
416
421
|
execSync(`node ${JSON.stringify(process.argv[1])} build --link`, {
|
|
@@ -627,7 +632,7 @@ export async function publish(args = []) {
|
|
|
627
632
|
//
|
|
628
633
|
// A file map needs a name nothing else claims (`static_data` / `data_files`
|
|
629
634
|
// were proposed) AND a consumer that reads it — neither settled. See
|
|
630
|
-
//
|
|
635
|
+
// one object per file, no bundle.
|
|
631
636
|
const injectInfo = {
|
|
632
637
|
...(fnd.ref ? { foundation: fnd.ref } : {})
|
|
633
638
|
}
|
package/src/framework-index.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-08-
|
|
3
|
+
"generatedAt": "2026-08-27T04:57:15.265Z",
|
|
4
4
|
"packages": {
|
|
5
5
|
"@uniweb/build": {
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.27.0",
|
|
7
7
|
"path": "framework/build",
|
|
8
8
|
"deps": [
|
|
9
9
|
"@uniweb/content-reader",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"deps": []
|
|
30
30
|
},
|
|
31
31
|
"@uniweb/core": {
|
|
32
|
-
"version": "0.
|
|
32
|
+
"version": "0.13.0",
|
|
33
33
|
"path": "framework/core",
|
|
34
34
|
"deps": [
|
|
35
35
|
"@uniweb/semantic-parser",
|
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
"deps": []
|
|
43
43
|
},
|
|
44
44
|
"@uniweb/icons": {
|
|
45
|
-
"version": "0.4.
|
|
45
|
+
"version": "0.4.4",
|
|
46
46
|
"path": "framework/icons",
|
|
47
47
|
"deps": [
|
|
48
48
|
"@uniweb/core"
|
|
49
49
|
]
|
|
50
50
|
},
|
|
51
51
|
"@uniweb/kit": {
|
|
52
|
-
"version": "0.13.
|
|
52
|
+
"version": "0.13.7",
|
|
53
53
|
"path": "framework/kit",
|
|
54
54
|
"deps": [
|
|
55
55
|
"@uniweb/core",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"deps": []
|
|
69
69
|
},
|
|
70
70
|
"@uniweb/projections": {
|
|
71
|
-
"version": "0.3.
|
|
71
|
+
"version": "0.3.7",
|
|
72
72
|
"path": "framework/projections",
|
|
73
73
|
"deps": [
|
|
74
74
|
"@uniweb/content-writer",
|
|
@@ -76,7 +76,7 @@
|
|
|
76
76
|
]
|
|
77
77
|
},
|
|
78
78
|
"@uniweb/runtime": {
|
|
79
|
-
"version": "0.
|
|
79
|
+
"version": "0.13.0",
|
|
80
80
|
"path": "framework/runtime",
|
|
81
81
|
"deps": [
|
|
82
82
|
"@uniweb/core",
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
"deps": []
|
|
90
90
|
},
|
|
91
91
|
"@uniweb/schemas": {
|
|
92
|
-
"version": "0.2.
|
|
92
|
+
"version": "0.2.11",
|
|
93
93
|
"path": "framework/schemas",
|
|
94
94
|
"deps": []
|
|
95
95
|
},
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"deps": []
|
|
115
115
|
},
|
|
116
116
|
"@uniweb/unipress": {
|
|
117
|
-
"version": "0.8.
|
|
117
|
+
"version": "0.8.13",
|
|
118
118
|
"path": "framework/unipress",
|
|
119
119
|
"deps": [
|
|
120
120
|
"@uniweb/build",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
* runtime — so it is returned for parity and for a caller that wants to verify
|
|
39
39
|
* an upload landed.
|
|
40
40
|
*
|
|
41
|
-
* Contract ratified 2026-08-18
|
|
41
|
+
* Contract ratified with the backend lane, 2026-08-18.
|
|
42
42
|
* **Wired into `publish.js` and shipped in `uniweb` 0.25.3.** Both arms of the
|
|
43
43
|
* endpoint exist (presigned landed 2026-08-18, per Diego).
|
|
44
44
|
*
|