Regenerate the node types from the v2 spec - #1158
Draft
lorisleiva wants to merge 1 commit into
Draft
lorisleiva wants to merge 1 commit into
lorisleiva wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: e9dfcfa The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
lorisleiva
force-pushed
the
09-17-regenerate_the_node_types_from_the_v2_spec
branch
from
September 17, 2026 22:03
7cfb417 to
e9dfcfa
Compare
This was referenced Sep 18, 2026
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 repoints
@codama-internal/spec-generatorsat@codama/spec@2.0.0-rc.0and regenerates@codama/node-types,@codama/nodesand@codama/visitors-coreagainst the v2 spec. It is the base of the codama v2 adaptation stack; hand-written package adaptation to the v2 shapes follows in stacked PRs on top, so downstream packages remain red until the stack is green.Generator changes
@codama/spec-v1alias and the frozen v1 generation step. The v1 node types in@codama/upgradeare now a frozen static snapshot (packages/upgrade/src/v1/README.md); the generator only renders the spec on its own branch, and prior majors are ported forward by patch.spec.base(the universalplugins) to every node, sopluginsis aTPluginstype parameter on every interface and constructor and is visited by the identity/merge visitors.textNodegainspluginstoo.docs===text. Both render asstring | TextNodeand are visited (guarding the string-or-textNodeduality). Deletes the v1Docsalias and theparseDocs/DocsInputarray layer.identifierStringrather than re-casing them, per v2 dropping the camelCase mandate.CODAMA_VERSIONnames the spec shape. Pre-release metadata is stripped (2.0.0-rc.0→2.0.0); theCodamaVersiontype stays strict.optionsbag (e.g.constantNode(identifier, type, value, { docs }));pluginNode(namespace, payload?, { plugins })keeps its payload positional.Verification
Generated output type-checks, lints and is idempotent; the frozen v1 snapshot is untouched. No changeset beyond the v2 major entry (this line rides the cut's pre-mode
rc).