From 4a9f8643654cc3d1013a5477d39b42dcbe48b7d1 Mon Sep 17 00:00:00 2001 From: alduzy Date: Wed, 12 Jun 2024 15:38:57 +0200 Subject: [PATCH 1/2] fix: removed custom path to navigation types --- package.json | 2 ++ tsconfig.json | 3 +-- yarn.lock | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 61 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 6f7b923c7c..3cdb4f551b 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,9 @@ "@react-native-community/cli": "^11.3.6", "@react-native-community/cli-platform-android": "^11.3.6", "@react-native-community/cli-platform-ios": "^11.3.6", + "@react-navigation/bottom-tabs": "^6.5.20", "@react-navigation/native": "^5.8.0", + "@react-navigation/native-stack": "^6.9.26", "@react-navigation/stack": "^5.10.0", "@types/jest": "^29.3.1", "@types/react": "^18.2.72", diff --git a/tsconfig.json b/tsconfig.json index bb85e1ba00..e79dd74079 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,8 +3,7 @@ "baseUrl": ".", "paths": { "react-native-screens": ["src"], - "react-native-screens/*": ["src/*"], - "@react-navigation/*": ["react-navigation/packages/*/src"] + "react-native-screens/*": ["src/*"] }, "allowUnreachableCode": false, "allowUnusedLabels": false, diff --git a/yarn.lock b/yarn.lock index 367f8f8721..4ad7e0fc9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3387,6 +3387,23 @@ __metadata: languageName: node linkType: hard +"@react-navigation/bottom-tabs@npm:^6.5.20": + version: 6.5.20 + resolution: "@react-navigation/bottom-tabs@npm:6.5.20" + dependencies: + "@react-navigation/elements": "npm:^1.3.30" + color: "npm:^4.2.3" + warn-once: "npm:^0.1.0" + peerDependencies: + "@react-navigation/native": ^6.0.0 + react: "*" + react-native: "*" + react-native-safe-area-context: ">= 3.0.0" + react-native-screens: ">= 3.0.0" + checksum: 10c0/87be2f06f62b036789796a92e284331c8e2019e1926dda894f57e9e9070cb3c61cbf3e70e58dd3e5059bff0326695d9ea3e2db15208dafd5f3993f470cfe950b + languageName: node + linkType: hard + "@react-navigation/core@npm:^5.16.1": version: 5.16.1 resolution: "@react-navigation/core@npm:5.16.1" @@ -3402,6 +3419,34 @@ __metadata: languageName: node linkType: hard +"@react-navigation/elements@npm:^1.3.30": + version: 1.3.30 + resolution: "@react-navigation/elements@npm:1.3.30" + peerDependencies: + "@react-navigation/native": ^6.0.0 + react: "*" + react-native: "*" + react-native-safe-area-context: ">= 3.0.0" + checksum: 10c0/9916aceac85ed1139153624155a53caadc8007fedf416ea2cf3c698e8f5d53a90fe5019107d6bc6129cf034fbe0a3497562731b61213f411b29c0cda52bedecf + languageName: node + linkType: hard + +"@react-navigation/native-stack@npm:^6.9.26": + version: 6.9.26 + resolution: "@react-navigation/native-stack@npm:6.9.26" + dependencies: + "@react-navigation/elements": "npm:^1.3.30" + warn-once: "npm:^0.1.0" + peerDependencies: + "@react-navigation/native": ^6.0.0 + react: "*" + react-native: "*" + react-native-safe-area-context: ">= 3.0.0" + react-native-screens: ">= 3.0.0" + checksum: 10c0/fcac18ee3e6ab62b3cc4b128c8720ad8d5ccf68c33c22937392aaab920a2d25cd8615b674ef2246dd2653dc32ee5439d82d6f026eed867a3abdbfd45bd45593c + languageName: node + linkType: hard + "@react-navigation/native@npm:^5.8.0": version: 5.9.8 resolution: "@react-navigation/native@npm:5.9.8" @@ -5282,7 +5327,7 @@ __metadata: languageName: node linkType: hard -"color-string@npm:^1.6.0": +"color-string@npm:^1.6.0, color-string@npm:^1.9.0": version: 1.9.1 resolution: "color-string@npm:1.9.1" dependencies: @@ -5302,6 +5347,16 @@ __metadata: languageName: node linkType: hard +"color@npm:^4.2.3": + version: 4.2.3 + resolution: "color@npm:4.2.3" + dependencies: + color-convert: "npm:^2.0.1" + color-string: "npm:^1.9.0" + checksum: 10c0/7fbe7cfb811054c808349de19fb380252e5e34e61d7d168ec3353e9e9aacb1802674bddc657682e4e9730c2786592a4de6f8283e7e0d3870b829bb0b7b2f6118 + languageName: node + linkType: hard + "colorette@npm:^1.0.7": version: 1.4.0 resolution: "colorette@npm:1.4.0" @@ -11847,7 +11902,9 @@ __metadata: "@react-native-community/cli": "npm:^11.3.6" "@react-native-community/cli-platform-android": "npm:^11.3.6" "@react-native-community/cli-platform-ios": "npm:^11.3.6" + "@react-navigation/bottom-tabs": "npm:^6.5.20" "@react-navigation/native": "npm:^5.8.0" + "@react-navigation/native-stack": "npm:^6.9.26" "@react-navigation/stack": "npm:^5.10.0" "@types/jest": "npm:^29.3.1" "@types/react": "npm:^18.2.72" From 98d4fab6980814ed60a2410281095e53355f769c Mon Sep 17 00:00:00 2001 From: alduzy Date: Wed, 12 Jun 2024 16:40:38 +0200 Subject: [PATCH 2/2] refact: define paths instead of adding dependencies --- apps/examples/tsconfig.json | 9 ++++- apps/test-examples/tsconfig.json | 7 ++++ package.json | 2 -- yarn.lock | 59 +------------------------------- 4 files changed, 16 insertions(+), 61 deletions(-) diff --git a/apps/examples/tsconfig.json b/apps/examples/tsconfig.json index c42678a9c7..9466ebbae0 100644 --- a/apps/examples/tsconfig.json +++ b/apps/examples/tsconfig.json @@ -1,4 +1,11 @@ { "extends": "../../tsconfig.json", - "include": ["**/*.ts", "**/*.tsx", "**/*.js"], + "compilerOptions": { + "paths": { + "react-native-screens": ["src"], + "react-native-screens/*": ["src/*"], + "@react-navigation/*": ["react-navigation/packages/*/src"] + } + }, + "include": ["**/*.ts", "**/*.tsx", "**/*.js"] } diff --git a/apps/test-examples/tsconfig.json b/apps/test-examples/tsconfig.json index 19aefad26a..9466ebbae0 100644 --- a/apps/test-examples/tsconfig.json +++ b/apps/test-examples/tsconfig.json @@ -1,4 +1,11 @@ { "extends": "../../tsconfig.json", + "compilerOptions": { + "paths": { + "react-native-screens": ["src"], + "react-native-screens/*": ["src/*"], + "@react-navigation/*": ["react-navigation/packages/*/src"] + } + }, "include": ["**/*.ts", "**/*.tsx", "**/*.js"] } diff --git a/package.json b/package.json index 3cdb4f551b..6f7b923c7c 100644 --- a/package.json +++ b/package.json @@ -78,9 +78,7 @@ "@react-native-community/cli": "^11.3.6", "@react-native-community/cli-platform-android": "^11.3.6", "@react-native-community/cli-platform-ios": "^11.3.6", - "@react-navigation/bottom-tabs": "^6.5.20", "@react-navigation/native": "^5.8.0", - "@react-navigation/native-stack": "^6.9.26", "@react-navigation/stack": "^5.10.0", "@types/jest": "^29.3.1", "@types/react": "^18.2.72", diff --git a/yarn.lock b/yarn.lock index 4ad7e0fc9e..367f8f8721 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3387,23 +3387,6 @@ __metadata: languageName: node linkType: hard -"@react-navigation/bottom-tabs@npm:^6.5.20": - version: 6.5.20 - resolution: "@react-navigation/bottom-tabs@npm:6.5.20" - dependencies: - "@react-navigation/elements": "npm:^1.3.30" - color: "npm:^4.2.3" - warn-once: "npm:^0.1.0" - peerDependencies: - "@react-navigation/native": ^6.0.0 - react: "*" - react-native: "*" - react-native-safe-area-context: ">= 3.0.0" - react-native-screens: ">= 3.0.0" - checksum: 10c0/87be2f06f62b036789796a92e284331c8e2019e1926dda894f57e9e9070cb3c61cbf3e70e58dd3e5059bff0326695d9ea3e2db15208dafd5f3993f470cfe950b - languageName: node - linkType: hard - "@react-navigation/core@npm:^5.16.1": version: 5.16.1 resolution: "@react-navigation/core@npm:5.16.1" @@ -3419,34 +3402,6 @@ __metadata: languageName: node linkType: hard -"@react-navigation/elements@npm:^1.3.30": - version: 1.3.30 - resolution: "@react-navigation/elements@npm:1.3.30" - peerDependencies: - "@react-navigation/native": ^6.0.0 - react: "*" - react-native: "*" - react-native-safe-area-context: ">= 3.0.0" - checksum: 10c0/9916aceac85ed1139153624155a53caadc8007fedf416ea2cf3c698e8f5d53a90fe5019107d6bc6129cf034fbe0a3497562731b61213f411b29c0cda52bedecf - languageName: node - linkType: hard - -"@react-navigation/native-stack@npm:^6.9.26": - version: 6.9.26 - resolution: "@react-navigation/native-stack@npm:6.9.26" - dependencies: - "@react-navigation/elements": "npm:^1.3.30" - warn-once: "npm:^0.1.0" - peerDependencies: - "@react-navigation/native": ^6.0.0 - react: "*" - react-native: "*" - react-native-safe-area-context: ">= 3.0.0" - react-native-screens: ">= 3.0.0" - checksum: 10c0/fcac18ee3e6ab62b3cc4b128c8720ad8d5ccf68c33c22937392aaab920a2d25cd8615b674ef2246dd2653dc32ee5439d82d6f026eed867a3abdbfd45bd45593c - languageName: node - linkType: hard - "@react-navigation/native@npm:^5.8.0": version: 5.9.8 resolution: "@react-navigation/native@npm:5.9.8" @@ -5327,7 +5282,7 @@ __metadata: languageName: node linkType: hard -"color-string@npm:^1.6.0, color-string@npm:^1.9.0": +"color-string@npm:^1.6.0": version: 1.9.1 resolution: "color-string@npm:1.9.1" dependencies: @@ -5347,16 +5302,6 @@ __metadata: languageName: node linkType: hard -"color@npm:^4.2.3": - version: 4.2.3 - resolution: "color@npm:4.2.3" - dependencies: - color-convert: "npm:^2.0.1" - color-string: "npm:^1.9.0" - checksum: 10c0/7fbe7cfb811054c808349de19fb380252e5e34e61d7d168ec3353e9e9aacb1802674bddc657682e4e9730c2786592a4de6f8283e7e0d3870b829bb0b7b2f6118 - languageName: node - linkType: hard - "colorette@npm:^1.0.7": version: 1.4.0 resolution: "colorette@npm:1.4.0" @@ -11902,9 +11847,7 @@ __metadata: "@react-native-community/cli": "npm:^11.3.6" "@react-native-community/cli-platform-android": "npm:^11.3.6" "@react-native-community/cli-platform-ios": "npm:^11.3.6" - "@react-navigation/bottom-tabs": "npm:^6.5.20" "@react-navigation/native": "npm:^5.8.0" - "@react-navigation/native-stack": "npm:^6.9.26" "@react-navigation/stack": "npm:^5.10.0" "@types/jest": "npm:^29.3.1" "@types/react": "npm:^18.2.72"