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

fix: firefox addon limitations #575

Merged
merged 1 commit into from
Dec 13, 2024
Merged

fix: firefox addon limitations #575

merged 1 commit into from
Dec 13, 2024

Conversation

kvhnuke
Copy link
Contributor

@kvhnuke kvhnuke commented Dec 13, 2024

Summary by CodeRabbit

  • New Features

    • Added support for building and packaging an Opera browser extension.
    • Introduced a visualization tool for better insights into the build process.
  • Bug Fixes

    • Updated Firefox extension manifest to require a newer version of the Firefox browser.
  • Documentation

    • Updated .gitignore to exclude stats.html.
  • Style

    • Made stylistic improvements for consistency in the codebase.
  • Chores

    • Incremented version number of the extension package.
    • Added a new development dependency.

Copy link

coderabbitai bot commented Dec 13, 2024

Walkthrough

The pull request introduces several changes to enhance the build process for an Opera browser extension within a GitHub Actions workflow. Key modifications include the addition of steps to build and package the extension, updates to the .gitignore file, and enhancements to the vite.config.ts file for better chunk management. Additionally, the Firefox manifest file is updated to require a newer version of Firefox and includes a new identifier. Various files also underwent minor stylistic changes, ensuring consistency in formatting.

Changes

File Path Change Summary
.github/workflows/release.yml Added steps to build and package an Opera extension using yarn build:opera and yarn zip.
packages/extension/.gitignore Added entry for stats.html to ignore it in Git.
packages/extension/configs/vite/assets-rewrite.ts Added semicolons for consistency; no functional changes.
packages/extension/package.json Incremented version from 2.0.0 to 2.0.1; added rollup-plugin-visualizer as a dev dependency.
packages/extension/src/manifest/manifest.firefox.ts Updated strict_min_version to 112.0 and added id property.
packages/extension/src/ui/provider-pages/main.ts Added missing semicolon in the assignment of __ENKRYPT_DEBUG_LOG_CONF__.
packages/extension/vite.config.ts Added visualizer import; defined firefoxChunking function; updated plugins and rollupOptions.

Possibly related PRs

Suggested reviewers

  • gamalielhere

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

Copy link

github-actions bot commented Dec 13, 2024

💼 Build Files
chrome: enkrypt-chrome-a0d3f0f2.zip
firefox: enkrypt-firefox-a0d3f0f2.zip

💉 Virus total analysis
chrome: a0d3f0f2
firefox: a0d3f0f2

Copy link

@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: 1

🧹 Outside diff range and nitpick comments (2)
packages/extension/vite.config.ts (2)

16-22: Good addition: Firefox-specific chunk optimization

The firefoxChunking function implements a smart strategy for managing node_modules chunks in Firefox builds. This could help with Firefox's addon size limitations and improve load-time performance.

Consider adding a comment explaining the rationale behind this Firefox-specific chunking strategy.

+// Firefox-specific chunking strategy to optimize addon size and improve load-time performance
 const firefoxChunking = (id: string) => {

3-4: Good addition: Bundle visualization support

The addition of the visualizer plugin will help monitor and optimize chunk sizes, which is particularly valuable for debugging Firefox addon size limitations.

Consider documenting the location of the generated visualization report in the README to help other developers monitor bundle sizes.

Also applies to: 59-59

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between e798d89 and a0d3f0f.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (7)
  • .github/workflows/release.yml (1 hunks)
  • packages/extension/.gitignore (1 hunks)
  • packages/extension/configs/vite/assets-rewrite.ts (1 hunks)
  • packages/extension/package.json (2 hunks)
  • packages/extension/src/manifest/manifest.firefox.ts (1 hunks)
  • packages/extension/src/ui/provider-pages/main.ts (1 hunks)
  • packages/extension/vite.config.ts (4 hunks)
✅ Files skipped from review due to trivial changes (4)
  • packages/extension/.gitignore
  • packages/extension/configs/vite/assets-rewrite.ts
  • packages/extension/package.json
  • packages/extension/src/ui/provider-pages/main.ts
🔇 Additional comments (3)
packages/extension/src/manifest/manifest.firefox.ts (1)

24-24: LGTM: Extension ID added

The addition of a fixed extension ID is good practice for Firefox addons. This ensures consistent identification across updates and installations.

.github/workflows/release.yml (1)

48-49: LGTM: Opera build steps added

The Opera build steps are well-structured and follow the same pattern as other browser builds. The file naming convention is consistent with existing artifacts.

packages/extension/vite.config.ts (1)

106-108: LGTM: Conditional chunk management

The conditional application of Firefox chunking strategy is well-implemented. This ensures Firefox builds get optimized chunking while maintaining default behavior for other browsers.

@kvhnuke kvhnuke merged commit ac20161 into develop Dec 13, 2024
4 checks passed
@kvhnuke kvhnuke deleted the fix/ff-build branch December 13, 2024 21:44
@coderabbitai coderabbitai bot mentioned this pull request Dec 13, 2024
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.

3 participants