-
Notifications
You must be signed in to change notification settings - Fork 22
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 spl-token #268
fix spl-token #268
Conversation
概述浏览这个拉取请求主要包含两个关键变更: 变更
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 (
|
Report too large to display inline |
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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
⛔ Files ignored due to path filters (2)
packages/example/yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
yarn.lock
is excluded by!**/yarn.lock
,!**/*.lock
📒 Files selected for processing (2)
package.json
(2 hunks)packages/example/components/chains/solana/example.tsx
(0 hunks)
💤 Files with no reviewable changes (1)
- packages/example/components/chains/solana/example.tsx
🔇 Additional comments (2)
package.json (2)
60-61
: 验证 SPL Token 版本兼容性
@solana/spl-token 的版本是 0.4.9,这是一个较旧的版本。建议升级到最新的稳定版本以获取安全修复和新特性。
同时需要验证 @benfen/bfc.js 与 SPL Token 的兼容性。
51-52
: 🧹 Nitpick (assertive)
建议添加 patch-package 的使用说明
patch-package 用于修补 node_modules 中的依赖包。建议在 README 中说明使用原因和补丁文件位置。
@@ -31,6 +31,7 @@ | |||
"@types/chrome": "^0.0.178", | |||
"@types/jest": "^27.0.2", | |||
"@types/lodash": "^4.14.178", | |||
"@types/lodash-es": "^4.17.12", |
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.
💡 Codebase verification
lodash 和 lodash-es 确实存在重复使用
代码分析显示:
- lodash 被广泛使用,有 34 处导入
- lodash-es 仅在 5 处使用,主要在 core 和 solana/cosmos 相关组件
建议:
- 统一使用 lodash-es,它支持 ES 模块,性能更好
- 移除 lodash 依赖,避免重复
需要修改的文件:
- packages/core/* (已使用 lodash-es)
- packages/example/components/* (需要从 lodash 迁移到 lodash-es)
- packages/providers/* (需要从 lodash 迁移到 lodash-es)
🔗 Analysis chain
需要验证 lodash-es 的必要性
项目中已经包含了 lodash(devDependencies),现在又添加了 lodash-es。这可能会导致重复依赖。
Also applies to: 62-62
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# 检查项目中 lodash 和 lodash-es 的使用情况
echo "检查 lodash 的使用:"
rg "from 'lodash'" -t ts -t tsx
echo "检查 lodash-es 的使用:"
rg "from 'lodash-es'" -t ts -t tsx
Length of output: 222
Script:
#!/bin/bash
# 检查 lodash 和 lodash-es 的导入使用
echo "检查 lodash 的使用:"
rg "from ['\"]lodash['\"]"
echo -e "\n检查 lodash-es 的使用:"
rg "from ['\"]lodash-es['\"]"
echo -e "\n检查 require('lodash') 的使用:"
rg "require\(['\"]lodash['\"]"
echo -e "\n检查 require('lodash-es') 的使用:"
rg "require\(['\"]lodash-es['\"]"
# 检查文件类型
echo -e "\n项目中的 JavaScript/TypeScript 文件:"
fd "\.(js|jsx|ts|tsx)$"
Length of output: 33860
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is protestware?This package is a joke, parody, or includes undocumented or hidden behavior unrelated to its primary function. Consider that consuming this package may come along with functionality unrelated to its primary purpose. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
Summary by CodeRabbit
新特性
依赖更新
@benfen/bfc.js
、@solana/spl-token
和lodash-es
。