-
Notifications
You must be signed in to change notification settings - Fork 340
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
Fix/cli template bundle #1053
Fix/cli template bundle #1053
Conversation
WalkthroughThis pull request involves a comprehensive version update across multiple packages from Changes
Sequence DiagramsequenceDiagram
participant Workflow as GitHub Actions
participant NPM as Package Registry
participant Packages as Project Packages
Workflow->>Packages: Update versions to 2.2.0-beta.1
Packages->>NPM: Prepare for beta release
NPM-->>Packages: Version confirmation
Possibly related PRs
Suggested labels
Suggested reviewers
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/canvas/route-bar/src/CanvasRouteBar.vue (1)
68-81
: LGTM! Improved error handling for route population.The changes enhance the robustness of the route population logic by adding proper null checks and maintaining a clean data transformation pipeline.
Consider these minor improvements:
- Translate the Chinese comments to English for better international collaboration
- Add error logging when items are filtered out to help with debugging
routes.value = ancestors .concat(value) .map((id) => pageSettingState.treeDataMapping[id]) - .filter((item) => Boolean(item)) + .filter((item) => { + const isValid = Boolean(item) + if (!isValid) { + console.warn(`[CanvasRouteBar] Page data not found for ID in treeDataMapping`) + } + return isValid + }) .map((pageData) => { const { id, route, isPage } = pageData return { id, route: route - .replace(/\/+/g, '/') // 替换连续的 '/' 为单个 '/' - .replace(/^\/|\/$/g, ''), // 去掉开头和结尾的 '/' + .replace(/\/+/g, '/') // Replace consecutive '/' with single '/' + .replace(/^\/|\/$/g, ''), // Remove leading and trailing '/' isPage } })
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (60)
.github/workflows/Release.yml
(0 hunks)designer-demo/package.json
(1 hunks)mockServer/package.json
(1 hunks)packages/block-compiler/package.json
(1 hunks)packages/blockToWebComponentTemplate/package.json
(1 hunks)packages/build/vite-config/package.json
(1 hunks)packages/build/vite-plugin-meta-comments/package.json
(1 hunks)packages/builtinComponent/package.json
(1 hunks)packages/canvas/package.json
(1 hunks)packages/canvas/route-bar/src/CanvasRouteBar.vue
(1 hunks)packages/common/package.json
(1 hunks)packages/configurator/package.json
(1 hunks)packages/design-core/package.json
(2 hunks)packages/engine-cli/package.json
(1 hunks)packages/engine-cli/template/designer/public/mock/bundle.json
(33 hunks)packages/i18n/package.json
(1 hunks)packages/layout/package.json
(1 hunks)packages/plugins/block/package.json
(1 hunks)packages/plugins/bridge/package.json
(1 hunks)packages/plugins/datasource/package.json
(1 hunks)packages/plugins/help/package.json
(1 hunks)packages/plugins/i18n/package.json
(1 hunks)packages/plugins/materials/package.json
(1 hunks)packages/plugins/page/package.json
(1 hunks)packages/plugins/robot/package.json
(1 hunks)packages/plugins/schema/package.json
(1 hunks)packages/plugins/script/package.json
(1 hunks)packages/plugins/state/package.json
(1 hunks)packages/plugins/tree/package.json
(1 hunks)packages/plugins/tutorial/package.json
(1 hunks)packages/register/package.json
(1 hunks)packages/settings/design/package.json
(1 hunks)packages/settings/events/package.json
(1 hunks)packages/settings/panel/package.json
(1 hunks)packages/settings/props/package.json
(1 hunks)packages/settings/styles/package.json
(1 hunks)packages/svgs/package.json
(1 hunks)packages/theme/base/package.json
(1 hunks)packages/theme/dark/package.json
(1 hunks)packages/theme/light/package.json
(1 hunks)packages/toolbars/breadcrumb/package.json
(1 hunks)packages/toolbars/clean/package.json
(1 hunks)packages/toolbars/collaboration/package.json
(1 hunks)packages/toolbars/fullscreen/package.json
(1 hunks)packages/toolbars/generate-code/package.json
(1 hunks)packages/toolbars/lang/package.json
(1 hunks)packages/toolbars/layout/package.json
(1 hunks)packages/toolbars/lock/package.json
(1 hunks)packages/toolbars/logo/package.json
(1 hunks)packages/toolbars/logout/package.json
(1 hunks)packages/toolbars/media/package.json
(1 hunks)packages/toolbars/preview/package.json
(1 hunks)packages/toolbars/redoundo/package.json
(1 hunks)packages/toolbars/refresh/package.json
(1 hunks)packages/toolbars/save/package.json
(1 hunks)packages/toolbars/setting/package.json
(1 hunks)packages/toolbars/view-setting/package.json
(1 hunks)packages/utils/package.json
(1 hunks)packages/vue-generator/package.json
(2 hunks)packages/webcomponent/package.json
(1 hunks)
💤 Files with no reviewable changes (1)
- .github/workflows/Release.yml
✅ Files skipped from review due to trivial changes (54)
- packages/theme/base/package.json
- packages/plugins/tree/package.json
- packages/toolbars/layout/package.json
- packages/theme/light/package.json
- packages/theme/dark/package.json
- packages/toolbars/fullscreen/package.json
- packages/engine-cli/package.json
- packages/toolbars/breadcrumb/package.json
- packages/settings/styles/package.json
- packages/toolbars/media/package.json
- packages/toolbars/clean/package.json
- packages/settings/props/package.json
- packages/plugins/materials/package.json
- packages/build/vite-config/package.json
- packages/builtinComponent/package.json
- packages/toolbars/save/package.json
- packages/common/package.json
- packages/plugins/block/package.json
- packages/utils/package.json
- packages/plugins/datasource/package.json
- packages/i18n/package.json
- packages/configurator/package.json
- packages/plugins/state/package.json
- packages/toolbars/refresh/package.json
- packages/plugins/tutorial/package.json
- packages/toolbars/view-setting/package.json
- packages/toolbars/generate-code/package.json
- packages/toolbars/collaboration/package.json
- packages/toolbars/logout/package.json
- packages/settings/design/package.json
- packages/settings/panel/package.json
- packages/plugins/page/package.json
- packages/settings/events/package.json
- packages/svgs/package.json
- packages/plugins/schema/package.json
- packages/plugins/i18n/package.json
- packages/toolbars/redoundo/package.json
- packages/toolbars/preview/package.json
- packages/block-compiler/package.json
- packages/canvas/package.json
- mockServer/package.json
- packages/toolbars/logo/package.json
- packages/plugins/robot/package.json
- packages/webcomponent/package.json
- packages/toolbars/setting/package.json
- packages/plugins/help/package.json
- packages/plugins/script/package.json
- packages/toolbars/lang/package.json
- packages/toolbars/lock/package.json
- packages/blockToWebComponentTemplate/package.json
- packages/plugins/bridge/package.json
- packages/design-core/package.json
- packages/register/package.json
- packages/vue-generator/package.json
🔇 Additional comments (3)
packages/engine-cli/template/designer/public/mock/bundle.json (2)
14038-14054
: LGTM! Well-structured package configurations.The new packages section nicely consolidates the shared dependencies for TinyVue and Element Plus component libraries. The configuration includes all necessary fields and uses reliable CDN sources.
Line range hint
1-14037
: Component metadata looks good.The component library metadata is comprehensive and well-organized with proper documentation.
packages/build/vite-plugin-meta-comments/package.json (1)
3-3
: Version update to beta requires careful testing.The transition to
2.2.0-beta.1
indicates pre-release changes. Please ensure:
- All dependent packages are compatible with this beta version
- Breaking changes are documented
- Beta version is properly tagged in npm
✅ Verification successful
Beta version update appears safe to proceed
The version update to
2.2.0-beta.1
invite-plugin-meta-comments
is isolated and won't affect other packages in the repository as:
- No other packages depend on this plugin
- Each package maintains its independent versioning
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check if all workspace packages are aligned to the same beta version echo "Checking version consistency across workspace packages..." find . -name "package.json" -not -path "*/node_modules/*" -exec jq -r 'select(.version != null) | "\(.name): \(.version)"' {} \; | grep -v "2.2.0-beta.1" || echo "All versions are consistent"Length of output: 359
Script:
#!/bin/bash # Check dependencies on vite-plugin-meta-comments echo "Checking dependencies on vite-plugin-meta-comments..." find . -name "package.json" -not -path "*/node_modules/*" -exec jq -r ' select(.dependencies["@vuepress/vite-plugin-meta-comments"] != null or .devDependencies["@vuepress/vite-plugin-meta-comments"] != null) | "\(.name): dep version: \(.dependencies["@vuepress/vite-plugin-meta-comments"] // .devDependencies["@vuepress/vite-plugin-meta-comments"])" ' {} \; # Check if this is a workspace package echo -e "\nChecking workspace configuration..." jq -r '.workspaces // empty' ./package.jsonLength of output: 614
@@ -1,7 +1,7 @@ | |||
{ | |||
"name": "designer-demo", | |||
"private": true, | |||
"version": "2.1.0", | |||
"version": "2.2.0-beta.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Align workspace dependency patterns with project convention
The codebase predominantly uses workspace:*
for internal dependencies. Consider updating the following in designer-demo/package.json to match this pattern:
@opentiny/tiny-engine: workspace:^
→workspace:*
@opentiny/tiny-engine-mock: workspace:^
→workspace:*
@opentiny/tiny-engine-vite-config: workspace:^
→workspace:*
🔗 Analysis chain
Review workspace dependency versioning strategy.
While the version update to 2.2.0-beta.1
is consistent, consider:
- The use of
^
for workspace dependencies might lead to version mismatches - Ensure all @opentiny/vue packages at ~3.14.0 are compatible with Vue 3.4.21
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check for potential version conflicts in workspace dependencies
echo "Checking workspace dependency patterns..."
jq -r '.dependencies + .devDependencies | to_entries[] | select(.value | startswith("workspace")) | "\(.key): \(.value)"' designer-demo/package.json
Length of output: 499
Script:
#!/bin/bash
# Check for workspace dependency patterns in all package.json files
echo "Checking all package.json files for workspace dependencies..."
fd package.json --type f --exclude node_modules --exec sh -c 'echo "\n=== $1 ==="; jq -r ".dependencies + .devDependencies | to_entries[] | select(.value | startswith(\"workspace\")) | \"\(.key): \(.value)\"" "$1"' sh {}
Length of output: 13435
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@opentiny/tiny-engine-layout", | |||
"version": "2.1.0", | |||
"version": "2.2.0-beta.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Critical: Vue version inconsistency confirmed across packages
The version mismatch is verified:
@opentiny/tiny-engine-layout
uses Vue 3.2.45- Most other packages use Vue ^3.4.x (primarily 3.4.21)
This significant version gap (3.2.45 → 3.4.21) should be addressed to prevent potential compatibility issues.
🔗 Analysis chain
Critical: Vue version inconsistency detected.
While the package version is updated to 2.2.0-beta.1
, there's a critical version mismatch:
- This package uses Vue 3.2.45
- Designer demo uses Vue 3.4.21
Please align Vue versions across packages to prevent potential compatibility issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check Vue version consistency across packages
echo "Checking Vue version consistency..."
find . -name "package.json" -not -path "*/node_modules/*" -exec jq -r 'select(.dependencies.vue != null) | "\(.name): Vue \(.dependencies.vue)"' {} \;
Length of output: 523
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?
根据物料新协议更新cli模板中的bundle.json
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
Release Notes for Version 2.2.0-beta.1
Version Update
2.2.0-beta.1
, indicating a new beta release across the entire project ecosystem.Workflow Changes
pnpm
package manager during Node.js installation in the GitHub workflow.Bundle Configuration
bundle.json
:Route Bar Improvements
Dependency Management
Notes