Repository navigation
chore!: migrate from gopkg.in/yaml.v3 to go.yaml.in/yaml/v3 - #26
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Why
gopkg.in/yaml.v3is archived, andspeakeasy-api/openapiis moving to the maintainedgo.yaml.in/yaml/v3(speakeasy-api/openapi#269). The two packages'yaml.Nodetypes are unrelated as far as Go is concerned, so as long as jsonpath takes the old node type, openapi has to cast between them withunsafeevery time it runs a query. Moving jsonpath over removes the need for that.This replaces #20, which has been stale since July 2025 and now conflicts with
main.What changed
gopkg.in/yaml.v3import forgo.yaml.in/yaml/v3(v3.0.5). The API is the same, so no logic changed.cmd/wasm) at the openapi commit from #269 that's built on the new package. Without that, the playground wouldn't compile, because openapi's overlay package would still be passing old nodes.Review notes
JSONPath.Queryand friends now take and return*go.yaml.in/yaml/v3.Node. This needs a minor bump, v0.7.0.godirective from 1.24.3 to 1.26.0, so consumers need a Go 1.26 toolchain. That matches what speakeasy-api/openapi already requires.go vetreports "unreachable code" inparser.goandselector.go, but those warnings are onmaintoo.Testing
go build ./...andgo test ./...pass.GOOS=js GOARCH=wasm go build ./cmd/wasmpasses.