Repository navigation
fix: upgrade @asyncapi/modelina to 6.0.0-next.14 - #427
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Author
|
🎉 This PR is included in version 0.78.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What
Upgrades
@asyncapi/modelinafrom6.0.0-next.12to6.0.0-next.14and adapts the project (generated code + tests) to Modelina's reworked model-serialization surface.Why
Keep the generator current with Modelina.
next.14changed how generated TypeScript models serialize and deserialize, so the regenerated output and the tests asserting against it must be brought in line.Changes
@asyncapi/modelina^6.0.0-next.12→^6.0.0-next.14(package.json+package-lock.json, andtest/runtime/typescript/package-lock.json).marshal()now delegates to a newtoJson(): Record<string, unknown>+JSON.stringify()— marshalled output no longer has a space after each colon ({"a":"b"}instead of{"a": "b"}).fromJson();unmarshal()now delegates to it.additionalPropertieschanged from aMap(.set()/.get()/.entries()) to a plain object /Record(Object.entries,obj[key] = value).headers.spec.ts.snap,payload.spec.ts.snap) to the new output.test/client/nats.spec.ts,test/channels/regular/nats.spec.ts) — removed the now-absent space after the colon. All other protocol specs comparemarshal()tomarshal()(roundtrip, format-agnostic) and needed no changes.Testing
Verified locally across all three tiers (the pre-existing
FormatTimefailure below is unrelated to this upgrade):npm run build— clean (TypeScript compiles against next.14; oclif manifest regenerated).npm test— 675 passed, 1 skipped; 4 snapshots updated for the new serialization format.npm run lint(eslint--max-warnings 0+typecheck:test) — clean.npm run test:blackbox— 12/12 pass (generated code type-checks against next.14).regular(headers/payloads/parameters/types),organization, andpayload-types.Pre-existing, unrelated failure:
test/runtime/typescript/test/payload-types/formats.spec.ts→ "FormatTime should unmarshal to Date object". Modelina generatestype FormatTime = stringforformat: time(onlydate-timemaps toDate), andFormatTime.tsis byte-identical between next.12 and next.14 — so this failure exists independently of this upgrade and is left out of scope here.Notes
Behavioral change to generated code (user-facing). Consumers of generated models are affected:
additionalPropertiesis now a plain object (Record) rather than aMap— code using.set()/.get()/.entries()must switch to object access.If the release should signal this to downstream users, consider marking the commit as a breaking change (
BREAKING CHANGE:footer) rather than a plain dependency bump.The branch currently carries a single
wipcommit — reword to a conventional-commit message before merge so semantic-release classifies it correctly.The pre-existing
FormatTime(format: time→Date) test failure is a separate issue and not addressed here.