-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(router-plugin): do not overwrite resolved generator config with unprocessed inline config #5963
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
Conversation
WalkthroughThis pull request fixes a configuration merge precedence issue in the router plugin. The merge order of inline and external configs is swapped in Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
🧰 Additional context used📓 Path-based instructions (1)**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-11-25T00:18:21.258ZApplied to files:
📚 Learning: 2025-11-25T00:18:21.258ZApplied to files:
📚 Learning: 2025-10-08T08:11:47.088ZApplied to files:
📚 Learning: 2025-10-01T18:31:35.420ZApplied to files:
🧬 Code graph analysis (1)packages/router-plugin/tests/config.test.ts (2)
⏰ 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). (1)
🔇 Additional comments (3)
Comment |
|
View your CI Pipeline Execution ↗ for commit 1319827
☁️ Nx Cloud last updated this comment at |
This PR resolves #5658.
When using the plugin, the inline config is passed to the generator and processed together with the tsr.config.json config (if it exists). This includes resolving any relative paths.
The inline config, however, may contain fields other than what is needed and returned from the generator config and hence needs to be parsed in addition to the generator config.
Currently, the inline config is merged into the resolved generator config overwriting any resolved fields from there.
This PR changes this behavior by reversing this and merging the generator config into the inline config thereby overwriting the inline config with the processed fields from the generator where relevant.
Additionally, this PR adds a few unit tests to ensure the configuration is read and processed correctly going forward.
Summary by CodeRabbit
Bug Fixes
Tests
✏️ Tip: You can customize this high-level summary in your review settings.