diff --git a/knip.config.ts b/knip.config.ts index caa51cc823..e1ad3950d7 100644 --- a/knip.config.ts +++ b/knip.config.ts @@ -21,6 +21,10 @@ const config: KnipConfig = { // relative path that doesn't resolve inside this monorepo. ignoreUnresolved: [/^\.\.\/\.\.\/\.\.\/core\/Engine$/u], }, + 'packages/react-data-query': { + // Flagged due to knip bug, see https://github.com/webpro-nl/knip/issues/1823 + ignoreDependencies: ['react-dom', 'react-native'], + }, // -- Per-workspace `ignoreDependencies` snapshots -- // diff --git a/packages/react-data-query/CHANGELOG.md b/packages/react-data-query/CHANGELOG.md index 1477d77404..26b8a96fc2 100644 --- a/packages/react-data-query/CHANGELOG.md +++ b/packages/react-data-query/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Bump `@metamask/utils` from `^11.9.0` to `^11.11.0` ([#9074](https://github.com/MetaMask/core/pull/9074)) +- Make `react-dom` and `react-native` peer dependencies optional ([#9295](https://github.com/MetaMask/core/pull/9295)) ## [0.2.1] diff --git a/packages/react-data-query/package.json b/packages/react-data-query/package.json index 541ed93afd..42c0a83c64 100644 --- a/packages/react-data-query/package.json +++ b/packages/react-data-query/package.json @@ -73,6 +73,14 @@ "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0", "react-native": "*" }, + "peerDependenciesMeta": { + "react-dom": { + "optional": true + }, + "react-native": { + "optional": true + } + }, "engines": { "node": "^18.18 || >=20" } diff --git a/yarn.lock b/yarn.lock index 780cd82fdd..73e27ee6ca 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8181,6 +8181,11 @@ __metadata: react: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-dom: ^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0 react-native: "*" + peerDependenciesMeta: + react-dom: + optional: true + react-native: + optional: true languageName: unknown linkType: soft