Skip to content

[1.x] Publish packages#1006

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main
Open

[1.x] Publish packages#1006
github-actions[bot] wants to merge 1 commit into
mainfrom
changeset-release/main

Conversation

@github-actions

@github-actions github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

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.

Releases

@codama/node-types@1.8.0

Minor Changes

  • #995 2f7c443 Thanks @lorisleiva! - Regenerate the entire @codama/node-types source surface from the encoded @codama/spec description, via the new private @codama-internal/spec-generators package.

    The bulk of the surface lives under src/generated/ and is produced by the gen-ts-node-types generator from the spec. The previously hand-maintained interfaces are gone; every node, union, enumeration, and per-spec shared type is rebuilt from the spec on every pnpm generate run.

    A small set of static helpers — the brand types, the Docs alias, and the Version template-literal type — live as hand-written sibling files at the top of packages/node-types/src/, alongside the existing ProgramVersion deprecated alias. They are imported by the generated surface but never regenerated, since their content doesn't depend on the spec. The generator wipes only src/generated/ on every run; hand-written content at the top level survives. The per-spec CodamaVersion literal stays generated, in its own src/generated/shared/codamaVersion.ts file pinned to the spec version at generation time.

    Most of the rebuild is structural: imports now point at per-file paths (./linkNodes/PdaLinkNode) instead of subdirectory barrels, every interface and field carries a JSDoc block sourced from the spec, and array fields are emitted as Array<T> rather than T[] so an inline-union element type doesn't need extra parentheses to preserve precedence. A handful of named API differences also shake out from this:

    • accountNode.size is now typed as number | undefined (the previous | null arm had no consumer and is dropped).
    • programNode.origin is now typed as the named ProgramOrigin union ('anchor' | 'shank') instead of an inline literal union.
    • instructionAccountNode.isSigner and instructionRemainingAccountsNode.isSigner now read boolean | 'either' instead of true | false | 'either' (a TypeScript-only readability normalisation; the encoded spec keeps the explicit true | false form so other codegen targets can still emit a multi-variant enum).
    • numberTypeNode.format and stringTypeNode.encoding are emitted as named NumberFormat / BytesEncoding aliases imported from ./shared/, with the same generic-narrowing behaviour preserved.
    • programNode.version is now typed as the unified Version template-literal alias (`${number}.${number}.${number}`) — a tighter shape than the previous plain string, so non-conforming literal strings will now surface as TypeScript errors at the call site. The historical ProgramVersion name is preserved as a hand-written @deprecated re-export so existing consumers continue to compile; @codama/nodes-from-anchor is updated to import Version directly.
    • docs? fields use a Docs = Array<string> alias mirroring the 'docs' TypeExpr kind in @codama/spec. The alias is hand-written and lives at packages/node-types/src/Docs.ts.
    • Documentation strings that ship as multiple paragraphs in the spec now render as multi-paragraph JSDoc blocks. Affected fields and types include accountNode.discriminators, instructionNode.discriminators, instructionAccountNode.isSigner, instructionRemainingAccountsNode.isSigner, rootNode, the ConditionalValueNode interface and its condition, InstructionInputValueNode, ResolverValueNode, AmountTypeNode and its unit, MapTypeNode.size, NestedTypeNode, StringTypeNode.size, EnumValueNode.value, and NumberValueNode.number.

    Alongside the per-node interfaces, the package now exports seven Registered<Category>Node category-registry unions (RegisteredContextualValueNode, RegisteredCountNode, RegisteredDiscriminatorNode, RegisteredLinkNode, RegisteredPdaSeedNode, RegisteredTypeNode, RegisteredValueNode) corresponding one-to-one with @codama/spec's category registries, plus a GetNodeFromKind<TKind extends NodeKind> helper that resolves to the concrete interface for a given kind. The registry unions are the recommended extension point for downstream packages that need to introduce custom node kinds.

    The generator consumes @codama/spec@1.6.0-rc.4, which reshapes the spec into per-category groups (spec.categories[]) and renames the nestedTypeNode TypeExpr kind to nestedUnion (with an explicit alias field). All docs? fields throughout the spec are arrays of paragraph strings rather than single newline-separated strings — the renderer accepts the array shape directly. Internally, the generator's renderers are layout-agnostic: they emit use(...) calls keyed by symbolic module strings (e.g. 'node:numberTypeNode', 'enumeration:Endianness', 'brand:CamelCaseString'), and a single per-spec RenderScope resolves those symbolic keys to concrete file locations at write time. Adding a new file kind to the generator means extending the RenderScope symbol map; renderers themselves stay free of file-layout knowledge.

Patch Changes

  • #1001 8667174 Thanks @lorisleiva! - Bump @codama/spec from 1.6.0-rc.4 to 1.6.0-rc.6. The encoded surface in @codama/node-types is functionally unchanged; one docstring paragraph on NestedTypeNode now reads nestedTypeNode<T> instead of NestedTypeNode<T> to mirror the spec's new camelCase nested-union alias name.

    Behind the scenes, @codama-internal/spec-generators learns about the new { kind: 'address' } TypeExpr (rendered as plain string on the v1 TS surface — a dedicated Address brand may follow in a future spec major), the camelCase rename of every union and enumeration name on the spec side (the generated PascalCase TS identifiers are unaffected since the generator runs each name through pascalCase() at render time), and a constructor-signature bug where an attribute that was both optional and supplied with a default would emit invalid TS (param?: T = default). The bug never triggered against the rc.4 v1 spec but would have surfaced once any future attribute combined optional: true with a configured default; the fix is to omit the ? mark whenever an initializer is present.

@codama/nodes@1.8.0

Minor Changes

  • #997 0b3a781 Thanks @lorisleiva! - Regenerate the xxxNodeInput types and xxxNode() constructors of @codama/nodes from the encoded @codama/spec description, via a new nodes generator inside @codama-internal/spec-generators. The runtime *_NODE_KINDS arrays (STANDALONE_TYPE_NODE_KINDS, REGISTERED_VALUE_NODE_KINDS, INSTRUCTION_INPUT_VALUE_NODE_KINDS, …, and the top-level REGISTERED_NODE_KINDS) are now generated from the spec's union definitions instead of being maintained by hand. A new top-level CODAMA_VERSION constant, typed as CodamaVersion and pinned to the spec version at generation time, is the single source of truth for the version @codama/nodes was built against — rootNode() reads it directly when tagging the document.

    The bulk of the surface lives under packages/nodes/src/generated/ and is produced on every pnpm generate run. The previously hand-maintained constructors and kinds-arrays are gone; only hand-written helpers (isNode, assertIsNode, getAllPrograms, getAllInstructions, getAllInstructionsWithSubs, isScalarEnum, isDataEnum, isSignedInteger, the NestedTypeNode resolvers, parseOptionalAccountStrategy, the legacy constantValueNodeFromString / constantPdaSeedNodeFromString flavours, etc.) survive at the top of packages/nodes/src/. The package's index.ts re-exports the generated tree alongside them.

    Two intentional behaviour changes shake out of the rebuild:

    • docs is now omitted entirely from the encoded shape when it would be empty. Constructors that accept a docs?: DocsInput parameter previously emitted docs: [] on the frozen node when the caller said nothing about docs; they now drop the docs key altogether. This matches the Rust side, keeps absent documentation out of serialised IDLs, and aligns with the docs?: Docs optional field already declared by @codama/node-types. removeDocsVisitor in @codama/visitors-core is updated to delete the docs key rather than blank it to [], following the same convention.
    • rootNode().version now reflects the spec version @codama/nodes was generated against, not the runtime package version. The constructor previously read the __VERSION__ build-time global injected from the package's npm_package_version; it now reads the generated CODAMA_VERSION constant. In practice the two have always tracked the same release cadence so the change is invisible at HEAD, but it makes the architectural intent explicit: the version pinned in the IDL is the spec version, not the package version. The __VERSION__ build-time global and its packages/nodes/src/types/global.d.ts declaration are removed accordingly.

    The legacy plural-noun constants (TYPE_NODES, VALUE_NODES, CONTEXTUAL_VALUE_NODES, INSTRUCTION_INPUT_VALUE_NODES, COUNT_NODES, DISCRIMINATOR_NODES, LINK_NODES, PDA_SEED_NODES, ENUM_VARIANT_TYPE_NODES) are preserved as alias re-exports of the new canonical *_NODE_KINDS names.

    The generator drives almost entirely from the spec, with a minimal per-node configuration table carrying only the conveniences the spec can't express: which spec attributes appear as bare positional parameters (the rest land in a trailing options bag), and per-attribute overrides for defaulted values, string-coercion patterns on link targets, and the handful of bespoke body expressions (instructionByteDeltaNode.withHeader). The renderer derives signature shapes, generic parameters, return types, the XxxNodeInput declarations, the Partial<> wrapping decision, the name: string relaxation, the docs?: DocsInput / drop-if-empty handling, and the conditional-spread of optional attributes from the spec directly. An auto-import scan walks each rendered file and pulls in any spec or hand-written identifier the source references, so the configuration never declares imports. Generic-parameter lifting and ordering rely on the same narrowableDataAttributes + genericParamOrder tables the nodeTypes generator uses, keeping the constructor's generics in lockstep with the interface's.

Patch Changes

  • Updated dependencies [2f7c443, 8667174]:
    • @codama/node-types@1.8.0
    • @codama/errors@1.8.0

@codama/visitors-core@1.8.0

Minor Changes

  • #1000 b1f6a75 Thanks @lorisleiva! - Regenerate identityVisitor and mergeVisitor from @codama/spec via the new visitorsCore generator in @codama-internal/spec-generators. Both visitors previously lived as ~1100 lines of hand-written per-node dispatch; the mechanical walk now lives under src/generated/. src/identityVisitor.ts is now a thin wrapper layering six semantic overrides (enum-variant empty-downgrade, hidden-prefix/suffix empty-bypass, conditional-value null-collapse, resolver empty-dependsOn collapse) via extendVisitor; src/mergeVisitor.ts ships directly from the generated tree.

    Three behaviour changes shake out:

    • enumTypeNode.size and pdaValueNode.programId are now actually walked by identityVisitor. The hand-written code passed both through unchanged, silently dropping any caller-applied transforms.
    • Every required-array child attribute now uniformly tolerates undefined at runtime. The hand-written guard previously applied only to programNode.events and programNode.constants. Making it uniform lets identityVisitor safely normalise a partial IDL JSON parsed via createFromJson. A follow-up PR will promote the affected programNode children to optionalAttribute(...) on the spec side, after which the guard becomes naturally derivable from the spec.
    • enumStructVariantTypeNode.discriminator and enumTupleVariantTypeNode.discriminator are now preserved when the variant survives the wrapper's empty-downgrade.

Patch Changes

  • #997 0b3a781 Thanks @lorisleiva! - Regenerate the xxxNodeInput types and xxxNode() constructors of @codama/nodes from the encoded @codama/spec description, via a new nodes generator inside @codama-internal/spec-generators. The runtime *_NODE_KINDS arrays (STANDALONE_TYPE_NODE_KINDS, REGISTERED_VALUE_NODE_KINDS, INSTRUCTION_INPUT_VALUE_NODE_KINDS, …, and the top-level REGISTERED_NODE_KINDS) are now generated from the spec's union definitions instead of being maintained by hand. A new top-level CODAMA_VERSION constant, typed as CodamaVersion and pinned to the spec version at generation time, is the single source of truth for the version @codama/nodes was built against — rootNode() reads it directly when tagging the document.

    The bulk of the surface lives under packages/nodes/src/generated/ and is produced on every pnpm generate run. The previously hand-maintained constructors and kinds-arrays are gone; only hand-written helpers (isNode, assertIsNode, getAllPrograms, getAllInstructions, getAllInstructionsWithSubs, isScalarEnum, isDataEnum, isSignedInteger, the NestedTypeNode resolvers, parseOptionalAccountStrategy, the legacy constantValueNodeFromString / constantPdaSeedNodeFromString flavours, etc.) survive at the top of packages/nodes/src/. The package's index.ts re-exports the generated tree alongside them.

    Two intentional behaviour changes shake out of the rebuild:

    • docs is now omitted entirely from the encoded shape when it would be empty. Constructors that accept a docs?: DocsInput parameter previously emitted docs: [] on the frozen node when the caller said nothing about docs; they now drop the docs key altogether. This matches the Rust side, keeps absent documentation out of serialised IDLs, and aligns with the docs?: Docs optional field already declared by @codama/node-types. removeDocsVisitor in @codama/visitors-core is updated to delete the docs key rather than blank it to [], following the same convention.
    • rootNode().version now reflects the spec version @codama/nodes was generated against, not the runtime package version. The constructor previously read the __VERSION__ build-time global injected from the package's npm_package_version; it now reads the generated CODAMA_VERSION constant. In practice the two have always tracked the same release cadence so the change is invisible at HEAD, but it makes the architectural intent explicit: the version pinned in the IDL is the spec version, not the package version. The __VERSION__ build-time global and its packages/nodes/src/types/global.d.ts declaration are removed accordingly.

    The legacy plural-noun constants (TYPE_NODES, VALUE_NODES, CONTEXTUAL_VALUE_NODES, INSTRUCTION_INPUT_VALUE_NODES, COUNT_NODES, DISCRIMINATOR_NODES, LINK_NODES, PDA_SEED_NODES, ENUM_VARIANT_TYPE_NODES) are preserved as alias re-exports of the new canonical *_NODE_KINDS names.

    The generator drives almost entirely from the spec, with a minimal per-node configuration table carrying only the conveniences the spec can't express: which spec attributes appear as bare positional parameters (the rest land in a trailing options bag), and per-attribute overrides for defaulted values, string-coercion patterns on link targets, and the handful of bespoke body expressions (instructionByteDeltaNode.withHeader). The renderer derives signature shapes, generic parameters, return types, the XxxNodeInput declarations, the Partial<> wrapping decision, the name: string relaxation, the docs?: DocsInput / drop-if-empty handling, and the conditional-spread of optional attributes from the spec directly. An auto-import scan walks each rendered file and pulls in any spec or hand-written identifier the source references, so the configuration never declares imports. Generic-parameter lifting and ordering rely on the same narrowableDataAttributes + genericParamOrder tables the nodeTypes generator uses, keeping the constructor's generics in lockstep with the interface's.

  • Updated dependencies [0b3a781]:

    • @codama/nodes@1.8.0
    • @codama/errors@1.8.0

@codama/cli@1.5.3

Patch Changes

  • Updated dependencies [0b3a781, b1f6a75]:
    • @codama/nodes@1.8.0
    • @codama/visitors-core@1.8.0
    • @codama/visitors@1.8.0

@codama/dynamic-address-resolution@0.2.1

Patch Changes

  • Updated dependencies []:
    • @codama/errors@1.8.0
    • @codama/dynamic-codecs@1.2.2
    • codama@1.8.0

@codama/dynamic-client@0.1.2

Patch Changes

  • Updated dependencies []:
    • @codama/errors@1.8.0
    • @codama/dynamic-codecs@1.2.2
    • codama@1.8.0
    • @codama/dynamic-address-resolution@0.2.1
    • @codama/dynamic-instructions@0.2.1

@codama/dynamic-codecs@1.2.2

Patch Changes

  • Updated dependencies [0b3a781, b1f6a75]:
    • @codama/nodes@1.8.0
    • @codama/visitors-core@1.8.0
    • @codama/errors@1.8.0

@codama/dynamic-instructions@0.2.1

Patch Changes

  • Updated dependencies []:
    • @codama/errors@1.8.0
    • @codama/dynamic-codecs@1.2.2
    • codama@1.8.0
    • @codama/dynamic-address-resolution@0.2.1

@codama/dynamic-parsers@1.2.2

Patch Changes

  • Updated dependencies [0b3a781, b1f6a75]:
    • @codama/nodes@1.8.0
    • @codama/visitors-core@1.8.0
    • @codama/errors@1.8.0
    • @codama/dynamic-codecs@1.2.2

@codama/errors@1.8.0

Patch Changes

@codama/fragments@0.1.1

Patch Changes

  • Updated dependencies []:
    • @codama/errors@1.8.0

codama@1.8.0

Patch Changes

  • Updated dependencies [0b3a781]:
    • @codama/nodes@1.8.0
    • @codama/errors@1.8.0
    • @codama/cli@1.5.3
    • @codama/validators@1.8.0
    • @codama/visitors@1.8.0

@codama/nodes-from-anchor@1.5.1

Patch Changes

  • #995 2f7c443 Thanks @lorisleiva! - Regenerate the entire @codama/node-types source surface from the encoded @codama/spec description, via the new private @codama-internal/spec-generators package.

    The bulk of the surface lives under src/generated/ and is produced by the gen-ts-node-types generator from the spec. The previously hand-maintained interfaces are gone; every node, union, enumeration, and per-spec shared type is rebuilt from the spec on every pnpm generate run.

    A small set of static helpers — the brand types, the Docs alias, and the Version template-literal type — live as hand-written sibling files at the top of packages/node-types/src/, alongside the existing ProgramVersion deprecated alias. They are imported by the generated surface but never regenerated, since their content doesn't depend on the spec. The generator wipes only src/generated/ on every run; hand-written content at the top level survives. The per-spec CodamaVersion literal stays generated, in its own src/generated/shared/codamaVersion.ts file pinned to the spec version at generation time.

    Most of the rebuild is structural: imports now point at per-file paths (./linkNodes/PdaLinkNode) instead of subdirectory barrels, every interface and field carries a JSDoc block sourced from the spec, and array fields are emitted as Array<T> rather than T[] so an inline-union element type doesn't need extra parentheses to preserve precedence. A handful of named API differences also shake out from this:

    • accountNode.size is now typed as number | undefined (the previous | null arm had no consumer and is dropped).
    • programNode.origin is now typed as the named ProgramOrigin union ('anchor' | 'shank') instead of an inline literal union.
    • instructionAccountNode.isSigner and instructionRemainingAccountsNode.isSigner now read boolean | 'either' instead of true | false | 'either' (a TypeScript-only readability normalisation; the encoded spec keeps the explicit true | false form so other codegen targets can still emit a multi-variant enum).
    • numberTypeNode.format and stringTypeNode.encoding are emitted as named NumberFormat / BytesEncoding aliases imported from ./shared/, with the same generic-narrowing behaviour preserved.
    • programNode.version is now typed as the unified Version template-literal alias (`${number}.${number}.${number}`) — a tighter shape than the previous plain string, so non-conforming literal strings will now surface as TypeScript errors at the call site. The historical ProgramVersion name is preserved as a hand-written @deprecated re-export so existing consumers continue to compile; @codama/nodes-from-anchor is updated to import Version directly.
    • docs? fields use a Docs = Array<string> alias mirroring the 'docs' TypeExpr kind in @codama/spec. The alias is hand-written and lives at packages/node-types/src/Docs.ts.
    • Documentation strings that ship as multiple paragraphs in the spec now render as multi-paragraph JSDoc blocks. Affected fields and types include accountNode.discriminators, instructionNode.discriminators, instructionAccountNode.isSigner, instructionRemainingAccountsNode.isSigner, rootNode, the ConditionalValueNode interface and its condition, InstructionInputValueNode, ResolverValueNode, AmountTypeNode and its unit, MapTypeNode.size, NestedTypeNode, StringTypeNode.size, EnumValueNode.value, and NumberValueNode.number.

    Alongside the per-node interfaces, the package now exports seven Registered<Category>Node category-registry unions (RegisteredContextualValueNode, RegisteredCountNode, RegisteredDiscriminatorNode, RegisteredLinkNode, RegisteredPdaSeedNode, RegisteredTypeNode, RegisteredValueNode) corresponding one-to-one with @codama/spec's category registries, plus a GetNodeFromKind<TKind extends NodeKind> helper that resolves to the concrete interface for a given kind. The registry unions are the recommended extension point for downstream packages that need to introduce custom node kinds.

    The generator consumes @codama/spec@1.6.0-rc.4, which reshapes the spec into per-category groups (spec.categories[]) and renames the nestedTypeNode TypeExpr kind to nestedUnion (with an explicit alias field). All docs? fields throughout the spec are arrays of paragraph strings rather than single newline-separated strings — the renderer accepts the array shape directly. Internally, the generator's renderers are layout-agnostic: they emit use(...) calls keyed by symbolic module strings (e.g. 'node:numberTypeNode', 'enumeration:Endianness', 'brand:CamelCaseString'), and a single per-spec RenderScope resolves those symbolic keys to concrete file locations at write time. Adding a new file kind to the generator means extending the RenderScope symbol map; renderers themselves stay free of file-layout knowledge.

  • Updated dependencies [0b3a781]:

    • @codama/nodes@1.8.0
    • @codama/errors@1.8.0
    • @codama/visitors@1.8.0

@codama/renderers-core@1.3.9

Patch Changes

  • Updated dependencies [0b3a781, b1f6a75]:
    • @codama/nodes@1.8.0
    • @codama/visitors-core@1.8.0
    • @codama/errors@1.8.0
    • @codama/fragments@0.1.1

@codama/validators@1.8.0

Patch Changes

  • Updated dependencies [0b3a781, b1f6a75]:
    • @codama/nodes@1.8.0
    • @codama/visitors-core@1.8.0
    • @codama/errors@1.8.0

@codama/visitors@1.8.0

Patch Changes

  • Updated dependencies [0b3a781, b1f6a75]:
    • @codama/nodes@1.8.0
    • @codama/visitors-core@1.8.0
    • @codama/errors@1.8.0

@github-actions github-actions Bot force-pushed the changeset-release/main branch 3 times, most recently from 7b45cbe to 47d52ab Compare June 11, 2026 11:55
@github-actions github-actions Bot force-pushed the changeset-release/main branch from 47d52ab to d205e91 Compare June 11, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants