-
Notifications
You must be signed in to change notification settings - Fork 40
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 firfox 135 compatibility #545
fix firfox 135 compatibility #545
Conversation
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThis pull request introduces a mock implementation for Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Color Menu Test
participant Document as Document Object
participant Range as Range Object
Test->>Document: document.createRange()
Document-->>Range: Returns new Range object
Test->>Range: getClientRects() call
Range-->>Test: Returns empty client rects (length 0)
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: 0
🧹 Nitpick comments (1)
packages/basic-modules/__tests__/color/color-menus.test.ts (1)
14-25
: Mockingdocument.createRange
for jsdom CompatibilityThe patch overriding
document.createRange
addresses the jsdom limitation regarding the missinggetClientRects
method effectively. To further improve maintainability and adhere to ESLint guidelines, consider reformatting the block for consistent indentation and removal of extra semicolons as suggested below:-document.createRange = () => { - const range = new Range(); - range.getClientRects = () => ({ - item: () => null, - length: 0, - [Symbol.iterator]: function *() { - yield* []; - }, - }); - return range; -}; +document.createRange = () => { + const range = new Range(); + + range.getClientRects = () => ({ + item: () => null, + length: 0, + [Symbol.iterator]: function* () { + yield* []; + } + }); + + return range; +};This refactoring not only adheres to common style guides but also helps eliminate ESLint warnings related to indentation and extra semicolons.
🧰 Tools
🪛 ESLint
[error] 16-16: Expected blank line after variable declarations.
(newline-after-var)
[error] 16-16: Extra semicolon.
(semi)
[error] 18-18: Expected indentation of 4 spaces but found 6.
(indent)
[error] 19-19: Expected indentation of 4 spaces but found 6.
(indent)
[error] 20-20: Expected indentation of 4 spaces but found 6.
(indent)
[error] 20-22: Expected method shorthand.
(object-shorthand)
[error] 20-20: Unexpected space before *.
(generator-star-spacing)
[error] 20-20: Missing space after *.
(generator-star-spacing)
[error] 21-21: Expected indentation of 6 spaces but found 10.
(indent)
[error] 21-21: Extra semicolon.
(semi)
[error] 22-22: Expected indentation of 4 spaces but found 6.
(indent)
[error] 23-23: Extra semicolon.
(semi)
[error] 24-24: Extra semicolon.
(semi)
[error] 25-25: Extra semicolon.
(semi)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (14)
packages/basic-modules/__tests__/color/color-menus.test.ts
(1 hunks)packages/basic-modules/package.json
(1 hunks)packages/code-highlight/package.json
(1 hunks)packages/core/package.json
(1 hunks)packages/editor/package.json
(1 hunks)packages/list-module/package.json
(1 hunks)packages/plugin-float-image/package.json
(1 hunks)packages/plugin-formula/package.json
(1 hunks)packages/plugin-link-card/package.json
(1 hunks)packages/plugin-markdown/package.json
(1 hunks)packages/plugin-mention/package.json
(1 hunks)packages/table-module/package.json
(1 hunks)packages/upload-image-module/package.json
(1 hunks)packages/video-module/package.json
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- packages/video-module/package.json
🧰 Additional context used
🪛 ESLint
packages/basic-modules/__tests__/color/color-menus.test.ts
[error] 16-16: Expected blank line after variable declarations.
(newline-after-var)
[error] 16-16: Extra semicolon.
(semi)
[error] 18-18: Expected indentation of 4 spaces but found 6.
(indent)
[error] 19-19: Expected indentation of 4 spaces but found 6.
(indent)
[error] 20-20: Expected indentation of 4 spaces but found 6.
(indent)
[error] 20-22: Expected method shorthand.
(object-shorthand)
[error] 20-20: Unexpected space before *.
(generator-star-spacing)
[error] 20-20: Missing space after *.
(generator-star-spacing)
[error] 21-21: Expected indentation of 6 spaces but found 10.
(indent)
[error] 21-21: Extra semicolon.
(semi)
[error] 22-22: Expected indentation of 4 spaces but found 6.
(indent)
[error] 23-23: Extra semicolon.
(semi)
[error] 24-24: Extra semicolon.
(semi)
[error] 25-25: Extra semicolon.
(semi)
🔇 Additional comments (12)
packages/core/package.json (1)
60-60
: Dependency Version Update for snabbdom
The"snabbdom"
dependency has been updated from"^3.1.0"
to"^3.6.0"
, which is intended to improve Firefox 135 compatibility. Please verify that this update is fully compatible with the core package's usage and that no regressions occur due to breaking changes in the new version.packages/editor/package.json (1)
76-76
: Consistent Upgrade of snabbdom in Dependencies
The dependency"snabbdom"
has been updated to"^3.6.0"
here as well. This change aligns with the overall upgrade effort across the repository to resolve compatibility issues with Firefox 135. Please ensure that integration tests cover potential edge cases with this dependency update.packages/basic-modules/package.json (1)
52-52
: Peer Dependency Update to snabbdom
The"snabbdom"
peer dependency has been bumped to"^3.6.0"
, ensuring consistency with the other parts of the project. Confirm that this change is reflected in any integrations using basic modules and that it does not introduce version conflicts.packages/code-highlight/package.json (1)
50-50
: Updated snabbdom Version in Peer Dependencies
Here inpeerDependencies
, the update to"snabbdom": "^3.6.0"
is consistent with the rest of the project. It is advisable to run compatibility tests, especially in code highlight functionalities, to ensure the new version does not cause unexpected UI or runtime issues.packages/list-module/package.json (1)
50-50
: Maintaining Consistency with snabbdom Upgrade
The peer dependency"snabbdom"
has been updated to"^3.6.0"
, matching the changes made across other modules. Please double-check that the upgrade does not impact the module's behavior or visual correctness in list rendering.packages/table-module/package.json (1)
54-54
: Update tosnabbdom
Version in Peer Dependencies.The peer dependency for
snabbdom
has been updated to "^3.6.0" to remedy Firefox 135 compatibility issues. This update is aligned with the coordinated upgrade across modules.packages/plugin-formula/package.json (1)
49-49
: Bumpsnabbdom
Version for Consistency.The
snabbdom
dependency has been revised from "^3.1.0" to "^3.6.0" in the peerDependencies. This change is consistent with the other modules and supports the compatibility fixes.packages/plugin-mention/package.json (1)
45-45
: Synchronizesnabbdom
Dependency Version.The update to "^3.6.0" for the
snabbdom
peer dependency ensures uniformity across the project’s packages, addressing the compatibility issue with Firefox 135.packages/plugin-float-image/package.json (1)
47-47
: Refinedsnabbdom
Version in Peer Dependencies.Bumping
snabbdom
to "^3.6.0" in the peerDependencies aligns this module with the global dependency strategy aimed at resolving Firefox compatibility issues.packages/upload-image-module/package.json (1)
54-54
: Uniform Dependency Upgrade forsnabbdom
.The
snabbdom
version has been updated to "^3.6.0" here too, matching the changes in the other modules. This coherent upgrade should help eliminate version inconsistencies and support Firefox 135 compatibility.packages/plugin-link-card/package.json (1)
47-47
: Dependency Update for snabbdomThe upgrade from
"snabbdom": "^3.1.0"
to"^3.6.0"
is consistent with the overall project updates to address Firefox 135 compatibility. Please ensure that any potential breaking changes in snabbdom v3.6.0 are covered by your test suite.packages/plugin-markdown/package.json (1)
47-47
: Uniform Dependency Version ChangeThe update of the
snabbdom
dependency to"^3.6.0"
aligns with similar changes across the project. Verify that this change meets the compatibility requirements with Firefox 135 and that it does not introduce side effects in the plugin’s functionality.
看起来问题出在 yjs-for-react 这个项目里,如果不编译这个项目就不报错。可能是内部混用了 VNode 和 ReactNode,但是再往下找超出我的能力范围了。。 @cycleccc |
turbo 打包的问题,我处理一下 |
Changes Overview
bump snabbdom version to fix firefox v135 compatibility issue
Implementation Approach
modify dependency version
"snabbdom": "^3.6.0"
patch
document.createRange
in test file to avoid jsdom errorTesting Done
yarn test
passedVerification Steps
yarn example
and visit the demo using the latest firefox browserAdditional Notes
Checklist
Related Issues
#535
Summary by CodeRabbit