-
Notifications
You must be signed in to change notification settings - Fork 199
refactor!: move VERSION to constants
#680
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
BREAKING CHANGES: `Client.VERSION` moved to `constants.VERSION`. `VERSION` is supposed to be immutable as it represents the actual version of maxGraph. When it was stored in Client, it was a static property that could be modified. Moving it to "constants" ensure that it cannot be modified.
|
Warning Rate limit exceeded@tbouffard has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 49 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
WalkthroughThis pull request refactors version management and internal utility functions in the codebase. The static version property has been removed from the Client class and replaced with an immutable version constant in the Constants module. References to version information have been updated across UI and example files to use the new constant, and obsolete utility functions have been either removed or made private. Additionally, the update script has been adjusted to work with the new file and declaration format. Changes
Possibly related PRs
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 (
|
# Conflicts: # CHANGELOG.md
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: 1
🧹 Nitpick comments (2)
packages/core/src/util/Constants.ts (1)
22-23: Use single quotes for consistency with other comments.The comment uses backticks for the script path which is inconsistent with the comment style in the rest of the file.
-// WARN: this constant is updated at release time by the script located at `scripts/update-versions.mjs`. +// WARN: this constant is updated at release time by the script located at 'scripts/update-versions.mjs'.CHANGELOG.md (1)
25-26: Ensure Clarity and Correct Grammar for the Version Relocation EntryThe changelog now notes that
Client.VERSIONhas been moved toconstants.VERSIONto enforce immutability. For better readability and grammatical correctness, consider rephrasing the second sentence. For instance, you might update it to:Moving it to the
constantsmodule ensures that it cannot be modified.This change enhances clarity while aligning with the breaking change introduced by this PR.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
CHANGELOG.md(1 hunks)packages/core/src/Client.ts(0 hunks)packages/core/src/gui/MaxLog.ts(2 hunks)packages/core/src/util/Constants.ts(1 hunks)packages/js-example-without-defaults/src/index.js(1 hunks)packages/js-example/src/index.js(2 hunks)packages/ts-example-without-defaults/src/main.ts(1 hunks)packages/ts-example/src/main.ts(1 hunks)packages/ts-support/src/index.ts(1 hunks)scripts/update-versions.mjs(1 hunks)
💤 Files with no reviewable changes (1)
- packages/core/src/Client.ts
🧰 Additional context used
🪛 ESLint
scripts/update-versions.mjs
[error] 50-50: Unexpected console statement.
(no-console)
🔇 Additional comments (7)
packages/ts-support/src/index.ts (1)
17-17: LGTM! Changes align with the version refactoring.The import statement and version reference have been correctly updated to use
constants.VERSIONinstead ofClient.VERSION.Also applies to: 19-19
packages/js-example-without-defaults/src/index.js (1)
107-107: LGTM! Version display updated correctly.The version display has been properly updated to use
constants.VERSION.packages/js-example/src/index.js (1)
20-20: LGTM! Version display updated correctly.The import statement and version display have been properly updated to use
constants.VERSION.Also applies to: 77-77
packages/ts-example-without-defaults/src/main.ts (1)
107-107: LGTM!The version reference has been correctly updated to use
constants.VERSION.packages/ts-example/src/main.ts (1)
118-118: LGTM!The version reference has been correctly updated to use
constants.VERSION.packages/core/src/gui/MaxLog.ts (1)
27-27: LGTM!The version reference has been correctly updated:
- Import statement added for
VERSIONfrom Constants module- Usage updated to reference the imported VERSION constant
Also applies to: 44-44
packages/core/src/util/Constants.ts (1)
19-21: LGTM!The VERSION constant has been correctly added with proper documentation.
Also applies to: 24-24
|



BREAKING CHANGES:
Client.VERSIONmoved toconstants.VERSION. VERSION is supposed to be immutable as it represents the actual version of maxGraph.When it was stored in Client, it was a static property that could be modified.
Moving it to the constants module ensures that it cannot be modified.
Summary by CodeRabbit