[2.x] Release package (rc) - #110
Open
codama-releases[bot] wants to merge 1 commit into
Open
Conversation
codama-releases
Bot
force-pushed
the
changeset-release/main
branch
5 times, most recently
from
August 28, 2026 14:51
fb001f5 to
9db1f6f
Compare
codama-releases
Bot
force-pushed
the
changeset-release/main
branch
5 times, most recently
from
September 1, 2026 08:21
2506bdb to
69c81ec
Compare
codama-releases
Bot
force-pushed
the
changeset-release/main
branch
from
September 1, 2026 09:07
69c81ec to
e936582
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
mainis currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonmain.Releases
@codama/spec@2.0.0-rc.0
Major Changes
#137
dbeced1Thanks @lorisleiva! - Allow any type node as account data.accountNode.datanow accepts every member of thetypeNodeunion — links included — aligning it witheventNode.data, so accounts can be non-structs or reuse a shared defined type viadefinedTypeLinkNode.BREAKING CHANGES
accountNode.datawidens fromstructTypeNodetotypeNode. Consumers can no longer assume account data is a struct; nodes that reference account fields by name (accountFieldValueNode,fieldDiscriminatorNode, PDA seed defaults) are only valid when the data type resolves to a struct, following links — a constraint enforced by validators rather than by the spec shape.accountNode({ name: 'mint', - data: structTypeNode([/* fields copied from the shared type */]), + data: definedTypeLinkNode('mintState'), });#136
e6f9c63Thanks @lorisleiva! - Replace the nested type wrappers with a flattransformsarray. The seven wrapper type nodes (fixedSizeTypeNode,sizePrefixTypeNode,preOffsetTypeNode,postOffsetTypeNode,sentinelTypeNode,hiddenPrefixTypeNode,hiddenSuffixTypeNode) and thenestedTypeNoderecursive alias are removed. Instead, a newtransformcategory defines one transform node per former wrapper (same attributes minus the inner type), and every member of thetypeNodeunion — links included — carries an optionaltransformsarray, applied in order with the first transform innermost. A type'skindis now stable whether or not it is modified, and attributes that pinned a wrapped inner kind (accountNode.data, enum variant payloads, numeric prefixes) become plain node references.#138
996c20aThanks @lorisleiva! - Unify enum variants into a singleenumVariantTypeNodewith an optionaldatapayload. The node also gains an optionaldocsattribute, closing the gap where enum variants could not carry documentation.BREAKING CHANGES
enumEmptyVariantTypeNode,enumStructVariantTypeNodeandenumTupleVariantTypeNodeare replaced byenumVariantTypeNode. Absentdatais a unit variant; a struct payload gives named fields, a tuple payload gives positional fields, and any other type node is carried as-is. Thename, optionaldiscriminatorand optionaldisplayattributes carry over unchanged; the formerstruct/tupleattributes both becomedata. When upgrading, a v1 tuple variant holding exactly one item should unwrap to that single type — the 1-tuple was the workaround spelling of a single-type payload — unless the item is astructTypeNode,tupleTypeNodeordefinedTypeLinkNode: those shapes determine the variant flavour indataposition, so unwrapping them would change the generated API (e.g.V(InlineStruct)becomingV { … }) even though the wire format is identical. Renderers whose target requires a wrapper (e.g. Rust) re-wrap single-type payloads on their side.The
enumVariantTypeNodeunion no longer exists. The name now identifies the node itself;enumTypeNode.variantsis an array of that node, and theregisteredTypeNodeunion references it directly.#139
ab4e253Thanks @lorisleiva! - Remove theoriginattribute fromprogramNodeand theprogramOriginenumeration. The attribute recorded which toolchain generated the description from a closed whitelist (anchor/shank) that cannot keep up with an open ecosystem, described provenance rather than the program itself, and went stale as IDLs were edited after generation.BREAKING CHANGES
programNode.originand theprogramOriginenumeration are removed. Tools that need provenance metadata can attach it via the universalpluginslist instead.programNode({ name: 'myProgram', - origin: 'anchor', + plugins: [pluginNode('anchor')], // ... });#134
f14dd93Thanks @lorisleiva! - Restructure the package for the one-major-per-line release model: the root entrypoint now hosts the current major's spec surface fromsrc/spec/(formerlysrc/v1/), the./v1subpath export is removed (the v1 spec remains available as@codama/spec@^1from the1.xline), and the generated artifacts move fromv1/to the repository root (spec.json,schema.json,docs/). The generated docs landing page now links to the docs of previous majors on their maintenance branches.#135
f9cfe95Thanks @lorisleiva! - Give every node apluginslist via a new base-attribute mechanism. The meta-model'sSpectype gains an optionalbaseblock (authored with the newdefineBasehelper) declaring attributes shared by every node; codegen targets append them after each node's declared attributes, so they always serialise last. The spec declares one base attribute —plugins, an optional array ofpluginNode— making every node extensible with namespaced, consumer-defined data.instructionNodeno longer declarespluginslocally (the universal base attribute replaces it), andvalidaterejects base attributes that collide with declared attributes or carry unresolved references.#105
ca0e36eThanks @lorisleiva! - Start Codama IDL v2. This is the beginning of the v2 line of the Codama standard; release candidates publish under thercdist-tag while the spec evolves.