-
-
Notifications
You must be signed in to change notification settings - Fork 48
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: replace github-contributors-lists plugin #257
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import ContributorsList from '@qixian.cs/github-contributors-list'; | ||
import { createStyles } from 'antd-style'; | ||
import classNames from 'classnames'; | ||
import { useIntl } from 'dumi'; | ||
import ContributorsList from 'github-contributors-lists'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个是直接前端请求 github api,会被限流吧? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 不如等 @chenshuai2144 修复 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
import React, { useContext } from 'react'; | ||
|
||
import SiteContext from '../SiteContext'; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -109,7 +109,7 @@ | |
"@microflash/rehype-figure": "^2.1.1", | ||
"@npmcli/run-script": "^9.0.1", | ||
"@octokit/rest": "^21.0.2", | ||
"@qixian.cs/github-contributors-list": "^2.0.2", | ||
"github-contributors-lists": "^1.0.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification 不建议使用 github-contributors-lists 依赖包 基于验证结果,发现以下严重问题:
建议:
🔗 Analysis chain请验证新依赖包的可靠性和兼容性 关于将
Let me verify the package usage in the codebase before making the final response. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# 检查新包的发布时间、下载量和最新版本
echo "检查 github-contributors-lists 包的基本信息:"
curl -s https://api.npms.io/v2/package/github-contributors-lists | jq '{
"最后发布时间": .collected.metadata.date,
"周下载量": .collected.npm.downloads[0].count,
"最新版本": .collected.metadata.version,
"维护者数量": (.collected.metadata.maintainers | length)
}'
# 检查是否存在已知的安全漏洞
echo -e "\n检查安全漏洞:"
gh api graphql -f query='
{
securityVulnerabilities(first: 5, ecosystem: NPM, package: "github-contributors-lists") {
nodes {
advisory {
summary
severity
publishedAt
}
vulnerableVersionRange
}
}
}'
Length of output: 746 Script: #!/bin/bash
# 检查当前包的使用情况
echo "在代码库中搜索 github-contributors-lists 的使用:"
rg -l "github-contributors-lists" --type js --type ts --type jsx --type tsx
echo -e "\n检查原包 @qixian.cs/github-contributors-list 的使用:"
rg -l "@qixian.cs/github-contributors-list" --type js --type ts --type jsx --type tsx
# 检查 package-lock.json 中的相关信息
echo -e "\n检查 package-lock.json 中的包信息:"
if [ -f "package-lock.json" ]; then
jq '.dependencies["github-contributors-lists"] // .packages["node_modules/github-contributors-lists"]' package-lock.json
fi
Length of output: 513 Script: #!/bin/bash
# 修正文件类型并重新搜索
echo "在代码库中搜索 github-contributors-lists 的使用:"
rg -l "github-contributors-lists"
echo -e "\n检查原包 @qixian.cs/github-contributors-list 的使用:"
rg -l "@qixian.cs/github-contributors-list"
# 检查 package.json 中的相关信息
echo -e "\n检查 package.json 中的依赖配置:"
if [ -f "package.json" ]; then
jq '.dependencies["github-contributors-lists"], .dependencies["@qixian.cs/github-contributors-list"]' package.json
fi
# 检查是否有相关的文档或配置
echo -e "\n搜索相关配置文件:"
fd -g "*contributors*" -t f
Length of output: 565 |
||
"@rc-component/father-plugin": "1.2.0-alpha.0", | ||
"@rc-component/trigger": "^2.2.3", | ||
"@size-limit/file": "^11.1.5", | ||
|
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
需要添加
github-contributors-lists
包到项目依赖中package.json 中缺少
github-contributors-lists
依赖,但代码中已经在使用这个包。这可能会导致构建失败或运行时错误。请:npm install github-contributors-lists --save
或yarn add github-contributors-lists
添加依赖^1.0.3
(根据之前的搜索结果)🔗 Analysis chain
请验证新包的兼容性和稳定性
新引入的
github-contributors-lists
包替换了原有的@qixian.cs/github-contributors-list
,建议进行以下验证:🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 160
Script:
Length of output: 2044