-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
deps(ui): Upgrade color v5 #102887
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
deps(ui): Upgrade color v5 #102887
Conversation
The package is esm and drops a few weird dependencies it had like is-arrayish and simple-swizzle
| "@tanstack/react-query-devtools": "5.85.0", | ||
| "@tanstack/react-query-persist-client": "5.85.0", | ||
| "@tanstack/react-virtual": "^3.13.6", | ||
| "@types/color": "^3.0.3", | ||
| "@types/diff": "5.2.1", | ||
| "@types/gtag.js": "^0.0.12", | ||
| "@types/history": "^3.2.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.
Bug: color package v5 removes opaquer(), but code still calls it, leading to a TypeError.
Severity: CRITICAL | Confidence: 1.00
🔍 Detailed Analysis
The color package was upgraded to v5.0.2, which removed the opaquer() method. Existing code in static/app/utils/theme/theme.tsx and static/app/utils/theme/theme.chonk.tsx continues to call color(...).opaquer(1.0).string(). This will result in a TypeError: color(...).opaquer is not a function during application initialization, preventing the UI from loading.
💡 Suggested Fix
Replace all calls to color(...).opaquer(value) with color(...).alpha(value) to align with the color v5 API.
🤖 Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: package.json#L83-L88
Potential issue: The `color` package was upgraded to v5.0.2, which removed the
`opaquer()` method. Existing code in `static/app/utils/theme/theme.tsx` and
`static/app/utils/theme/theme.chonk.tsx` continues to call
`color(...).opaquer(1.0).string()`. This will result in a `TypeError: color(...).opaquer
is not a function` during application initialization, preventing the UI from loading.
Did we get this right? 👍 / 👎 to inform future reviews.
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.
it does WHAT
The package is now esm only and drops a few weird sub-dependencies it had like `is-arrayish` and `simple-swizzle`
The package is now esm only and drops a few weird sub-dependencies it had like `is-arrayish` and `simple-swizzle`
The package is now esm only and drops a few weird sub-dependencies it had like `is-arrayish` and `simple-swizzle`
The package is now esm only and drops a few weird sub-dependencies it had like
is-arrayishandsimple-swizzle