diff --git a/.changeset/long-flies-hang.md b/.changeset/long-flies-hang.md new file mode 100644 index 0000000..907ee2f --- /dev/null +++ b/.changeset/long-flies-hang.md @@ -0,0 +1,5 @@ +--- +"react-view": patch +--- + +Updated react-tiny-popover to use React 17 and 18 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ba52570..259eaf9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -5,19 +5,24 @@ ```sh git clone https://github.com/uber/react-view cd react-view -yarn +pnpm install ``` -2. You can test your changes inside of the storybook: +2. You can test your changes inside of the Ladle dev server by running: ```sh -yarn storybook +pnpm ladle serve ``` 3. When done, run all unit tests, e2e tests, typescript check and eslint via: ```sh -yarn test:ci +pnpm typecheck +pnpm lint +pnpm test + +pnpm exec playwright install +pnpm test:e2e:dev ``` All features and bug fixes should be covered by unit or e2e tests. diff --git a/package.json b/package.json index 2a076f4..e225c27 100644 --- a/package.json +++ b/package.json @@ -49,11 +49,11 @@ "@babel/traverse": "^7.23.4", "@babel/types": "^7.23.4", "@miksu/prettier": "^1.18.6", - "@miksu/react-tiny-popover": "^3.5.1", "copy-to-clipboard": "^3.3.3", "lodash": "^4.17.21", "prism-react-renderer": "^2.3.0", - "react-simple-code-editor": "^0.13.1" + "react-simple-code-editor": "^0.13.1", + "react-tiny-popover": "^8.0.4" }, "devDependencies": { "@babel/preset-typescript": "^7.23.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 24cf58d..5dfc90f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,9 +32,6 @@ dependencies: '@miksu/prettier': specifier: ^1.18.6 version: 1.18.6(@angular/compiler@7.2.16)(remark-parse@5.0.0)(yaml@1.10.2) - '@miksu/react-tiny-popover': - specifier: ^3.5.1 - version: 3.5.1(react-dom@18.2.0)(react@18.2.0) copy-to-clipboard: specifier: ^3.3.3 version: 3.3.3 @@ -47,6 +44,9 @@ dependencies: react-simple-code-editor: specifier: ^0.13.1 version: 0.13.1(react-dom@18.2.0)(react@18.2.0) + react-tiny-popover: + specifier: ^8.0.4 + version: 8.0.4(react-dom@18.2.0)(react@18.2.0) devDependencies: '@babel/preset-typescript': @@ -1432,18 +1432,6 @@ packages: - yaml dev: false - /@miksu/react-tiny-popover@3.5.1(react-dom@18.2.0)(react@18.2.0): - resolution: {integrity: sha512-YSpc7wznyAzQdkQhrLwRNTvLX96swskKvWTNGkilFB2MyC6E0xMem4EtX93DYXHK0vslhpYMtqbjcAWQcLhZeQ==} - peerDependencies: - react: ^15.6.1 || ^16.0.0 - react-dom: ^15.6.1 || ^16.0.0 - dependencies: - '@types/underscore': 1.11.15 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - underscore: 1.13.6 - dev: false - /@mswjs/cookies@1.1.0: resolution: {integrity: sha512-0ZcCVQxifZmhwNBoQIrystCb+2sWBY2Zw8lpfJBPCHGCA/HWqehITeCRVIv4VMy8MPlaHo2w2pTHFV2pFfqKPw==} engines: {node: '>=18'} @@ -1900,10 +1888,6 @@ packages: resolution: {integrity: sha512-eqNDvZsCNY49OAXB0Firg/Sc2BgoWsntsLUdybGFOhAfCD6QJ2n9HXUIHGqt5qjrxmMv4wS8WLAw43ZkKcJ8Pw==} dev: true - /@types/underscore@1.11.15: - resolution: {integrity: sha512-HP38xE+GuWGlbSRq9WrZkousaQ7dragtZCruBVMi0oX1migFZavZ3OROKHSkNp/9ouq82zrWtZpg18jFnVN96g==} - dev: false - /@types/unist@2.0.10: resolution: {integrity: sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==} @@ -6907,6 +6891,16 @@ packages: react-dom: 18.2.0(react@18.2.0) dev: false + /react-tiny-popover@8.0.4(react-dom@18.2.0)(react@18.2.0): + resolution: {integrity: sha512-pn0Y/G0gyMdYTBEWSKCCnaZsXAa54PkfnRE4fnMM5633SSClYrXxwXKc6vPYgJ9shLatGginxMjnhXq6guZmng==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 + dependencies: + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + dev: false + /react@18.2.0: resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} @@ -8007,10 +8001,6 @@ packages: which-boxed-primitive: 1.0.2 dev: true - /underscore@1.13.6: - resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} - dev: false - /undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} dev: true diff --git a/src/ui/error.tsx b/src/ui/error.tsx index 8d85d9e..b18ffa2 100644 --- a/src/ui/error.tsx +++ b/src/ui/error.tsx @@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ import * as React from "react"; -import Popover from "@miksu/react-tiny-popover"; +import { Popover } from "react-tiny-popover"; import { formatBabelError, frameError, getStyles } from "../utils"; import type { TErrorProps } from "../types"; @@ -17,7 +17,7 @@ const PopupError: React.FC<{ enabled: boolean; children: React.ReactNode }> = ({ return ( {children}} >
diff --git a/src/ui/knob.tsx b/src/ui/knob.tsx index ca6da1e..2f0f0b8 100644 --- a/src/ui/knob.tsx +++ b/src/ui/knob.tsx @@ -5,7 +5,7 @@ This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. */ import * as React from "react"; -import Popover from "@miksu/react-tiny-popover"; +import { Popover } from "react-tiny-popover"; import type { TPropValue, TImportsConfig } from "../types"; import Error from "./error"; import Editor from "./editor"; @@ -56,11 +56,11 @@ const Label: React.FC<{ return ( {tooltip}
} + ref={hoverRef as any} >