Skip to content

Commit

Permalink
Fixed duplicate/incompatible React types due to yarn resolution (#1173)
Browse files Browse the repository at this point in the history
no issue

- PRs have started failing due to `yarn` duplicating the `@types/react` sub-dependency inside the `@types/react-dom` dependency creating a situation where types become duplicated
- updated our dependency versions to be consistent so yarn correctly resolves a single version
  - as long as our versioning stays consistent across packages this works, if it continues to be a problem in future it may be better to use a `resolutions` block in the top-level `package.json` to force a single version
  • Loading branch information
kevinansfield authored Apr 9, 2024
1 parent 1105ef8 commit a6a90e9
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 36 deletions.
8 changes: 4 additions & 4 deletions packages/kg-unsplash-selector/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
"test:acceptance:full": "ALL_BROWSERS=1 yarn test:acceptance"
},
"peerDependencies": {
"react": "18.2.0",
"react-dom": "18.2.0"
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@playwright/test": "^1.33.0",
"@types/react": "18.2.56",
"@types/react-dom": "18.2.19",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@typescript-eslint/eslint-plugin": "7.0.2",
"@typescript-eslint/parser": "7.0.2",
"@vitejs/plugin-react": "4.2.1",
Expand Down
4 changes: 2 additions & 2 deletions packages/koenig-lexical/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@
"@tryghost/kg-markdown-html-renderer": "^7.0.2",
"@tryghost/kg-simplemde": "^3.0.1",
"@tryghost/kg-unsplash-selector": "^0.1.12",
"@types/react": "18.2.48",
"@types/react-dom": "18.2.18",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.0",
"@uiw/react-codemirror": "^4.19.6",
"@vitejs/plugin-react": "4.2.1",
"@vitest/coverage-c8": "0.33.0",
Expand Down
38 changes: 8 additions & 30 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4912,48 +4912,26 @@
resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.7.tgz#50ae4353eaaddc04044279812f52c8c65857dbcb"
integrity sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==

"@types/react-dom@18.2.18", "@types/react-dom@^18.0.0":
version "18.2.18"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.18.tgz#16946e6cd43971256d874bc3d0a72074bb8571dd"
integrity sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==
"@types/react-dom@^18.0.0", "@types/react-dom@^18.2.0":
version "18.2.24"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.24.tgz#8dda8f449ae436a7a6e91efed8035d4ab03ff759"
integrity sha512-cN6upcKd8zkGy4HU9F1+/s98Hrp6D4MOcippK4PoE8OZRngohHZpbJn1GsaDLz87MqvHNoT13nHvNqM9ocRHZg==
dependencies:
"@types/react" "*"

"@types/[email protected]":
version "18.2.19"
resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-18.2.19.tgz#b84b7c30c635a6c26c6a6dfbb599b2da9788be58"
integrity sha512-aZvQL6uUbIJpjZk4U8JZGbau9KDeAwMfmhyWorxgBkqDIEf6ROjRozcmPIicqsUwPUjbkDfHKgGee1Lq65APcA==
dependencies:
"@types/react" "*"

"@types/react@*", "@types/[email protected]", "@types/react@>=16":
version "18.2.48"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.48.tgz#11df5664642d0bd879c1f58bc1d37205b064e8f1"
integrity sha512-qboRCl6Ie70DQQG9hhNREz81jqC1cs9EVNcjQ1AU+jH6NFfSAhVVbrrY/+nSF+Bsk4AOwm9Qa61InvMCyV+H3w==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/[email protected]":
version "18.2.56"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.56.tgz#2d3e9021a0b6eb5bfc227761cc61b1c6dc6e0cd8"
integrity sha512-NpwHDMkS/EFZF2dONFQHgkPRwhvgq/OAvIaGQzxGSBmaeR++kTg6njr15Vatz0/2VcCEwJQFi6Jf4Q0qBu0rLA==
"@types/react@*", "@types/react@>=16", "@types/react@^18.2.0":
version "18.2.75"
resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.75.tgz#45d18f384939306d35312def1bf532eb38a68562"
integrity sha512-+DNnF7yc5y0bHkBTiLKqXFe+L4B3nvOphiMY3tuA5X10esmjqk7smyBZzbGTy2vsiy/Bnzj8yFIBL8xhRacoOg==
dependencies:
"@types/prop-types" "*"
"@types/scheduler" "*"
csstype "^3.0.2"

"@types/resolve@^1.20.2":
version "1.20.6"
resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-1.20.6.tgz#e6e60dad29c2c8c206c026e6dd8d6d1bdda850b8"
integrity sha512-A4STmOXPhMUtHH+S6ymgE2GiBSMqf4oTvcQZMcHzokuTLVYzXTB8ttjcgxOVaAp2lGwEdzZ0J+cRbbeevQj1UQ==

"@types/scheduler@*":
version "0.16.8"
resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.8.tgz#ce5ace04cfeabe7ef87c0091e50752e36707deff"
integrity sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==

"@types/semver@^7.3.12", "@types/semver@^7.3.4", "@types/semver@^7.5.0":
version "7.5.6"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.6.tgz#c65b2bfce1bec346582c07724e3f8c1017a20339"
Expand Down

0 comments on commit a6a90e9

Please sign in to comment.