chore(deps): copy-to-clipboard 4, vite-plugin-svgr 5, @shadcn/react 0.3.1

copy-to-clipboard 4 returns Promise<boolean> instead of boolean, so
CopyButton's handleCopy awaits it. Without the await the success branch
always ran, since a Promise is always truthy. Awaiting also routes a
rejected copy into the existing catch.

vite-plugin-svgr 5 and @shadcn/react 0.3.1 needed no source changes.

598 tests pass, build clean, lint unchanged.
This commit is contained in:
Alex committed 2026-09-12 19:26:20 +01:00
1 parent 08a2c038bc
commit cf1c9d542d
3 files changed
+20 -29

No files matched your search

+15 -24
View File
@@ -13,12 +13,12 @@
"@radix-ui/react-switch": "^1.3.7",
"@radix-ui/react-tabs": "^1.1.21",
"@reduxjs/toolkit": "^2.12.0",
"@shadcn/react": "0.3.0",
"@shadcn/react": "^0.3.1",
"chart.js": "^4.5.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"copy-to-clipboard": "^3.3.3",
"copy-to-clipboard": "^4.0.2",
"d3-force": "^3.0.0",
"date-fns": "^4.4.0",
"i18next": "^26.4.2",
@@ -74,7 +74,7 @@
"tw-animate-css": "^1.4.0",
"typescript": "^6.0.3",
"vite": "^8.3.0",
"vite-plugin-svgr": "^4.5.0",
"vite-plugin-svgr": "^5.2.0",
"vitest": "^4.1.11"
},
"engines": {
@@ -2736,9 +2736,9 @@
"license": "MIT"
},
"node_modules/@shadcn/react": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/@shadcn/react/-/react-0.3.0.tgz",
"integrity": "sha512-iKN0NuYe850VDHlxEfvppFrpa7CMV3zArTHusXlaSmeFeQhohGbIqclv6WwPTs/44I8EkXQpcuRt6sXEVKkWqQ==",
"version": "0.3.1",
"resolved": "https://registry.npmjs.org/@shadcn/react/-/react-0.3.1.tgz",
"integrity": "sha512-2gOR0HDMtWeRsCZfNDaU0YDFdgH3zsDQ6lz67Fv/y/qjY9y+R8kJqAn6q56phqv7/zHi0wqURjntrNO9zL7vnQ==",
"license": "MIT",
"peerDependencies": {
"@types/react": ">=19",
@@ -4813,13 +4813,10 @@
}
},
"node_modules/copy-to-clipboard": {
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.3.3.tgz",
"integrity": "sha512-2KV8NhB5JqC3ky0r9PMCAZKbUHSwtEo4CwCs0KXgruG43gX5PMqDEBbVU4OUzw2MuAWUfsuFmWvEKG5QRfSnJA==",
"license": "MIT",
"dependencies": {
"toggle-selection": "^1.0.6"
}
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-4.0.2.tgz",
"integrity": "sha512-gklSft7IuhriZKHKpuoA1fpJSLPNgvUMWMo5BlnzAJm0zNKnznoSv23IjtNqclx8eKi6ZcdvFFzYEER/+U1LoQ==",
"license": "MIT"
},
"node_modules/cose-base": {
"version": "1.0.3",
@@ -11514,12 +11511,6 @@
"node": ">=14.0.0"
}
},
"node_modules/toggle-selection": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
"integrity": "sha512-BiZS+C1OS8g/q2RRbJmy59xpyghNBqrr6k5L/uKBGRsTfxmu3ffiRnd8mlGPUVayg8pvfi5urfnu8TU7DVOkLQ==",
"license": "MIT"
},
"node_modules/trim-lines": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/trim-lines/-/trim-lines-3.0.1.tgz",
@@ -12087,18 +12078,18 @@
}
},
"node_modules/vite-plugin-svgr": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/vite-plugin-svgr/-/vite-plugin-svgr-4.5.0.tgz",
"integrity": "sha512-W+uoSpmVkSmNOGPSsDCWVW/DDAyv+9fap9AZXBvWiQqrboJ08j2vh0tFxTD/LjwqwAd3yYSVJgm54S/1GhbdnA==",
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/vite-plugin-svgr/-/vite-plugin-svgr-5.2.0.tgz",
"integrity": "sha512-qj2eAKF8C6PZWemVTvQA0xgQIcP1hHU6Buh7fl6BhvayWwnuxE+z417miKxeDvRWbDrupQ1oK99hfxElopJ3sQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"@rollup/pluginutils": "^5.2.0",
"@rollup/pluginutils": "^5.3.0",
"@svgr/core": "^8.1.0",
"@svgr/plugin-jsx": "^8.1.0"
},
"peerDependencies": {
"vite": ">=2.6.0"
"vite": ">=3.0.0"
}
},
"node_modules/vite/node_modules/lightningcss": {
+3 -3
View File
@@ -29,12 +29,12 @@
"@radix-ui/react-switch": "^1.3.7",
"@radix-ui/react-tabs": "^1.1.21",
"@reduxjs/toolkit": "^2.12.0",
"@shadcn/react": "0.3.0",
"@shadcn/react": "^0.3.1",
"chart.js": "^4.5.1",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"copy-to-clipboard": "^3.3.3",
"copy-to-clipboard": "^4.0.2",
"d3-force": "^3.0.0",
"date-fns": "^4.4.0",
"i18next": "^26.4.2",
@@ -90,7 +90,7 @@
"tw-animate-css": "^1.4.0",
"typescript": "^6.0.3",
"vite": "^8.3.0",
"vite-plugin-svgr": "^4.5.0",
"vite-plugin-svgr": "^5.2.0",
"vitest": "^4.1.11"
}
}
+2 -2
View File
@@ -71,11 +71,11 @@ export default function CopyButton({
? t('conversation.copied')
: t('conversation.copy');
const handleCopy = useCallback(() => {
const handleCopy = useCallback(async () => {
if (isCopied) return;
try {
const success = copy(textToCopy);
const success = await copy(textToCopy);
if (success) {
setIsCopied(true);