Skip to content

fix: importMapUpdateI18nHostVersion#1556

Merged
hexqi merged 1 commit intoopentiny:developfrom
chilingling:fix/importMapUpdateI18nHostVersion
Jul 24, 2025
Merged

fix: importMapUpdateI18nHostVersion#1556
hexqi merged 1 commit intoopentiny:developfrom
chilingling:fix/importMapUpdateI18nHostVersion

Conversation

@chilingling
Copy link
Member

@chilingling chilingling commented Jul 24, 2025

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Built its own designer, fully self-validated

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Background and solution

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Chores
    • Updated the version range for a package dependency to allow compatibility with newer versions.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 24, 2025

Walkthrough

The version specification for "@opentiny/tiny-engine-i18n-host" in the import map was updated from a fixed version "1" to a caret range "^2", allowing the use of any compatible 2.x.x version. No other packages or paths were changed.

Changes

File Change Summary
packages/common/js/import-map.json Updated "@opentiny/tiny-engine-i18n-host" version from "1" to "^2"

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A hop, a skip, a version bump,
From "1" to "^2", with a gentle jump.
The map now points to fresher ground,
Where newer i18n hosts are found.
With every hop, our code grows bright—
Onward, upward, versioned right! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot added the bug Something isn't working label Jul 24, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
packages/common/js/import-map.json (1)

11-11: Specify the full semver for consistency and predictable CDN resolution

Other packages in this import map follow the <range><major>.<minor>.<patch> pattern (e.g. ^2.0.0, ^9.9.0).
Using bare ^2 is an outlier and may:

  1. Produce a different CDN cache key, forcing additional network requests.
  2. Hide accidental upgrades to 2.x that introduce breaking changes without a clear diff in the file.
-"@opentiny/tiny-engine-i18n-host": "${VITE_CDN_DOMAIN}/@opentiny/tiny-engine-i18n-host${versionDelimiter}^2${fileDelimiter}/dist/lowcode-design-i18n-host.es.js",
+"@opentiny/tiny-engine-i18n-host": "${VITE_CDN_DOMAIN}/@opentiny/tiny-engine-i18n-host${versionDelimiter}^2.0.0${fileDelimiter}/dist/lowcode-design-i18n-host.es.js",

Ensure the version you lock to (2.0.0 or higher) actually exists on the CDN before merging.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b8a81c9 and c597233.

📒 Files selected for processing (1)
  • packages/common/js/import-map.json (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: gene9831
PR: opentiny/tiny-engine#1041
File: packages/plugins/datasource/src/DataSourceList.vue:138-138
Timestamp: 2025-01-14T10:06:25.508Z
Learning: PR #1041 in opentiny/tiny-engine is specifically for reverting Prettier v3 formatting to v2, without any logical code changes or syntax improvements.
Learnt from: gene9831
PR: opentiny/tiny-engine#1038
File: packages/plugins/block/index.js:24-24
Timestamp: 2025-01-14T08:42:18.574Z
Learning: In the tiny-engine project, breaking changes are documented in the changelog rather than in JSDoc comments or separate migration guides.
Learnt from: rhlin
PR: opentiny/tiny-engine#1011
File: packages/canvas/render/src/RenderMain.ts:82-88
Timestamp: 2025-01-14T08:50:50.226Z
Learning: For PR #1011, the focus is on resolving conflicts and migrating code, with architectural improvements deferred for future PRs.
Learnt from: gene9831
PR: opentiny/tiny-engine#917
File: docs/开始/快速上手.md:31-31
Timestamp: 2024-12-14T05:53:28.501Z
Learning: The latest stable version of `@opentiny/tiny-engine-cli` is `2.0.0`, and documentation should reference this version instead of any release candidates.
Learnt from: chilingling
PR: opentiny/tiny-engine#837
File: packages/vue-generator/src/plugins/genDependenciesPlugin.js:66-66
Timestamp: 2024-09-30T07:51:10.036Z
Learning: In the `tiny-engine` project, `@opentiny/tiny-engine-dsl-vue` refers to the current package itself, and importing types from it may cause circular dependencies.
Learnt from: hexqi
PR: opentiny/tiny-engine#1501
File: mockServer/src/tool/Common.js:79-82
Timestamp: 2025-07-03T09:22:59.512Z
Learning: In the tiny-engine project, the mockServer code uses ES6 import syntax but is compiled to CommonJS output. This means CommonJS globals like `__dirname` are available at runtime, while ES6 module-specific features like `import.meta` would cause runtime errors.
Learnt from: rhlin
PR: opentiny/tiny-engine#1011
File: packages/canvas/render/src/builtin/CanvasRouterView.vue:4-19
Timestamp: 2025-01-14T06:56:11.072Z
Learning: In the tiny-engine project, component implementations should maintain consistency with other components at the same level, even if modernization improvements (like TypeScript and Composition API) are possible.
packages/common/js/import-map.json (11)

Learnt from: gene9831
PR: #1038
File: packages/plugins/block/index.js:24-24
Timestamp: 2025-01-14T08:42:18.574Z
Learning: In the tiny-engine project, breaking changes are documented in the changelog rather than in JSDoc comments or separate migration guides.

Learnt from: gene9831
PR: #1041
File: packages/plugins/datasource/src/DataSourceList.vue:138-138
Timestamp: 2025-01-14T10:06:25.508Z
Learning: PR #1041 in opentiny/tiny-engine is specifically for reverting Prettier v3 formatting to v2, without any logical code changes or syntax improvements.

Learnt from: gene9831
PR: #917
File: docs/开始/快速上手.md:31-31
Timestamp: 2024-12-14T05:53:28.501Z
Learning: The latest stable version of @opentiny/tiny-engine-cli is 2.0.0, and documentation should reference this version instead of any release candidates.

Learnt from: chilingling
PR: #837
File: packages/vue-generator/src/plugins/genDependenciesPlugin.js:66-66
Timestamp: 2024-09-30T07:51:10.036Z
Learning: In the tiny-engine project, @opentiny/tiny-engine-dsl-vue refers to the current package itself, and importing types from it may cause circular dependencies.

Learnt from: hexqi
PR: #1501
File: mockServer/src/tool/Common.js:79-82
Timestamp: 2025-07-03T09:22:59.512Z
Learning: In the tiny-engine project, the mockServer code uses ES6 import syntax but is compiled to CommonJS output. This means CommonJS globals like __dirname are available at runtime, while ES6 module-specific features like import.meta would cause runtime errors.

Learnt from: yy-wow
PR: #940
File: packages/canvas/DesignCanvas/src/importMap.js:51-51
Timestamp: 2025-01-13T03:46:13.817Z
Learning: The getImportMapData function in packages/canvas/DesignCanvas/src/importMap.js has default parameter handling that initializes canvasDeps with empty arrays for scripts and styles, making additional null checks unnecessary.

Learnt from: rhlin
PR: #1011
File: packages/canvas/render/src/builtin/CanvasRouterView.vue:4-19
Timestamp: 2025-01-14T06:56:11.072Z
Learning: In the tiny-engine project, component implementations should maintain consistency with other components at the same level, even if modernization improvements (like TypeScript and Composition API) are possible.

Learnt from: rhlin
PR: #1011
File: packages/canvas/render/src/material-function/material-getter.ts:66-80
Timestamp: 2025-01-14T04:25:46.281Z
Learning: In the tiny-engine project, styles from block components are processed through Vite's CSS compilation pipeline, and additional style sanitization libraries should be avoided to maintain consistency with this approach.

Learnt from: gene9831
PR: #1011
File: packages/configurator/src/router-select-configurator/RouterSelectConfigurator.vue:63-73
Timestamp: 2025-01-14T06:49:00.797Z
Learning: In the tiny-engine project, the SvgIcon component is globally registered and available throughout Vue components without requiring explicit imports.

Learnt from: gene9831
PR: #1011
File: packages/configurator/src/router-select-configurator/RouterSelectConfigurator.vue:63-73
Timestamp: 2025-01-14T06:49:00.797Z
Learning: In the tiny-engine project, the SvgIcon component is globally registered using app.component('SvgIcon', SvgIcon) in packages/svgs/index.js, making it available throughout Vue components without requiring explicit imports.

Learnt from: gene9831
PR: #1011
File: packages/configurator/src/router-select-configurator/RouterSelectConfigurator.vue:95-98
Timestamp: 2025-01-14T06:55:59.692Z
Learning: The tiny-select component from @opentiny/vue library ensures selected options are valid internally, requiring no additional validation in the change handler.

🔇 Additional comments (1)
packages/common/js/import-map.json (1)

11-11: Double-check compatibility with v2 of the i18n host

Jumping from major version 1 to 2 can introduce breaking changes.
Please verify at least the following before release:

  • Runtime integration still works (language loading, fallback, pluralisation etc.).
  • Any deprecated APIs in v1 you relied on are removed or behave differently.
  • Unit/e2e test suites (if any) cover the i18n paths and still pass.

If regressions surface, consider pinning to ^1.x until the migration is complete.

@hexqi hexqi merged commit 38084b9 into opentiny:develop Jul 24, 2025
6 checks passed
chilingling added a commit to chilingling/tiny-engine that referenced this pull request Jul 24, 2025
chilingling added a commit to chilingling/tiny-engine that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants