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

Upgrade babel packages, removed outdated plugins #7914

Closed
wants to merge 4 commits into from

Conversation

bsekachev
Copy link
Member

@bsekachev bsekachev commented May 20, 2024

Motivation and context

How has this been tested?

Checklist

  • I submit my changes into the develop branch
  • I have created a changelog fragment
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • I have linked related issues (see GitHub docs)
  • I have increased versions of npm packages if it is necessary
    (cvat-canvas,
    cvat-core,
    cvat-data and
    cvat-ui)

License

  • I submit my code changes under the same MIT License that covers the project.
    Feel free to contact the maintainers if that's a concern.

Summary by CodeRabbit

  • Chores
    • Updated various @babel dependencies to newer versions for improved performance and compatibility.
    • Removed deprecated Babel plugins from project configurations for cleaner and more efficient builds.

@bsekachev bsekachev requested review from klakhov and removed request for azhavoro May 20, 2024 08:25
Copy link
Contributor

coderabbitai bot commented May 20, 2024

Walkthrough

The recent changes across the project involve the removal of specific Babel plugins (@babel/plugin-proposal-class-properties and @babel/plugin-proposal-optional-chaining) from the babel-loader options in various webpack.config files. Additionally, several @babel dependencies in the package.json have been updated to newer versions to ensure compatibility and improve performance.

Changes

Files Change Summary
cvat-canvas/webpack.config.cjs Removed @babel/plugin-proposal-class-properties from babel-loader options
cvat-canvas3d/webpack.config.cjs Removed @babel/plugin-proposal-class-properties from babel-loader options
cvat-core/webpack.config.cjs Set plugins array in babel-loader options to empty
cvat-data/webpack.config.cjs Removed @babel/plugin-proposal-class-properties and @babel/plugin-proposal-optional-chaining from babel-loader options
cvat-ui/webpack.config.js Removed @babel/plugin-proposal-class-properties and @babel/plugin-proposal-optional-chaining from babel-loader options
package.json Updated various @babel dependencies to newer versions

🐇
In the land of code, a change took place,
Babel plugins gone, without a trace.
Dependencies updated, fresh and new,
For a smoother build, and performance too.
The rabbits rejoice, in digital delight,
For code that runs, both day and night.
🌟


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?

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>.
    • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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.

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 as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@bsekachev bsekachev removed the request for review from nmanovic May 20, 2024 08:26
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

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 1a86ccd and 6eb35ff.
Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/*.lock
Files selected for processing (6)
  • cvat-canvas/webpack.config.cjs (1 hunks)
  • cvat-canvas3d/webpack.config.cjs (1 hunks)
  • cvat-core/webpack.config.cjs (1 hunks)
  • cvat-data/webpack.config.cjs (1 hunks)
  • cvat-ui/webpack.config.js (1 hunks)
  • package.json (1 hunks)
Files skipped from review due to trivial changes (5)
  • cvat-canvas/webpack.config.cjs
  • cvat-core/webpack.config.cjs
  • cvat-data/webpack.config.cjs
  • cvat-ui/webpack.config.js
  • package.json
Additional comments not posted (1)
cvat-canvas3d/webpack.config.cjs (1)

59-59: Removal of Babel plugins: Ensure compatibility and functionality.

Ensure that the removal of @babel/plugin-proposal-class-properties and other plugins does not affect the usage of such features in the cvat-canvas3d module. If these features are used, consider either reintroducing the plugins or refactoring the code to not require them.

Verification successful

The search for features that might require the removed Babel plugins did not produce any output. This indicates that the features provided by these plugins (class properties, optional chaining, private methods, nullish coalescing, logical assignment) are not used in the codebase.

  • Ensure compatibility and functionality after the removal of Babel plugins.
  • No evidence of features requiring the removed Babel plugins was found.
Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify if the removed Babel plugins were essential for any features used in the cvat-canvas3d module.

# Test: Search for features that might require the removed plugins.
rg --type js --type ts 'class properties|optional chaining' ./src/typescript/

Length of output: 137



Script:

#!/bin/bash
# Description: Locate JavaScript and TypeScript files and verify if the removed Babel plugins were essential for any features used in the cvat-canvas3d module.

# Step 1: Locate all JavaScript and TypeScript files in the repository.
fd -e js -e ts

# Step 2: Search for features that might require the removed plugins in the located files.
rg 'class properties|optional chaining' $(fd -e js -e ts)

Length of output: 45010



Script:

#!/bin/bash
# Description: Verify if the removed Babel plugins were essential for any features used in the cvat-canvas3d module.

# Step 1: Locate all JavaScript and TypeScript files in the repository.
files=$(fd -e js -e ts)

# Step 2: Search for features that might require the removed plugins in the located files.
rg 'class properties|optional chaining|private methods|nullish coalescing|logical assignment' $files

Length of output: 45057

@bsekachev bsekachev changed the title Upgrade babel packages, removed outdated plugins [WIP] Upgrade babel packages, removed outdated plugins May 20, 2024
@bsekachev bsekachev changed the title [WIP] Upgrade babel packages, removed outdated plugins Upgrade babel packages, removed outdated plugins May 23, 2024
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

Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 6eb35ff and 2289599.
Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/*.lock
Files selected for processing (1)
  • package.json (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • package.json

@bsekachev bsekachev closed this May 23, 2024
@bsekachev bsekachev deleted the bs/upgrade_babel branch June 4, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant