diff --git a/.changeset/bold-spiders-rest.md b/.changeset/bold-spiders-rest.md deleted file mode 100644 index 4929148..0000000 --- a/.changeset/bold-spiders-rest.md +++ /dev/null @@ -1,15 +0,0 @@ ---- -'@codama/spec': minor ---- - -Revert the twelve vec-of-children attribute flips introduced in rc.5. In v1 these arrays stay required, matching their pre-rc.5 shape: - -- `programNode.accounts`, `instructions`, `definedTypes`, `pdas`, `events`, `errors`, `constants` -- `rootNode.additionalPrograms` -- `instructionNode.accounts`, `arguments` -- `pdaNode.seeds` -- `pdaValueNode.seeds` - -The optional encoding is deferred to a future spec major. Keeping these arrays required in v1 means existing codegen targets (JS, Rust) don't have to special-case the "empty array vs. absent" distinction mid-cycle, and consumers of the published types don't need to migrate every iteration over `program.instructions`, `instruction.accounts`, etc. to defensive `?? []`. The camelCase rename and the new `{ kind: 'address' }` `TypeExpr` from rc.5 are preserved. - -Attributes whose emptiness already encodes structural meaning (`structTypeNode.fields`, `tupleTypeNode.items`, `enumTypeNode.variants`, value-side equivalents, `hiddenPrefixTypeNode.prefix`, `hiddenSuffixTypeNode.suffix`) were never touched by rc.5 and remain required. diff --git a/.changeset/keen-zebras-melt.md b/.changeset/keen-zebras-melt.md index 4ecd82b..d7eb3b2 100644 --- a/.changeset/keen-zebras-melt.md +++ b/.changeset/keen-zebras-melt.md @@ -2,10 +2,8 @@ '@codama/spec': minor --- -Three spec changes that adjust the encoded shape: +Two spec changes that adjust the encoded shape: - **Identifier casing.** All spec identifiers are now camelCase. Enumerations, unions, and nested-union aliases that were PascalCase (`TypeNode`, `BytesEncoding`, `NestedTypeNode`, …) are renamed to camelCase (`typeNode`, `bytesEncoding`, `nestedTypeNode`, …). `validate.ts` now enforces camelCase on unions, enumerations, and nested unions alongside the existing node-kind check. - **New `address` type-expression kind.** A new primitive `{ kind: 'address' }` (plus an `address()` factory) replaces `string()` on attributes that hold a Solana address. Applied to `programNode.publicKey`, `publicKeyValueNode.publicKey`, and `pdaNode.programId`. Attribute names and node kinds are unchanged; only the type expression changes. Codegen targets can now render these as a dedicated address type (e.g. `Address` in Rust) rather than collapsing to a generic string. - -- **Empty arrays omitted from the wire (where semantically equivalent to absent).** Array-of-child attributes flip to optional on nodes where an empty array carries no meaning beyond "no children of this kind": `programNode`'s seven child arrays (`accounts`, `instructions`, `definedTypes`, `pdas`, `events`, `errors`, `constants`), `rootNode.additionalPrograms`, `instructionNode.accounts` and `arguments`, `pdaNode.seeds`, and `pdaValueNode.seeds`. Attributes whose emptiness encodes structural meaning (`structTypeNode.fields`, `tupleTypeNode.items`, `enumTypeNode.variants`, value-side equivalents, `hiddenPrefixTypeNode.prefix`, `hiddenSuffixTypeNode.suffix`) remain required. diff --git a/.changeset/pre.json b/.changeset/pre.json index 3844394..e0ff293 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -1,5 +1,5 @@ { - "mode": "pre", + "mode": "exit", "tag": "rc", "initialVersions": { "@codama/spec": "1.6.0-rc.0" diff --git a/.changeset/release-1-6-0.md b/.changeset/release-1-6-0.md new file mode 100644 index 0000000..35892e7 --- /dev/null +++ b/.changeset/release-1-6-0.md @@ -0,0 +1,5 @@ +--- +'@codama/spec': minor +--- + +First stable release of `@codama/spec`. The v1 spec shape settled across the `1.6.0-rc.*` line is now published as `1.6.0`. Reference implementations in [TypeScript](https://github.com/codama-idl/codama) and [Rust](https://github.com/codama-idl/codama-rs) consume this package to render their own node types, factories, visitors, and validators from a single source of truth. Future Codama majors will land alongside the `v1` entrypoint as `v2`, `v3`, …, with the default `@codama/spec` entrypoint tracking the latest stable. diff --git a/.changeset/verify-trusted-publishing.md b/.changeset/verify-trusted-publishing.md deleted file mode 100644 index 7623345..0000000 --- a/.changeset/verify-trusted-publishing.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@codama/spec': patch ---- - -Verify the end-to-end changeset → OIDC trusted publishing flow by cutting `1.6.0-rc.1`. No code changes; this release only exists to confirm that `changesets/action` can publish via npm trusted publishing without a long-lived `NPM_TOKEN` in CI.