Skip to content
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

chore: Remove dependancy #39389

Open
wants to merge 3 commits into
base: release
Choose a base branch
from
Open

chore: Remove dependancy #39389

wants to merge 3 commits into from

Conversation

sagar-qa007
Copy link
Contributor

@sagar-qa007 sagar-qa007 commented Feb 21, 2025

Description

Remove immer library

Fixes # https://theappsmith.slack.com/archives/C0134BAVDB4/p1740028929478969?thread_ts=1738822154.732719&cid=C0134BAVDB4

Automation

/ok-to-test tags="@tag.All"

🔍 Cypress test results

Tip

🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉
Workflow run: https://github.com/appsmithorg/appsmith/actions/runs/13455561224
Commit: f695cd9
Cypress dashboard.
Tags: @tag.All
Spec:


Fri, 21 Feb 2025 12:20:17 UTC

Communication

Should the DevRel and Marketing teams inform users about this change?

  • Yes
  • No

Summary by CodeRabbit

  • Chores
    • Refined error logging for improved troubleshooting clarity.
    • Removed an unnecessary dependency to streamline project maintenance.
    • Updated state management implementation in the reducer for enhanced performance.

Copy link
Contributor

coderabbitai bot commented Feb 21, 2025

Walkthrough

This update refines error logging by modifying the log message in the getConsolidatedDataApi function within the FeatureFlags file. The log now explicitly identifies its source as FeatureFlags.ts instead of using a generic label. Additionally, the project’s dependency on Immer has been removed from the package.json file.

Changes

File Path Change Summary
app/client/.../FeatureFlags.ts Updated error log message in getConsolidatedDataApi to specify the source file (FeatureFlags.ts).
app/client/package.json Removed the immer dependency ("immer": "^9.0.6") from the dependencies.
app/client/src/reducers/.../triggerReducer.ts Replaced produce function from immer with create function from mutative in the reducer case FETCH_FORM_DYNAMIC_VAL_NEXT_PAGE_SUCCESS.

Possibly related PRs

Suggested reviewers

  • ApekshaBhosale
  • NandanAnantharamu

Poem

A tweak in log, a line refined,
Now errors speak with voice defined.
"FeatureFlags.ts" leads the way,
Clean and clear, without dismay.
Dependencies trimmed to stay light,
CodeRabbit's magic shines so bright!
🚀✨


📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 96d8f10 and f695cd9.

📒 Files selected for processing (1)
  • app/client/src/reducers/evaluationReducers/triggerReducer.ts (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (7)
  • GitHub Check: perform-test / rts-build / build
  • GitHub Check: perform-test / server-build / server-unit-tests
  • GitHub Check: client-unit-tests / client-unit-tests
  • GitHub Check: client-check-cyclic-deps / check-cyclic-dependencies
  • GitHub Check: client-build / client-build
  • GitHub Check: client-lint / client-lint
  • GitHub Check: client-prettier / prettier-check
🔇 Additional comments (1)
app/client/src/reducers/evaluationReducers/triggerReducer.ts (1)

10-10: LGTM! Good choice of replacement library.

The mutative library is a suitable replacement for immer, offering similar immutable state management capabilities.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

🪧 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.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate unit testing code.
    • @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.

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. (Beta)
  • @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.

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.

@sagar-qa007 sagar-qa007 added the ok-to-test Required label for CI label Feb 21, 2025
@github-actions github-actions bot added the skip-changelog Adding this label to a PR prevents it from being listed in the changelog label Feb 21, 2025
@KelvinOm
Copy link
Collaborator

@sagar-qa007 Please note that you cannot delete this library because it is still used in several components.

Error: src/reducers/evaluationReducers/triggerReducer.ts(69,5): error TS2349: This expression is not callable.
  Type 'typeof import("/home/runner/work/appsmith/appsmith/app/client/node_modules/immer/dist/immer")' has no call signatures.
Error: src/reducers/evaluationReducers/triggerReducer.ts([6](https://github.com/appsmithorg/appsmith/actions/runs/13452174659/job/37588448599?pr=39389#step:14:7)9,21): error TS7006: Parameter 'draftState' implicitly has an 'any' type.
Error: Process completed with exit code 2.

@sagar-qa007
Copy link
Contributor Author

@sagar-qa007 Please note that you cannot delete this library because it is still used in several components.

Error: src/reducers/evaluationReducers/triggerReducer.ts(69,5): error TS2349: This expression is not callable.
  Type 'typeof import("/home/runner/work/appsmith/appsmith/app/client/node_modules/immer/dist/immer")' has no call signatures.
Error: src/reducers/evaluationReducers/triggerReducer.ts([6](https://github.com/appsmithorg/appsmith/actions/runs/13452174659/job/37588448599?pr=39389#step:14:7)9,21): error TS7006: Parameter 'draftState' implicitly has an 'any' type.
Error: Process completed with exit code 2.

@rajatagrawal Can you tell me what to do here?

@rajatagrawal
Copy link
Contributor

@vsvamsi1 Can you please check the thread and respond to @sagar-qa007 ?

@vsvamsi1
Copy link
Contributor

Hi @sagar-qa007 I have fixed the ee file which requires immer and pushed the new commit, however there is one cypress file which requires it. Can you fix that and thereafter run a tag.all test case?

Copy link
Collaborator

@KelvinOm KelvinOm left a comment

Choose a reason for hiding this comment

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

LGTM!

@vsvamsi1 Please note that createImmerReducer have not relevant name now. It should be renamed.

@vsvamsi1
Copy link
Contributor

vsvamsi1 commented Feb 24, 2025

Sure @KelvinOm I will refactor the name in a separate PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test Required label for CI skip-changelog Adding this label to a PR prevents it from being listed in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants