fix: adjust generator publish script to build react-sdk#1687
fix: adjust generator publish script to build react-sdk#1687asyncapi-bot merged 3 commits intoasyncapi:masterfrom
Conversation
🦋 Changeset detectedLatest commit: 9bc1dc1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
WalkthroughAdds a changeset for a patch release and updates apps/generator package scripts to build the React SDK before generator builds and during publish, ensuring baked-in templates and React SDK outputs are included. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
What reviewer looks at during PR reviewThe following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (5)
.changeset/sad-dogs-tickle.md (1)
2-5: Tighten wording and keep tense consistent in changeset entry.Small clarity nit:
- Prefer imperative voice and name the package consistently.
Proposed text:
---- -"@asyncapi/generator": patch ---- - -Ensure transpiled baked-in templates are published to npm. Fixing missing `react-sdk` build. +--- +"@asyncapi/generator": patch +--- + +Ensure transpiled baked-in templates are published to npm. Fix missing React SDK build in generator test/publish pipeline.apps/generator/package.json (4)
29-29: Name consistency: preferbuild:react-sdkto mirror package name.Minor readability tweak to align with common colon-kebab convention.
- "build:reactsdk": "npm run --workspace=@asyncapi/generator-react-sdk build", + "build:react-sdk": "npm run --workspace=@asyncapi/generator-react-sdk build",Apply corresponding rename wherever it’s referenced (e.g., pretest/prepack).
30-30: Running React SDK build on everynpm testmay slow inner-loop dev.Hooking a full SDK build into
pretestensures correctness in CI, but it can significantly increase local test time. Consider a CI-only path or a consolidated “build once” before all tests.Options:
- Introduce
test:ciand use it in CI/publish:- "pretest": "npm run build:react-sdk && npm run build", + "pretest": "npm run build", // fast local loop + "test:ci": "npm run build:react-sdk && npm run build && npm test"
- Or rely on
prepackfor publish and leave tests independent of cross-package build.
31-31: Preferprepackto guarantee built artifacts in the tarball; keepprepublishOnlylean.
prepackruns for bothnpm packandnpm publishand is the canonical place to ensure compiled/baked-in artifacts are included. You can keepprepublishOnlyfocused on test gates.Change
prepublishOnlyand addprepack:- "prepublishOnly": "npm run pretest" + "prepublishOnly": "npm test && npm run prepack"Add this script (outside the shown hunk):
"prepack": "npm run build:react-sdk && npm run build"If you adopt the renamed script:
"prepack": "npm run build:react-sdk && npm run build"
29-29: Use a workspace‐aware npm script for building the React SDKThe root
package.jsondefines workspaces and the React SDK package is named@asyncapi/generator-react-sdk, so you can invoke its build withoutcd, improving cross-platform reliability and resilience to folder moves.• Location:
apps/generator/package.json, line 29
• Change the script to use the workspace flag:- "build:reactsdk": "cd ../react-sdk && npm run build", + "build:reactsdk": "npm run --workspace=@asyncapi/generator-react-sdk build",
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.changeset/sad-dogs-tickle.md(1 hunks)apps/generator/package.json(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Test generator as dependency with Node 20
- GitHub Check: Test generator as dependency with Node 18
|
|
/rtm |



I ❤️ TS
Summary by CodeRabbit
Bug Fixes
Chores