Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[syntax] Refactor YAML editing functionality #411

Merged
merged 1 commit into from
Oct 29, 2024
Merged

Conversation

pgavlin
Copy link
Member

@pgavlin pgavlin commented Oct 28, 2024

Replace the CLI's yamlNode type and methods with equivalents on syntax.YAMLNode.

This is a bit duplicative of functionality already in the syntax package, which allows consumers to edit syntax trees without knowledge of the concrete syntax. However, this is the lowest-lift option for refactoring this functionality with high confidence in the results. We should replace the YAMLNode methods with higher-level methods that are concrete-syntax-agnostic in the future.

Replace the CLI's `yamlNode` type and methods with equivalents on
`syntax.YAMLNode`.

This is a bit duplicative of functionality already in the syntax
package, which allows consumers to edit syntax trees without knowledge
of the concrete syntax. However, this is the lowest-lift option for
refactoring this functionality with high confidence in the results. We
should replace the `YAMLNode` methods with higher-level methods that
are concrete-syntax-agnostic in the future.
@pgavlin pgavlin added the impact/no-changelog-required This issue doesn't require a CHANGELOG update label Oct 28, 2024
@pgavlin pgavlin requested review from seanyeh and dschaller October 28, 2024 23:33
Copy link
Contributor

@seanyeh seanyeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

@pgavlin pgavlin merged commit 2fb9408 into main Oct 29, 2024
6 checks passed
@pgavlin pgavlin deleted the pgavlin/yaml-edit branch October 29, 2024 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/no-changelog-required This issue doesn't require a CHANGELOG update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants