Skip to content

Commit

Permalink
Merge pull request #319 from FredrikMeyer/dependabot/npm_and_yarn/mul…
Browse files Browse the repository at this point in the history
…ti-4d778bc229

Bump react, react-dom and @types/react
  • Loading branch information
FredrikMeyer authored Feb 2, 2025
2 parents ea2be09 + 6e47ea8 commit bd9f1bf
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 40 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
},
"dependencies": {
"classnames": "^2.5.1",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"react-icons": "^5.4.0"
},
"devDependencies": {
"@types/react": "^18.3.12",
"@types/react": "^19.0.8",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^6.21.0",
Expand All @@ -40,5 +40,6 @@
},
"browserslist": [
"defaults"
]
],
"packageManager": "yarn@1.22.22"
}
2 changes: 1 addition & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function useClearCanvasByKey(clearCanvas: () => void) {
}

function useCanvasDimension(
canvasContainerRef: React.RefObject<HTMLDivElement>,
canvasContainerRef: React.RefObject<HTMLDivElement | null>,
) {
const [canvasDimensions, setCanvasDimensions] =
React.useState<Optional<[number, number]>>();
Expand Down
4 changes: 2 additions & 2 deletions src/Canvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function BackgroundCanvas({
}: {
width: number;
height: number;
canvasRef: React.RefObject<HTMLCanvasElement>;
canvasRef: React.RefObject<HTMLCanvasElement | null>;
}) {
const [width, height] = useScaleByDevicePixelRatio(
canvasRef,
Expand Down Expand Up @@ -80,7 +80,7 @@ export default function Canvas({
width: number;
height: number;
container: HTMLDivElement;
backgroundCanvasRef: React.RefObject<HTMLCanvasElement>;
backgroundCanvasRef: React.RefObject<HTMLCanvasElement | null>;
currentColor: Color;
toolSize: number;
}) {
Expand Down
6 changes: 3 additions & 3 deletions src/DrawingCanvas.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Color, ColorFactory } from "./colors";
import FloodFiller from "./floodFill";
import { useScaleByDevicePixelRatio } from "./canvasUtils";

function useCtx(reference: React.RefObject<HTMLCanvasElement>) {
function useCtx(reference: React.RefObject<HTMLCanvasElement | null>) {
const [ctx, setCtx] = React.useState<CanvasRenderingContext2D | undefined>(
undefined,
);
Expand Down Expand Up @@ -52,8 +52,8 @@ export default function DrawingCanvas({
currentColor: Color;
width: number;
height: number;
canvasRef: React.RefObject<HTMLCanvasElement>;
backgroundCanvasRef: React.RefObject<HTMLCanvasElement>;
canvasRef: React.RefObject<HTMLCanvasElement | null>;
backgroundCanvasRef: React.RefObject<HTMLCanvasElement | null>;
leftTop: { left: number; top: number };
onCommit: () => void;
}) {
Expand Down
2 changes: 1 addition & 1 deletion src/canvasUtils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";

export function useScaleByDevicePixelRatio(
canvasRef: React.RefObject<HTMLCanvasElement>,
canvasRef: React.RefObject<HTMLCanvasElement | null>,
width: number,
height: number,
) {
Expand Down
47 changes: 18 additions & 29 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -783,24 +783,18 @@
dependencies:
postcss "^8.0.0"

"@types/prop-types@*":
version "15.7.5"
resolved "https://registry.yarnpkg.com/@types/prop-types/-/prop-types-15.7.5.tgz#5f19d2b85a98e9558036f6a3cacc8819420f05cf"
integrity sha512-JCB8C6SnDoQf0cNycqd/35A7MjcnK+ZTqE7judS6o7utxUCg6imJg3QK2qzHKszlTjcj2cn+NwMB2i96ubpj7w==

"@types/react-dom@^18.3.0":
version "18.3.0"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.3.0.tgz#0cbc818755d87066ab6ca74fbedb2547d74a82b0"
integrity sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==
dependencies:
"@types/react" "*"

"@types/react@*", "@types/react@^18.3.12":
version "18.3.12"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.3.12.tgz#99419f182ccd69151813b7ee24b792fe08774f60"
integrity sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==
"@types/react@*", "@types/react@^19.0.8":
version "19.0.8"
resolved "https://registry.yarnpkg.com/@types/react/-/react-19.0.8.tgz#7098e6159f2a61e4f4cef2c1223c044a9bec590e"
integrity sha512-9P/o1IGdfmQxrujGbIMDyYaaCykhLKc0NGCtYcECNUr9UAaDe4gwvV9bR6tvd5Br1SG0j+PBpbKr2UYY8CwqSw==
dependencies:
"@types/prop-types" "*"
csstype "^3.0.2"

"@types/semver@^7.5.0":
Expand Down Expand Up @@ -3142,7 +3136,7 @@ lodash.truncate@^4.4.2:
resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193"
integrity sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=

loose-envify@^1.1.0, loose-envify@^1.4.0:
loose-envify@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf"
integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==
Expand Down Expand Up @@ -3678,13 +3672,12 @@ quick-lru@^5.1.1:
resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932"
integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==

react-dom@^18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-18.3.1.tgz#c2265d79511b57d479b3dd3fdfa51536494c5cb4"
integrity sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==
react-dom@^19.0.0:
version "19.0.0"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.0.0.tgz#43446f1f01c65a4cd7f7588083e686a6726cfb57"
integrity sha512-4GV5sHFG0e/0AD4X+ySy6UJd3jVl1iNsNHdpad0qhABJ11twS3TTBnseqsKurKcsNqCEFeGL3uLpVChpIO3QfQ==
dependencies:
loose-envify "^1.1.0"
scheduler "^0.23.2"
scheduler "^0.25.0"

react-icons@^5.4.0:
version "5.4.0"
Expand All @@ -3701,12 +3694,10 @@ react-refresh@^0.14.2:
resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.14.2.tgz#3833da01ce32da470f1f936b9d477da5c7028bf9"
integrity sha512-jCvmsr+1IUSMUyzOkRcvnVbX3ZYC6g9TDrDbFuFmRDq7PD4yaGbLKNQL6k2jnArV8hjYxh7hVhAZB6s9HDGpZA==

react@^18.3.1:
version "18.3.1"
resolved "https://registry.yarnpkg.com/react/-/react-18.3.1.tgz#49ab892009c53933625bd16b2533fc754cab2891"
integrity sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==
dependencies:
loose-envify "^1.1.0"
react@^19.0.0:
version "19.0.0"
resolved "https://registry.yarnpkg.com/react/-/react-19.0.0.tgz#6e1969251b9f108870aa4bff37a0ce9ddfaaabdd"
integrity sha512-V8AVnmPIICiWpGfm6GLzCR/W5FXLchHop40W4nXBmdlEceh16rCN8O8LNWm5bh5XUX91fh7KpA+W0TgMKmgTpQ==

read-pkg-up@^8.0.0:
version "8.0.0"
Expand Down Expand Up @@ -3962,12 +3953,10 @@ sax@~1.3.0:
resolved "https://registry.yarnpkg.com/sax/-/sax-1.3.0.tgz#a5dbe77db3be05c9d1ee7785dbd3ea9de51593d0"
integrity sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==

scheduler@^0.23.2:
version "0.23.2"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.23.2.tgz#414ba64a3b282892e944cf2108ecc078d115cdc3"
integrity sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==
dependencies:
loose-envify "^1.1.0"
scheduler@^0.25.0:
version "0.25.0"
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.25.0.tgz#336cd9768e8cceebf52d3c80e3dcf5de23e7e015"
integrity sha512-xFVuu11jh+xcO7JOAGJNOXld8/TcEHK/4CituBUeUb5hqxJLj9YuemAEuvm9gQ/+pgXYfbQuqAkiYu+u7YEsNA==

semver@^5.6.0:
version "5.7.2"
Expand Down

0 comments on commit bd9f1bf

Please sign in to comment.