From 239711d3fa08514402e481be091d4a842423b89d Mon Sep 17 00:00:00 2001 From: Sean Barag Date: Wed, 20 Sep 2023 10:56:03 -0700 Subject: [PATCH] deps: upgrade recharts and use es6 import --- packages/ui-components/package.json | 2 +- .../ui-components/src/Charts/barChart.tsx | 2 +- packages/ui-components/tsconfig.json | 3 + pnpm-lock.yaml | 125 +++++++++++++----- 4 files changed, 99 insertions(+), 33 deletions(-) diff --git a/packages/ui-components/package.json b/packages/ui-components/package.json index 1469c42ba..65e40c6e7 100644 --- a/packages/ui-components/package.json +++ b/packages/ui-components/package.json @@ -32,7 +32,7 @@ "lodash": "^4.17.21", "react-lines-ellipsis": "^0.15.0", "react-popper": "^2.2.5", - "recharts": "^2.1.12" + "recharts": "^2.8.0" }, "devDependencies": { "@babel/cli": "7.21.0", diff --git a/packages/ui-components/src/Charts/barChart.tsx b/packages/ui-components/src/Charts/barChart.tsx index a31e03ed9..6c4c5ba01 100644 --- a/packages/ui-components/src/Charts/barChart.tsx +++ b/packages/ui-components/src/Charts/barChart.tsx @@ -9,7 +9,7 @@ import { Legend, ResponsiveContainer, Cell, -} from "recharts"; +} from "recharts/es6"; import { Margin } from "recharts/types/util/types"; import { ColorCoreNeutral0 } from "@cockroachlabs/design-tokens"; diff --git a/packages/ui-components/tsconfig.json b/packages/ui-components/tsconfig.json index 1f87aa23b..b4d4f4153 100644 --- a/packages/ui-components/tsconfig.json +++ b/packages/ui-components/tsconfig.json @@ -12,6 +12,9 @@ "target": "es6", "skipLibCheck": true, "sourceMap": false, + "paths": { + "recharts/es6": ["./node_modules/recharts"], + } }, "exclude": [ "node_modules", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 75b9ac68d..92b0ad278 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -162,8 +162,8 @@ importers: specifier: ^2.2.5 version: 2.3.0(@popperjs/core@2.11.5)(react-dom@17.0.2)(react@17.0.2) recharts: - specifier: ^2.1.12 - version: 2.1.13(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2) + specifier: ^2.8.0 + version: 2.8.0(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2) devDependencies: '@babel/cli': specifier: 7.21.0 @@ -4179,7 +4179,6 @@ packages: engines: {node: '>=6.9.0'} dependencies: regenerator-runtime: 0.14.0 - dev: true /@babel/runtime@7.22.5: resolution: {integrity: sha512-ecjvYlnAaZ/KVneE/OdKYBYfgXV3Ptu6zQWmgEF7vwKhQnvVS6bjMD2XYgj+SNvQ1GfK/pjgokfPkC/2CO8CuA==} @@ -4281,7 +4280,7 @@ packages: resolution: {integrity: sha512-m4HEDZleaaCH+XgDDsPF15Ht6wTLsgDTeR3WYj9Q/k76JtWhrJjcP4+/XlG8LGT/Rol9qUfOIztXeA84ATpqPQ==} dependencies: '@babel/helper-module-imports': 7.22.5 - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 '@emotion/hash': 0.9.1 '@emotion/memoize': 0.8.1 '@emotion/serialize': 1.1.2 @@ -4320,7 +4319,7 @@ packages: '@types/react': optional: true dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 '@emotion/babel-plugin': 11.11.0 '@emotion/cache': 11.11.0 '@emotion/serialize': 1.1.2 @@ -7278,7 +7277,7 @@ packages: engines: {node: '>=12'} dependencies: '@babel/code-frame': 7.22.5 - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 '@types/aria-query': 4.2.2 aria-query: 5.0.0 chalk: 4.1.2 @@ -7410,9 +7409,32 @@ packages: '@types/node': 20.6.0 dev: true + /@types/d3-array@3.0.7: + resolution: {integrity: sha512-4/Q0FckQ8TBjsB0VdGFemJOG8BLXUB2KKlL0VmZ+eOYeOnTb/wDRQqYWpBmQ6IlvWkXwkYiot+n9Px2aTJ7zGQ==} + dev: false + + /@types/d3-color@3.1.0: + resolution: {integrity: sha512-HKuicPHJuvPgCD+np6Se9MQvS6OCbJmOjGvylzMJRlDwUXjKTTXs6Pwgk79O09Vj/ho3u1ofXnhFOaEWWPrlwA==} + dev: false + + /@types/d3-ease@3.0.0: + resolution: {integrity: sha512-aMo4eaAOijJjA6uU+GIeW018dvy9+oH5Y2VPPzjjfxevvGQ/oRDs+tfYC9b50Q4BygRR8yE2QCLsrT0WtAVseA==} + dev: false + + /@types/d3-interpolate@3.0.1: + resolution: {integrity: sha512-jx5leotSeac3jr0RePOH1KdR9rISG91QIE4Q2PYTu4OymLTZfA3SrnURSLzKH48HmXVUru50b8nje4E79oQSQw==} + dependencies: + '@types/d3-color': 3.1.0 + dev: false + /@types/d3-path@1.0.9: resolution: {integrity: sha512-NaIeSIBiFgSC6IGUBjZWcscUJEq7vpVu7KthHN8eieTV9d9MqkSOZLH4chq1PmcKy06PNe3axLeKmRIyxJ+PZQ==} - dev: true + + /@types/d3-scale@4.0.4: + resolution: {integrity: sha512-eq1ZeTj0yr72L8MQk6N6heP603ubnywSDRfNpi5enouR112HzGLS6RIvExCzZTraFF4HdzNpJMwA/zGiMoHUUw==} + dependencies: + '@types/d3-time': 3.0.0 + dev: false /@types/d3-shape@1.3.8: resolution: {integrity: sha512-gqfnMz6Fd5H6GOLYixOZP/xlrMtJms9BaS+6oWxTKHNqPGZ93BkWWupQSCYm6YHqx6h9wjRupuJb90bun6ZaYg==} @@ -7420,6 +7442,20 @@ packages: '@types/d3-path': 1.0.9 dev: true + /@types/d3-shape@3.1.2: + resolution: {integrity: sha512-NN4CXr3qeOUNyK5WasVUV8NCSAx/CRVcwcb0BuuS1PiTqwIm6ABi1SyasLZ/vsVCFDArF+W4QiGzSry1eKYQ7w==} + dependencies: + '@types/d3-path': 1.0.9 + dev: false + + /@types/d3-time@3.0.0: + resolution: {integrity: sha512-sZLCdHvBUcNby1cB6Fd3ZBrABbjz3v1Vm90nysCQ6Vt7vd6e/h9Lt7SiJUoEX0l4Dzc7P5llKyhqSi1ycSf1Hg==} + dev: false + + /@types/d3-timer@3.0.0: + resolution: {integrity: sha512-HNB/9GHqu7Fo8AQiugyJbv6ZxYz58wef0esl4Mv828w1ZKpAshw/uFWVDUcIB9KKFeFKoxS3cHY07FFgtTRZ1g==} + dev: false + /@types/detect-port@1.3.3: resolution: {integrity: sha512-bV/jQlAJ/nPY3XqSatkGpu+nGzou+uSwrH1cROhn+jBFg47yaNH+blW4C7p9KhopC7QxCv/6M86s37k8dMk0Yg==} dev: true @@ -8590,7 +8626,7 @@ packages: loader-utils: 2.0.4 make-dir: 3.1.0 schema-utils: 2.7.1 - webpack: 5.75.0(webpack-cli@4.10.0) + webpack: 5.75.0(esbuild@0.17.19) dev: true /babel-loader@9.1.2(@babel/core@7.22.5)(webpack@5.86.0): @@ -8637,7 +8673,7 @@ packages: resolution: {integrity: sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg==} engines: {node: '>=10', npm: '>=6'} dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 cosmiconfig: 7.1.0 resolve: 1.22.2 dev: true @@ -9833,6 +9869,11 @@ packages: engines: {node: '>=12'} dev: false + /d3-ease@3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + dev: false + /d3-format@3.1.0: resolution: {integrity: sha512-YyUI6AEuY/Wpt8KWLgZHsIU86atmikuoOmCfommt0LYHiQSPjvX2AcFc38PX0CBpr2RCyZhjex+NS/LPOv6YqA==} engines: {node: '>=12'} @@ -9882,6 +9923,11 @@ packages: d3-array: 3.2.0 dev: false + /d3-timer@3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + dev: false + /dargs@7.0.0: resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} engines: {node: '>=8'} @@ -10121,13 +10167,13 @@ packages: /dom-helpers@3.4.0: resolution: {integrity: sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==} dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 dev: false /dom-helpers@5.2.1: resolution: {integrity: sha512-nRCa7CK3VTrM2NmGkIy4cbK7IZlgBE/PYMn55rrXefr5xXDP0LdtfPnblFDoVdcAfslJ7or6iqAUnx0CCGIWQA==} dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 csstype: 3.1.0 dev: true @@ -10822,8 +10868,9 @@ packages: /fast-diff@1.2.0: resolution: {integrity: sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==} - /fast-equals@2.0.4: - resolution: {integrity: sha512-caj/ZmjHljPrZtbzJ3kfH5ia/k4mTJe/qSiXAGzxZWRZgsgDV0cvNaQULqUX8t0/JVlzzEdYOwCN5DmzTxoD4w==} + /fast-equals@5.0.1: + resolution: {integrity: sha512-WF1Wi8PwwSY7/6Kx0vKXtw8RwuSGoM1bvDaJbu7MxDlR1vovZjIAKrnzyrThgAjm6JDTu0fVgWXDlMGspodfoQ==} + engines: {node: '>=6.0.0'} dev: false /fast-glob@3.2.7: @@ -14522,7 +14569,7 @@ packages: resolution: {integrity: sha512-Sz2Lkdxz6F2Pgnpi9U5Ng/WdWAUZxmHrNPoVlm3aAemxoy2Qy7LGjQg4uf8qKelDAUW94F4np3iH2YPf2qefcQ==} engines: {node: '>=10'} dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 dev: true /postcss-modules-extract-imports@3.0.0(postcss@8.4.24): @@ -14886,7 +14933,7 @@ packages: dependencies: '@babel/core': 7.22.5 '@babel/generator': 7.22.5 - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 ast-types: 0.14.2 commander: 2.20.3 doctrine: 3.0.0 @@ -15025,8 +15072,8 @@ packages: use-sidecar: 1.1.2(react@17.0.2) dev: true - /react-resize-detector@7.1.2(react-dom@17.0.2)(react@17.0.2): - resolution: {integrity: sha512-zXnPJ2m8+6oq9Nn8zsep/orts9vQv3elrpA+R8XTcW7DVVUJ9vwDwMXaBtykAYjMnkCIaOoK9vObyR7ZgFNlOw==} + /react-resize-detector@8.1.0(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-S7szxlaIuiy5UqLhLL1KY3aoyGHbZzsTpYal9eYMwCyKqoqoVLCmIgAgNyIM1FhnP2KyBygASJxdhejrzjMb+w==} peerDependencies: react: ^16.0.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 @@ -15042,7 +15089,7 @@ packages: react: ^16.8.0 || ^17.0.0 || ^18.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 '@emotion/cache': 11.11.0 '@emotion/react': 11.11.1(react@17.0.2) '@floating-ui/dom': 1.2.9 @@ -15057,14 +15104,14 @@ packages: - '@types/react' dev: true - /react-smooth@2.0.1(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2): - resolution: {integrity: sha512-Own9TA0GPPf3as4vSwFhDouVfXP15ie/wIHklhyKBH5AN6NFtdk0UpHBnonV11BtqDkAWlt40MOUc+5srmW7NA==} + /react-smooth@2.0.4(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-OkFsrrMBTvQUwEJthE1KXSOj79z57yvEWeFefeXPib+RmQEI9B1Ub1PgzlzzUyBOvl/TjXt5nF2hmD4NsgAh8A==} peerDependencies: prop-types: ^15.6.0 react: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 react-dom: ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0 dependencies: - fast-equals: 2.0.4 + fast-equals: 5.0.1 prop-types: 15.8.1 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) @@ -15107,7 +15154,7 @@ packages: react: '>=16.6.0' react-dom: '>=16.6.0' dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 dom-helpers: 5.2.1 loose-envify: 1.4.0 prop-types: 15.8.1 @@ -15243,8 +15290,8 @@ packages: decimal.js-light: 2.5.1 dev: false - /recharts@2.1.13(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2): - resolution: {integrity: sha512-9VWu2nzExmfiMFDHKqRFhYlJVmjzQGVKH5rBetXR4EuyEXuu3Y6cVxQuNEdusHhbm4SoPPrVDCwlBdREL3sQPA==} + /recharts@2.8.0(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-nciXqQDh3aW8abhwUlA4EBOBusRHLNiKHfpRZiG/yjups1x+auHb2zWPuEcTn/IMiN47vVMMuF8Sr+vcQJtsmw==} engines: {node: '>=12'} peerDependencies: prop-types: ^15.6.0 @@ -15252,19 +15299,17 @@ packages: react-dom: ^16.0.0 || ^17.0.0 || ^18.0.0 dependencies: classnames: 2.3.2 - d3-interpolate: 3.0.1 - d3-scale: 4.0.2 - d3-shape: 3.1.0 eventemitter3: 4.0.7 lodash: 4.17.21 prop-types: 15.8.1 react: 17.0.2 react-dom: 17.0.2(react@17.0.2) react-is: 16.13.1 - react-resize-detector: 7.1.2(react-dom@17.0.2)(react@17.0.2) - react-smooth: 2.0.1(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2) + react-resize-detector: 8.1.0(react-dom@17.0.2)(react@17.0.2) + react-smooth: 2.0.4(prop-types@15.8.1)(react-dom@17.0.2)(react@17.0.2) recharts-scale: 0.4.5 reduce-css-calc: 2.1.8 + victory-vendor: 36.6.11 dev: false /rechoir@0.6.2: @@ -15317,12 +15362,11 @@ packages: /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} - dev: true /regenerator-transform@0.15.1: resolution: {integrity: sha512-knzmNAcuyxV+gQCufkYcvOqX/qIIfHLv0u5x79kRxuGojfYVky1f15TzZEu2Avte8QGepvUNTnLskf8E6X6Vyg==} dependencies: - '@babel/runtime': 7.22.5 + '@babel/runtime': 7.22.15 dev: true /regexp.prototype.flags@1.4.3: @@ -17094,6 +17138,25 @@ packages: engines: {node: '>= 0.8'} dev: true + /victory-vendor@36.6.11: + resolution: {integrity: sha512-nT8kCiJp8dQh8g991J/R5w5eE2KnO8EAIP0xocWlh9l2okngMWglOPoMZzJvek8Q1KUc4XE/mJxTZnvOB1sTYg==} + dependencies: + '@types/d3-array': 3.0.7 + '@types/d3-ease': 3.0.0 + '@types/d3-interpolate': 3.0.1 + '@types/d3-scale': 4.0.4 + '@types/d3-shape': 3.1.2 + '@types/d3-time': 3.0.0 + '@types/d3-timer': 3.0.0 + d3-array: 3.2.0 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-scale: 4.0.2 + d3-shape: 3.1.0 + d3-time: 3.0.0 + d3-timer: 3.0.1 + dev: false + /w3c-xmlserializer@3.0.0: resolution: {integrity: sha512-3WFqGEgSXIyGhOmAFtlicJNMjEps8b1MG31NCA0/vOF9+nKMUW1ckhi9cnNHmf88Rzw5V+dwIwsm2C7X8k9aQg==} engines: {node: '>=12'}