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

devop: vite 6 and package updates #612

Closed
wants to merge 4 commits into from
Closed

Conversation

kvhnuke
Copy link
Contributor

@kvhnuke kvhnuke commented Feb 7, 2025

Summary by CodeRabbit

  • Chores
    • Upgraded numerous third-party libraries to ensure compatibility and incorporate improvements.
  • Refactor
    • Improved wallet integration workflows and address processing for a smoother, more reliable user experience.
  • Style
    • Standardized formatting across the codebase to support long-term maintainability.

These updates, while mostly behind the scenes, contribute to a more robust and dependable application for users.

Copy link

coderabbitai bot commented Feb 7, 2025

Walkthrough

This pull request updates dependency versions across multiple package.json files and applies minor code formatting adjustments. In various packages, both runtime and development dependencies have their version numbers incremented. Some source files have been modified for consistency by adding semicolons and updating import statements, specifically for the Ethereum wallet package. Configuration files have been updated with new path aliases and revised build options. No new features or control flow changes have been introduced.

Changes

File(s) Change Summary
package.json (root) Updated devDependencies: @commitlint/cli (^19.5.0 → ^19.7.1), @commitlint/config-conventional (^19.5.0 → ^19.7.1), @swc/core (^1.9.2 → ^1.10.14), concurrently (^9.1.0 → ^9.1.2), husky (^9.1.6 → ^9.1.7), nodemon (^3.1.7 → ^3.1.9)
packages/extension-bridge/package.json Updated dependencies: serialize-error (11.0.3 → 12.0.0); Updated devDependencies: @types/node (^22.9.0 → ^22.13.1), bumpp (^9.8.1 → ^10.0.2), eslint (^9.14.0 → ^9.20.0), prettier (^3.3.3 → ^3.4.2), tsup (^8.3.5 → ^8.3.6), type-fest (^4.26.1 → ^4.33.0), typescript (^5.6.3 → ^5.7.3), typescript-eslint (8.14.0 → 8.23.0)
packages/extension/configs/vite/transform-manifest.ts Added semicolons after statements to ensure consistent formatting
packages/extension/package.json Updated multiple dependencies (e.g., @amplitude/analytics-browser, @kadena/client, @metaplex-foundation/mpl-bubblegum, various @PolkaDot and @Solana packages, bitcoinjs-lib) and devDependencies (including several rollup plugins, eslint, prettier, tsup, typescript, etc.) to newer versions
packages/extension/src/ui/action/main.ts Added missing semicolon after the ENKRYPT_DEBUG_LOG_CONF global variable assignment
packages/extension/src/ui/action/views/import-account/views/import-account-password.vue
packages/extension/src/ui/action/views/import-account/views/import-account-private-key.vue
Changed Wallet import from “ethereumjs-wallet” to “@ethereumjs/wallet” and replaced address retrieval (using getAddress().toString('hex')) with getAddressString()
packages/extension/tsconfig.node.json Expanded include patterns (adding src//*.ts, configs//.ts, src/**/.vue) and added path aliases (“@/” → “./src/”, “@action/” → “./src/ui/action/”)
packages/extension/vite.config.ts Added legacy option (skipWebSocketTokenCheck: true) and removed relativeUrls from the LESS preprocessor configuration
Other package.json files (hw-wallets, keyring, name-resolution, request, signers/bitcoin, signers/ethereum, signers/kadena, signers/polkadot, storage, swap, types, utils) Updated various dependency and devDependency versions (commonly: @types/node, eslint, prettier, tsup, typescript, typescript-eslint, vitest, etc.; plus package-specific dependencies such as ledger, @PolkaDot, and others)

Possibly related PRs

  • chore: implement debug logger #569: The changes in the main PR, which involve updating the __ENKRYPT_DEBUG_LOG_CONF__ global variable for debugging configuration, are directly related to the changes in the retrieved PR that also introduce a logging mechanism and utilize the same global variable for logging configuration.

Suggested reviewers

  • NickKelly1
  • gamalielhere
✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

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. (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.

Copy link

github-actions bot commented Feb 7, 2025

💼 Build Files
chrome: enkrypt-chrome-821a834d.zip
firefox: enkrypt-firefox-821a834d.zip

💉 Virus total analysis
chrome: 821a834d
firefox: 821a834d

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: 0

🧹 Nitpick comments (1)
packages/extension/vite.config.ts (1)

123-123: LGTM! Consider adding documentation.

The fs alias to an empty implementation is a good practice for browser extensions.

Consider adding a comment explaining why this alias is needed:

    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url)),
      '@action': fileURLToPath(new URL('./src/ui/action', import.meta.url)),
-      fs: './configs/vite/empty.js',
+      // Provide empty fs implementation for browser environment
+      fs: './configs/vite/empty.js',
    },
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 96832b4 and 821a834.

📒 Files selected for processing (2)
  • packages/extension/configs/vite/empty.js (1 hunks)
  • packages/extension/vite.config.ts (4 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/extension/configs/vite/empty.js
⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: buildAll
  • GitHub Check: test
🔇 Additional comments (3)
packages/extension/vite.config.ts (3)

73-73:

❓ Verification inconclusive

Verify dependency on 'os' module.

The os module polyfill has been added. Please ensure this is required by new dependencies or functionality.

Let's check for usage of the os module:


🏁 Script executed:

#!/bin/bash
# Search for 'os' module usage in the codebase
rg "from ['\"](os|node:os)['\"]" --type ts
rg "require\(['\"]os['\"]\)" --type ts

Length of output: 93


Dependency on 'os' Module: Verify Its Necessity

The os polyfill has been added, but our current search across TypeScript files did not reveal any direct usage of the module (e.g., via from 'os' or require('os')). Please manually verify if this polyfill is truly required by new dependencies or functionality, or if it can be safely removed.

  • Re-check if any new dependency or middleware uses OS-related APIs.
  • Confirm if the inclusion is a remnant of earlier testing or genuinely needed for future code.

35-37:

✅ Verification successful

LGTM! Verify Vite version compatibility.

The skipWebSocketTokenCheck option is correctly added for Vite 6 compatibility.

Let's verify the Vite version in package.json:


🏁 Script executed:

#!/bin/bash
# Check Vite version in package.json
jq '.devDependencies.vite' packages/extension/package.json

Length of output: 67


LGTM: Vite 6 Compatibility Confirmed

The legacy configuration in packages/extension/vite.config.ts introducing skipWebSocketTokenCheck: true is correctly implemented for Vite 6. The package’s devDependencies confirms the use of Vite version "^6.1.0", so no further changes are needed here.


104-104:

❓ Verification inconclusive

Verify bundle size impact.

Setting external: [] means all dependencies will be bundled. This could impact the extension's bundle size.

Since the visualizer plugin is already configured, you can check the bundle size impact after building:


🏁 Script executed:

#!/bin/bash
# Build and check the stats file
npm run build
ls -l stats.html

Length of output: 314


Manual Verification Required for Bundle Size Impact

It appears that the build process couldn’t be executed using npm run build (the build script is missing), which prevented generating the bundle size stats (e.g., the stats.html file). This obscures the immediate impact of setting external: [] in the Rollup options, where all dependencies will be bundled.

  • Issue: No build script is defined in the package (as indicated by the missing script error), so the intended bundle size inspection via the visualizer plugin hasn’t been performed.
  • Action: Please verify that the correct build command is in place (e.g., using vite build or defining the appropriate build script in your package.json) and re-run the bundle analysis. Ensure that bundling all dependencies (i.e., leaving external as an empty array) doesn’t adversely affect your bundle size.

@olgakup
Copy link
Contributor

olgakup commented Feb 18, 2025

Marking it as stale it is already included in the 'devop/release-2.2.2' branch

@olgakup olgakup closed this Feb 18, 2025
@coderabbitai coderabbitai bot mentioned this pull request Feb 26, 2025
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