-
Notifications
You must be signed in to change notification settings - Fork 37
chore: package namespace #53
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 1 commit
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,6 +1,6 @@ | ||
--- | ||
hero: | ||
title: rc-overflow | ||
title: @rc-component/overflow | ||
description: React Overflow Component | ||
--- | ||
|
||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "rc-overflow", | ||
"version": "1.4.1", | ||
"name": "@rc-component/overflow", | ||
"version": "1.0.0", | ||
"description": "Auto collapse box when overflow", | ||
"keywords": [ | ||
"react", | ||
|
@@ -38,19 +38,19 @@ | |
"prettier": "prettier --write \"**/*.{js,jsx,tsx,ts,less,md,json}\"", | ||
"test": "rc-test", | ||
"test:coverage": "rc-test --coverage", | ||
"prepublishOnly": "npm run compile && np --no-cleanup --yolo --no-publish", | ||
"prepublishOnly": "npm run compile && rc-np", | ||
"lint": "eslint src/ --ext .tsx,.ts", | ||
"lint:tsc": "tsc -p tsconfig.json --noEmit", | ||
"now-build": "npm run docs:build" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime": "^7.11.1", | ||
"classnames": "^2.2.1", | ||
"rc-resize-observer": "^1.0.0", | ||
"rc-util": "^5.37.0" | ||
"@rc-component/resize-observer": "^1.0.0", | ||
"@rc-component/util": "^1.3.0" | ||
}, | ||
"devDependencies": { | ||
"@rc-component/father-plugin": "^1.0.0", | ||
"@rc-component/father-plugin": "^2.0.2", | ||
"@rc-component/np": "^1.0.4", | ||
"@testing-library/jest-dom": "^5.16.4", | ||
"@testing-library/react": "^12.0.0", | ||
"@types/classnames": "^2.2.9", | ||
|
@@ -68,7 +68,6 @@ | |
"eslint": "^7.0.0", | ||
"father": "^4.0.0", | ||
"less": "^3.10.3", | ||
"np": "^7.0.0", | ||
"prettier": "^2.0.5", | ||
"rc-test": "^7.0", | ||
"react": "^16.0.0", | ||
|
@@ -77,8 +76,8 @@ | |
"typescript": "^5.0.0" | ||
}, | ||
"peerDependencies": { | ||
"react": ">=16.9.0", | ||
"react-dom": ">=16.9.0" | ||
"react": ">=18.0.0", | ||
"react-dom": ">=18.0.0" | ||
Comment on lines
+76
to
+77
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. Peer 要求 React>=18,但 devDependencies 仍为 React 16:版本不一致会导致本地/CI 构建与测试失配
参考补丁(最小对齐,版本号可按你们实际约束调整): "devDependencies": {
- "@testing-library/jest-dom": "^5.16.4",
- "@testing-library/react": "^12.0.0",
- "@types/react": "^16.14.2",
- "@types/react-dom": "^16.9.10",
+ "@testing-library/jest-dom": "^6.0.0",
+ "@testing-library/react": "^14.0.0",
+ "@types/react": "^18.0.0",
+ "@types/react-dom": "^18.0.0",
- "enzyme": "^3.0.0",
- "enzyme-adapter-react-16": "^1.0.1",
- "enzyme-to-json": "^3.4.0",
+ // 如仍保留 enzyme,请明确兼容策略;更建议移除并统一使用 RTL
- "react": "^16.0.0",
- "react-dom": "^16.0.0",
+ "react": "^18.0.0",
+ "react-dom": "^18.0.0", 若短期无法迁移测试,可临时放宽 peer 到
🤖 Prompt for AI Agents
|
||
}, | ||
"overrides": { | ||
"cheerio": "1.0.0-rc.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.
Bumping the
peerDependencies
to require React 18 is a major breaking change. However, the project'sdevDependencies
have not been updated accordingly. For instance,react
is still^16.0.0
, andenzyme-adapter-react-16
is used, while Enzyme doesn't have a stable adapter for React 18. This inconsistency will cause issues with the local development setup and testing. To ensure the project is buildable and testable,devDependencies
should be updated to be compatible with React 18.