Skip to content

[2.x] Release package (rc) - #183

Merged
lorisleiva merged 1 commit into
mainfrom
changeset-release/main
Oct 1, 2026
Merged

lorisleiva merged 1 commit into
mainfrom
changeset-release/main

Conversation

@codama-releases

@codama-releases codama-releases Bot commented Sep 30, 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.

⚠️⚠️⚠️⚠️⚠️⚠️

main is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, run changeset pre exit on main.

⚠️⚠️⚠️⚠️⚠️⚠️

Releases

@codama/spec@2.0.0-rc.1

Major Changes

  • #184 03df7f5 Thanks @lorisleiva! - Allow any value node as the payload of enumValueNode. Enum variants may carry data of any type, e.g. enumVariantTypeNode('amount', { data: integerTypeNode('u64') }), but enumValueNode.value only accepted struct or tuple values, so such variants could not be expressed as values. enumValueNode.value now accepts any valueNode, which must match the variant's data type.

    enumValueNode('operation', 'amount', integerValueNode('42'));

    BREAKING CHANGES

    enumValuePayload union removed. It was only used by enumValueNode.value, which now references the valueNode union. Codegen targets and other spec consumers referencing enumValuePayload should use valueNode instead. Existing IDLs remain valid.

Minor Changes

  • #175 3f49f9b Thanks @lorisleiva! - Relax identifier uniqueness: identifiers sharing a scope must no longer be unique after lowercasing and stripping underscores, but must not have the same camelCase form. Words are split at underscores, at lowercase-to-uppercase boundaries and before the last capital of an acronym run, so foo_dart and food_art or group__sub_group__name and group_subgroup_name may now coexist, whilst fooBar and foo_bar, getURL and get_url, or _foo and foo still may not. Every IDL valid under the previous rule remains valid. Renderers must derive every casing from these words, keep a word separator wherever letter case is not significant (e.g. file names), and disambiguate identifiers of different scopes emitted into a shared namespace.

  • #185 99812c5 Thanks @lorisleiva! - Add an optional returnData type node to instructionNode, describing the data an instruction returns to its caller via set_return_data — e.g. what Anchor IDLs expose as returns. Like data, it accepts any type node, including a definedTypeLinkNode. The on-chain limit on return data is left to validators.

    instructionNode({ identifier: 'getPrice', returnData: integerTypeNode('u64') });

Patch Changes

  • #186 72f2fb9 Thanks @lorisleiva! - Reserve the codama.* plugin namespace for official plugins, and define the first two for information that is renderer-specific by nature. codama.resolver marks a node whose value renderers resolve with custom code, with a { name, dependsOn? } payload where dependencies are accounts.<identifier> or data.<path> strings. codama.extraArgument declares, on an instruction node, a client input that is not serialised in the instruction data, with an { identifier, type, defaultValue?, docs? } payload. The remaining accounts example now uses codama.resolver instead of the unofficial codama.jsResolver.

    instructionAccountNode({
        identifier: 'destination',
        isWritable: true,
        isSigner: false,
        plugins: [pluginNode('codama.resolver', { payload: { name: 'resolveDestination', dependsOn: ['accounts.owner'] } })],
    });

@codama-releases
codama-releases Bot force-pushed the changeset-release/main branch 2 times, most recently from 2d4605d to 9161d23 Compare October 1, 2026 07:58
@codama-releases
codama-releases Bot force-pushed the changeset-release/main branch from 9161d23 to 0ed4b91 Compare October 1, 2026 07:59
@lorisleiva
lorisleiva merged commit 8188811 into main Oct 1, 2026
3 checks passed
@lorisleiva
lorisleiva deleted the changeset-release/main branch October 1, 2026 08:12
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.

1 participant