-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
feat(schemas/browser)!: changes releases from object to array #26061
base: main
Are you sure you want to change the base?
Conversation
Ran `npx tsx scripts/migrations/013-releases-to-array.ts`
38ab64f
to
65aee0b
Compare
Honestly, I'd love to try and find an alternate solution if we can. I feel that since consumers can access the order through other means (either comparing version numbers or release dates, depending on their use of Node.js data), I'm cautiously skeptical about changing the data structure this much. |
@queengooborg In #21124, I put forward some alternatives, which have their own share of difficulties. It'd be helpful if you could read and respond to the inciting issue. @caugner one thing Philip raised as a possibility on the original issue is tests that assert that "dates are strictly increasing and that the order matches that which compare-versions produces." Would it be too much to ask to add these tests? I think both of these would be a good idea, to make explicit the assumptions that we've held historically and relied on to transform the objects to arrays. |
@ddbeck If I understand you correctly, then this assumption already doesn't hold for Node.js releases: We could enforce it for other browsers, though, if that's an acceptable compromise from your side? @Elchi3 What's your opinion here? |
I think that would be a good enforcement and if we need to exclude nodejs from that rule, that's okay, too. |
Summary
Breaking change: Changes the
browsers.*.releases
property from an object to an array, moving the version number inside theReleaseStatement
.Test results and supporting details
Related issues
Fixes #21124.