Skip to content

Commit 8535cbf

Browse files
committed
v0.27.0
Autogenerated: true Claude-Code-Session-Id: b90b8375-6d62-457f-b66f-4bf9e7557d8e
1 parent 9ed7cff commit 8535cbf

11 files changed

Lines changed: 65 additions & 19 deletions

File tree

‎.rlsbl/version‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.112.0
1+
0.117.0

‎.strictcli/schema.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
},
8383
"project_id": "github.com/smm-h/pgdesign",
8484
"name": "pgdesign",
85-
"version": "0.26.0",
85+
"version": "0.27.0",
8686
"help": "PostgreSQL schema compiler",
8787
"global_flags": [
8888
{

‎CHANGELOG.md‎

Lines changed: 54 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,60 @@
22

33
# Changelog
44

5+
## 0.27.0
6+
7+
Every CLI flag and argument now declares whether it is required, optional or defaulted, no mutating command hides a default, and `generate --format json` keeps its exact bytes under `--json`.
8+
9+
<details>
10+
<summary>Context</summary>
11+
12+
pgdesign moved onto go-strictcli 0.33, whose flag system makes presence an
13+
explicit, mandatory declaration on every flag and positional argument and bans
14+
a value default on any declaration of a mutating command: absence must never
15+
resolve to a value the invocation did not state, because on a mutating command
16+
a value the framework picked is a value the framework writes. Every switch that
17+
carried such a default now declares itself optional and names its fallback in
18+
its own help text, resolved in one place rather than scattered through the
19+
handlers.
20+
21+
Two real defects fell out of doing this honestly rather than mechanically.
22+
`fmt` resolved --table-order and --column-order by comparing the parsed value
23+
against the default string, so an explicitly typed value could not be told from
24+
an absent flag and pgdesign.toml silently overrode it. And `generate --format
25+
json --json` appended the framework's machine envelope to stdout right after
26+
the hash-verified schema document, so the stream carried two concatenated JSON
27+
documents; `generate` now declares that its stdout is the artifact, which moves
28+
the envelope to stderr and leaves every format's bytes untouched.
29+
30+
The choices lists became value-plus-help records in the same pass, so --help
31+
and the CLI reference explain what each format, mode and language actually
32+
produces, and the codegen mode registry became one table that the map, the
33+
sorted name list and the choice help all derive from.
34+
35+
</details>
36+
37+
### Breaking
38+
39+
- **Machine output moved to the framework envelope.** `diff` and `stats` no longer declare their own `--json` flag: `--json` is now owned by strictcli and selects machine mode for every command. In machine mode stdout carries one document -- the envelope -- and each command's former JSON output is its `payload` member, validated against a schema the command declares. Anything parsing the old bare JSON must read `.payload` instead. Human output is unchanged, and `generate --format json` is untouched: that document is hash-verified by its reader and is never wrapped.
40+
41+
### Features
42+
43+
- Clearer `pgdesign import update` help text, and a tighter `migrate baseline` description.
44+
- **Every flag and argument now states its presence, and every choice explains itself.** `--help` and the generated CLI reference mark each flag and positional argument `required`, `optional` or `default: <v>`, and each constrained value (`--format`, `--mode`, `--lang`, `--split-mode`, `--table-order`, `--column-order`) carries a one-line description of what it does. Flags a command always needed -- `migrate squash --from`/`--to`, `migrate rebase --head`, `codegen --lang`, `testdb setup --ddl`, `testdb gc --older-than`, `testdb init --language` -- are now refused up front when absent instead of failing partway through with an ad-hoc message, and switches that used to carry an invisible default name their fallback in their own help text.
45+
46+
### Fixes
47+
48+
- **Documentation site builds again.** pgdesign's docs now have a home page, intra-doc links resolve under the current output scheme, and the API reference pages no longer carry stray extra top-level headings.
49+
- **Blog post link fixed.** The content-addressed-schemas post now links the live documentation site instead of the retired `pgdesign.smmh.dev` subdomain.
50+
- **`fmt` no longer lets pgdesign.toml override an explicit ordering flag.** `--table-order dependency` and `--column-order pk_fk_alpha` were resolved by comparing the parsed value against the default string, so an explicitly typed value was indistinguishable from an absent flag and `[format]` in pgdesign.toml silently won. Precedence is now flag > config > the documented fallback.
51+
- **`generate --format json --json` no longer corrupts the schema document.** The framework's machine envelope was written to stdout right after the document, so the stream carried two concatenated JSON documents and any reader hashing it saw a different digest. `generate` now declares that its stdout is the artifact: in machine mode the envelope goes to stderr and the document keeps its exact bytes, for every format it emits.
52+
53+
## 1.0.0
54+
55+
### Breaking
56+
57+
- **Renamed from pgspec to pgdesign.**
58+
559
## 0.26.0
660

761
New codegen, diff and introspect guides; the `@v0` install pin; generated test wrappers that handle unix-socket connection URLs.
@@ -46,12 +100,6 @@ do.
46100
- **Install with `@v0`, not `@latest`.** The Go module proxy permanently serves a `v1.0.0` for this module that was never a real release, so `go install github.com/smm-h/pgdesign/cmd/pgdesign@latest` installed it in preference to every real version. Every install instruction now pins `@v0`, and the docs explain why the phantom version cannot be retracted.
47101
- **Generated test wrappers handle unix-socket connection URLs.** The generated TypeScript wrapper dropped the username when rewriting a socket DSN (`postgresql://someuser@/db?host=/run/postgresql`), silently connecting as the process owner instead. The Java and Kotlin wrappers built `jdbc:postgresql://null/db` from the same URL and failed much later with an opaque driver error; they now refuse it up front, since the PostgreSQL JDBC driver has no unix-socket transport.
48102

49-
## 1.0.0
50-
51-
### Breaking
52-
53-
- **Renamed from pgspec to pgdesign.**
54-
55103
## 0.25.3
56104

57105
Make the live-stats test tolerate PostgreSQL's non-deterministic n_live_tup estimate so CI passes and the release can publish.

‎VERSION‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.26.0
1+
0.27.0

‎go.sum‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ github.com/santhosh-tekuri/jsonschema/v6 v6.0.3 h1:1EYB5IzjZawrrnELUi78f9fPu57Hu
5353
github.com/santhosh-tekuri/jsonschema/v6 v6.0.3/go.mod h1:JXeL+ps8p7/KNMjDQk3TCwPpBy0wYklyWTfbkIzdIFU=
5454
github.com/smm-h/go-toml-edit v0.3.0 h1:XOt0AsBYafNc8PQpJ7jpfdUiUILFuYRr8Xv8ZPit5U8=
5555
github.com/smm-h/go-toml-edit v0.3.0/go.mod h1:ateUuu33c4CaaB3XUQgsyuPEsIkAWRV8nahfZqpNhm4=
56-
github.com/smm-h/strictcli/go v0.32.0 h1:W4FcR1cGzY1LspRUS8fueUttDuPcO/WwDAHx6Yol4U4=
57-
github.com/smm-h/strictcli/go v0.32.0/go.mod h1:6VmdZhLUAAmlPH4lmH4wfdwIR0ituavDD7W2U+rXMA8=
5856
github.com/smm-h/strictcli/go v0.33.0 h1:jmzCQ+FnIIApQoVY+ilRubiDuaAwwU2Wgi3kYzOIt/E=
5957
github.com/smm-h/strictcli/go v0.33.0/go.mod h1:6VmdZhLUAAmlPH4lmH4wfdwIR0ituavDD7W2U+rXMA8=
6058
github.com/smm-h/strictspec/go v0.1.0 h1:C0yKlFwj1xH4KW6oQy3XiXklz1ROQhwdupycunuIHs8=

‎npm/package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎npm/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pgdesign",
3-
"version": "0.26.0",
3+
"version": "0.27.0",
44
"description": "PostgreSQL schema compiler with strict enforcement, NF auditing, and declarative migrations",
55
"license": "MIT",
66
"repository": {

‎pypi/pgdesign/__init__.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
except ImportError:
1414
_pkg_version = None
1515

16-
__version__ = "0.26.0"
16+
__version__ = "0.27.0"
1717

1818

1919
def _get_version():

‎pypi/pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "pgdesign"
7-
version = "0.26.0"
7+
version = "0.27.0"
88
description = "PostgreSQL schema compiler with strict enforcement, NF auditing, and declarative migrations"
99
license = "MIT"
1010
requires-python = ">=3.8"

‎pypi/uv.lock‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)