pgserve 2.2.1 → 2.2.2

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 CHANGED
@@ -14,6 +14,54 @@ All notable changes to `pgserve` are documented here. The format follows
14
14
  [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project adheres
15
15
  to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
16
16
 
17
+ ## [2.2.2] - 2026-05-03
18
+
19
+ ### Changed
20
+
21
+ - **console: pre-bundle assets via `bun build`; drop CDN Babel dependency.**
22
+ The `autopg ui` console previously loaded `react@18`, `react-dom@18`, and
23
+ `@babel/standalone` from `unpkg.com` and transpiled `.jsx` files in the
24
+ browser. The console is now pre-bundled into `console/dist/app.js`
25
+ (~210KB minified) at publish time. Operators on offline / corporate-proxy
26
+ / flaky-network hosts now get a fully local UI. Eliminates ~150KB of
27
+ in-browser Babel work per page load.
28
+ - **console: source moves to `console/src/`; npm tarball ships only
29
+ `console/dist/`.** Repo layout now has `console/src/` (editable sources,
30
+ gitignored from publish) and `console/dist/` (build artifact, in tarball,
31
+ gitignored in repo). `package.json#files` updated to ship `console/dist/`
32
+ only (drop ~80KB of unminified `.jsx` from npm install).
33
+ - **`react@^18.3.1` and `react-dom@^18.3.1` added as runtime dependencies.**
34
+ Versions match the unpkg UMD scripts loaded by v2.2.1 and earlier — no
35
+ behavior change. Required for the bun-build pipeline to bundle them.
36
+
37
+ ### Added
38
+
39
+ - **`bun run console:build`** — produces `console/dist/{app.js,index.html,*.css}`
40
+ via `bun build console/src/main.jsx --target browser --minify`. Wired into
41
+ `prepublishOnly` so npm publish always ships fresh artifacts.
42
+ - **`bun run console:dev`** — incremental rebuild on file change for
43
+ contributors editing the SPA. Output goes to `console/dist/app.js`.
44
+ - **`console/src/main.jsx`** — entry shim that imports `react` + `react-dom`,
45
+ exposes them on `globalThis`, then imports the existing flat-script `.jsx`
46
+ sources in original `<script>`-tag order. Preserves the SPA's existing
47
+ global-pattern code without rewriting every file.
48
+ - **`tests/console/no-cdn.test.js`** — regression test that boots
49
+ `autopg ui`, asserts served HTML has zero `unpkg`/`jsdelivr`/`cdn.babel`/
50
+ `babel/standalone` references, and verifies `app.js` is reachable as a
51
+ static asset.
52
+
53
+ ### Notes
54
+
55
+ - **Trust boundary:** `127.0.0.1` only, single-user, no auth, no TLS — same
56
+ as v2.2.x.
57
+ - **`src/cli-ui.cjs#resolveConsoleRoot()`** prefers `console/dist/` when
58
+ present, falls back to `console/src/` for repo-checkout dev mode (with a
59
+ one-line stderr warning to remind contributors to run `console:build`).
60
+ - **Bundle size deviation:** wish target was ≤100KB minified; realistic
61
+ baseline is ~210KB (React 18 alone is ~130KB minified+gzipped). The
62
+ 100KB target was aspirational and unachievable without removing React;
63
+ CHANGELOG documents the actual figure for transparency.
64
+
17
65
  ## Unreleased — autopg console settings
18
66
 
19
67
  ### Added