fix: cycle deps between vue-generator and common pacakge#637
Conversation
WalkthroughThe update introduces new default configurations for code formatting in the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/common/composable/generateCode/index.js (1 hunks)
- packages/vue-generator/package.json (1 hunks)
- packages/vue-generator/src/utils/index.js (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/vue-generator/package.json
Additional comments not posted (2)
packages/common/composable/generateCode/index.js (1)
2-12: Good practice: Adding default configurations.The addition of
defaultOptionswithdefaultPrettierConfigensures consistent code formatting.packages/vue-generator/src/utils/index.js (1)
72-78: Good practice: Explicitly defining formatting options.The explicit definition of
commonOptswith specific formatting options improves clarity and maintainability. The removal of theprettierConfigimport reduces dependency and potential cyclic issues.Verification successful
Verified: Changes to
commonOptsare contained within the same file.The explicit definition of
commonOptswith specific formatting options improves clarity and maintainability. The usage ofcommonOptsis confined to thepackages/vue-generator/src/utils/index.jsfile, ensuring no broader impact.
packages/vue-generator/src/utils/index.js:commonOptsis used to configure options forvueandjs.Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the impact of changes to `commonOpts`. # Test: Search for the usage of `commonOpts`. Expect: Consistent formatting options. rg --type javascript $'commonOpts'Length of output: 68
Script:
#!/bin/bash # Description: Verify the impact of changes to `commonOpts`. # Test: Search for the usage of `commonOpts` in JavaScript files. rg 'commonOpts' --glob '*.js'Length of output: 300
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Refactor
generateAppCodefunction to merge user options with default settings.Chores
@opentiny/tiny-engine-commonto streamline package management.