From 2c4854363cfb9df7913c0a336c339ca0f9292a86 Mon Sep 17 00:00:00 2001 From: Gianni Ferullo Date: Wed, 24 Apr 2024 11:25:54 -0400 Subject: [PATCH 1/2] react-components: ignore fetch priority --- .changeset/lucky-laws-relate.md | 7 +++++ packages/react-components/package.json | 4 +-- .../react-components/src/components/gif.tsx | 6 ++--- yarn.lock | 26 +++++++++++++------ 4 files changed, 29 insertions(+), 14 deletions(-) create mode 100644 .changeset/lucky-laws-relate.md diff --git a/.changeset/lucky-laws-relate.md b/.changeset/lucky-laws-relate.md new file mode 100644 index 00000000..1d50132e --- /dev/null +++ b/.changeset/lucky-laws-relate.md @@ -0,0 +1,7 @@ +--- +'@giphy/react-components': patch +--- + +In order to avoid console warnings, dont' use fetchPriority prop until next React release + +https://github.com/facebook/react/issues/27233 diff --git a/packages/react-components/package.json b/packages/react-components/package.json index 1465cdf4..d88c6351 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -35,8 +35,8 @@ "@storybook/react-vite": "^7.1.0", "@storybook/storybook-deployer": "^2.8.16", "@storybook/testing-library": "^0.2.0", - "@types/react": "^18.2.15", - "@types/react-dom": "^18.2.7", + "@types/react": "^18.2.79", + "@types/react-dom": "^18.2.25", "@types/storybook__react": "^5.2.1", "@types/throttle-debounce": "^2.1.0", "awesome-typescript-loader": "^5.2.1", diff --git a/packages/react-components/src/components/gif.tsx b/packages/react-components/src/components/gif.tsx index 3dcc42ea..6b1eb846 100644 --- a/packages/react-components/src/components/gif.tsx +++ b/packages/react-components/src/components/gif.tsx @@ -64,6 +64,8 @@ type GifProps = { borderRadius?: number tabIndex?: number style?: any + // issues with this will be resolved in the next React release: + // https://github.com/facebook/react/issues/27233 fetchPriority?: 'auto' | 'high' | 'low' } @@ -103,7 +105,6 @@ const Gif = ({ borderRadius = 4, style, tabIndex, - fetchPriority, }: Props) => { // only fire seen once per gif id const [hasFiredSeen, setHasFiredSeen] = useState(false) @@ -275,9 +276,6 @@ const Gif = ({ =16, @types/react@npm:^18.2.15": +"@types/react@npm:*, @types/react@npm:>=16": version: 18.2.15 resolution: "@types/react@npm:18.2.15" dependencies: @@ -5575,6 +5575,16 @@ __metadata: languageName: node linkType: hard +"@types/react@npm:^18.2.79": + version: 18.2.79 + resolution: "@types/react@npm:18.2.79" + dependencies: + "@types/prop-types": "*" + csstype: ^3.0.2 + checksum: 85aa96e0e88725c84d8fc5f04f10a4da6a1f507dde33557ac9cc211414756867721264bfefd9e02bae1288ce2905351d949b652b931e734ea24519ee5c625138 + languageName: node + linkType: hard + "@types/scheduler@npm:*": version: 0.16.3 resolution: "@types/scheduler@npm:0.16.3" From 7007645e328eab47d0d1cebc06bb6ea028ca95ec Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 24 Apr 2024 15:33:04 +0000 Subject: [PATCH 2/2] Version Packages --- .changeset/lucky-laws-relate.md | 7 ------- packages/react-components/CHANGELOG.md | 8 ++++++++ packages/react-components/package.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 .changeset/lucky-laws-relate.md diff --git a/.changeset/lucky-laws-relate.md b/.changeset/lucky-laws-relate.md deleted file mode 100644 index 1d50132e..00000000 --- a/.changeset/lucky-laws-relate.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@giphy/react-components': patch ---- - -In order to avoid console warnings, dont' use fetchPriority prop until next React release - -https://github.com/facebook/react/issues/27233 diff --git a/packages/react-components/CHANGELOG.md b/packages/react-components/CHANGELOG.md index 5aebb7f3..9849114c 100644 --- a/packages/react-components/CHANGELOG.md +++ b/packages/react-components/CHANGELOG.md @@ -1,5 +1,13 @@ ## @giphy/react-components +## 9.4.1 + +### Patch Changes + +- 2c48543: In order to avoid console warnings, dont' use fetchPriority prop until next React release + + https://github.com/facebook/react/issues/27233 + ## 9.4.0 ### Minor Changes diff --git a/packages/react-components/package.json b/packages/react-components/package.json index d88c6351..94d95142 100644 --- a/packages/react-components/package.json +++ b/packages/react-components/package.json @@ -52,7 +52,7 @@ "webpack": "^5.74.0" }, "name": "@giphy/react-components", - "version": "9.4.0", + "version": "9.4.1", "description": "A lightweight set of components, focused on easy-of-use and performance.", "homepage": "https://github.com/Giphy/giphy-js/tree/master/packages/react-components", "main": "dist/index.js",