-
Notifications
You must be signed in to change notification settings - Fork 63
chore: migrate to @rc-component namespace and update #198
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
Changes from all commits
258280c
bec22f4
d093fa4
602df52
b2e42f1
8b4088c
749d002
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,53 +1,52 @@ | ||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||
| "name": "rc-rate", | ||||||||||||||||||||||||||||||||||
| "version": "2.13.1", | ||||||||||||||||||||||||||||||||||
| "name": "@rc-component/rate", | ||||||||||||||||||||||||||||||||||
| "version": "1.0.0", | ||||||||||||||||||||||||||||||||||
| "description": "React Star Rate Component", | ||||||||||||||||||||||||||||||||||
| "engines": { | ||||||||||||||||||||||||||||||||||
| "node": ">=8.x" | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| "keywords": [ | ||||||||||||||||||||||||||||||||||
| "react", | ||||||||||||||||||||||||||||||||||
| "react-component", | ||||||||||||||||||||||||||||||||||
| "react-rate", | ||||||||||||||||||||||||||||||||||
| "rate" | ||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||
| "homepage": "https://github.com/react-component/rate", | ||||||||||||||||||||||||||||||||||
| "bugs": { | ||||||||||||||||||||||||||||||||||
| "url": "https://github.com/react-component/rate/issues" | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| "repository": { | ||||||||||||||||||||||||||||||||||
| "type": "git", | ||||||||||||||||||||||||||||||||||
| "url": "https://github.com/react-component/rate.git" | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| "bugs": { | ||||||||||||||||||||||||||||||||||
| "url": "https://github.com/react-component/rate/issues" | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| "license": "MIT", | ||||||||||||||||||||||||||||||||||
| "main": "./lib/index", | ||||||||||||||||||||||||||||||||||
| "module": "./es/index", | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+20
to
+21
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. 🛠️ Refactor suggestion 缺少 types 字段,TypeScript 消费者可能无法获得类型入口 既然通过 father 输出 "main": "./lib/index",
"module": "./es/index",
+ "types": "./es/index.d.ts",📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| "files": [ | ||||||||||||||||||||||||||||||||||
| "lib", | ||||||||||||||||||||||||||||||||||
| "es", | ||||||||||||||||||||||||||||||||||
| "assets/*.css" | ||||||||||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||||||||||
| "license": "MIT", | ||||||||||||||||||||||||||||||||||
| "main": "./lib/index", | ||||||||||||||||||||||||||||||||||
| "module": "./es/index", | ||||||||||||||||||||||||||||||||||
| "scripts": { | ||||||||||||||||||||||||||||||||||
| "start": "dumi dev", | ||||||||||||||||||||||||||||||||||
| "compile": "father build && lessc assets/index.less assets/index.css", | ||||||||||||||||||||||||||||||||||
| "coverage": "rc-test --coverage", | ||||||||||||||||||||||||||||||||||
| "docs:build": "dumi build", | ||||||||||||||||||||||||||||||||||
| "docs:deploy": "gh-pages -d .doc", | ||||||||||||||||||||||||||||||||||
| "compile": "father build && lessc assets/index.less assets/index.css", | ||||||||||||||||||||||||||||||||||
| "prepare": "dumi setup", | ||||||||||||||||||||||||||||||||||
| "prepublishOnly": "npm run compile && np --yolo --no-publish", | ||||||||||||||||||||||||||||||||||
| "postpublish": "npm run docs:build && npm run docs:deploy", | ||||||||||||||||||||||||||||||||||
| "lint": "eslint src/ --ext .ts,.tsx,.jsx,.js,.md", | ||||||||||||||||||||||||||||||||||
| "now-build": "npm run docs:build", | ||||||||||||||||||||||||||||||||||
| "prepare": "dumi setup", | ||||||||||||||||||||||||||||||||||
| "prepublishOnly": "npm run compile && rc-np", | ||||||||||||||||||||||||||||||||||
| "prettier": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"", | ||||||||||||||||||||||||||||||||||
| "postpublish": "npm run docs:build && npm run docs:deploy", | ||||||||||||||||||||||||||||||||||
| "start": "dumi dev", | ||||||||||||||||||||||||||||||||||
| "test": "rc-test", | ||||||||||||||||||||||||||||||||||
| "coverage": "rc-test --coverage", | ||||||||||||||||||||||||||||||||||
| "now-build": "npm run docs:build" | ||||||||||||||||||||||||||||||||||
| "tsc": "bunx tsc --noEmit" | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+28
to
41
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. 构建/发布脚本存在两点风险:bunx 依赖外部环境;now-build 与 now.json 不匹配
建议修改: - "now-build": "npm run docs:build",
+ "now-build": "npm run docs:build", // 若采用 now.json 方案 A;否则参考 now.json 方案 B
@@
- "tsc": "bunx tsc --noEmit"
+ "tsc": "tsc --noEmit"如果仓库目前未安装 TypeScript 的可执行文件,请确保
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| "dependencies": { | ||||||||||||||||||||||||||||||||||
| "@babel/runtime": "^7.10.1", | ||||||||||||||||||||||||||||||||||
| "classnames": "^2.2.5", | ||||||||||||||||||||||||||||||||||
| "rc-util": "^5.0.1" | ||||||||||||||||||||||||||||||||||
| "@rc-component/util": "^1.3.0", | ||||||||||||||||||||||||||||||||||
| "classnames": "^2.2.5" | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| "devDependencies": { | ||||||||||||||||||||||||||||||||||
| "@rc-component/father-plugin": "^1.0.0", | ||||||||||||||||||||||||||||||||||
| "@rc-component/father-plugin": "^2.1.3", | ||||||||||||||||||||||||||||||||||
| "@rc-component/np": "^1.0.0", | ||||||||||||||||||||||||||||||||||
| "@rc-component/tooltip": "^1.2.1", | ||||||||||||||||||||||||||||||||||
| "@types/classnames": "^2.2.9", | ||||||||||||||||||||||||||||||||||
| "@types/jest": "^29.5.1", | ||||||||||||||||||||||||||||||||||
| "@types/react": "^17.0.15", | ||||||||||||||||||||||||||||||||||
|
|
@@ -63,15 +62,16 @@ | |||||||||||||||||||||||||||||||||
| "father": "^4.0.0", | ||||||||||||||||||||||||||||||||||
| "gh-pages": "^3.1.0", | ||||||||||||||||||||||||||||||||||
| "less": "^3.0.0", | ||||||||||||||||||||||||||||||||||
| "np": "^7.0.0", | ||||||||||||||||||||||||||||||||||
| "rc-test": "^7.0.15", | ||||||||||||||||||||||||||||||||||
| "rc-tooltip": "^5.0.1", | ||||||||||||||||||||||||||||||||||
| "react": "^16.0.0", | ||||||||||||||||||||||||||||||||||
| "react-dom": "^16.0.0", | ||||||||||||||||||||||||||||||||||
| "typescript": "^5.0.4" | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
| "peerDependencies": { | ||||||||||||||||||||||||||||||||||
| "react": ">=16.9.0", | ||||||||||||||||||||||||||||||||||
| "react-dom": ">=16.9.0" | ||||||||||||||||||||||||||||||||||
| }, | ||||||||||||||||||||||||||||||||||
|
Comment on lines
66
to
+73
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. peerDependencies 与本地 dev React 版本不匹配 peer 要求 建议至少对齐到 16.14(React 16 的最后一个小版本): - "react": "^16.0.0",
- "react-dom": "^16.0.0",
+ "react": "^16.14.0",
+ "react-dom": "^16.14.0",或直接提升到更高的 LTS 支持版本(若项目策略允许)。 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| "engines": { | ||||||||||||||||||||||||||||||||||
| "node": ">=8.x" | ||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
|
Comment on lines
+74
to
76
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. 🛠️ Refactor suggestion engines 声明过低(>=8.x),与现有工具链不兼容并且已 EOL Node 8 早已 EOL,且与 推荐: - "engines": {
- "node": ">=8.x"
- }
+ "engines": {
+ "node": ">=16.14"
+ }并在 CI 中同步调整 Node 版本矩阵。 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.