Skip to content

Commit

Permalink
fix: example crash NMS-16331 (#714)
Browse files Browse the repository at this point in the history
* feat: upgrade iris to 4.2.3-build.4 (#716)

* fix: example crash NMS-16331
  • Loading branch information
LichKing-2234 authored Oct 24, 2023
1 parent a358f0c commit f819293
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
1 change: 1 addition & 0 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"detox": "^20.13.0",
"jest": "^29.5.0",
"metro-react-native-babel-preset": "0.76.8",
"patch-package": "^6.5.0",
"pod-install": "^0.1.0"
},
"engines": {
Expand Down
34 changes: 34 additions & 0 deletions example/patches/react-native-color-picker+0.6.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/node_modules/react-native-color-picker/dist/HoloColorPicker.js b/node_modules/react-native-color-picker/dist/HoloColorPicker.js
index a177142..e9e1feb
--- a/node_modules/react-native-color-picker/dist/HoloColorPicker.js
+++ b/node_modules/react-native-color-picker/dist/HoloColorPicker.js
@@ -12,8 +12,9 @@ var __extends = (this && this.__extends) || (function () {
};
})();
import React from "react";
-import { I18nManager, Image, InteractionManager, Slider, StyleSheet, TouchableOpacity, View, } from "react-native";
+import { I18nManager, Image, InteractionManager, StyleSheet, TouchableOpacity, View, } from "react-native";
import tinycolor from "tinycolor2";
+import Slider from '@react-native-community/slider';
import { createPanResponder } from "./utils";
var HoloColorPicker = /** @class */ (function (_super) {
__extends(HoloColorPicker, _super);
diff --git a/node_modules/react-native-color-picker/src/HoloColorPicker.tsx b/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
index 51a7bcc..6707587
--- a/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
+++ b/node_modules/react-native-color-picker/src/HoloColorPicker.tsx
@@ -4,13 +4,12 @@ import {
Image,
InteractionManager,
PanResponderInstance,
- Slider,
StyleSheet,
TouchableOpacity,
View,
} from "react-native"
import tinycolor from "tinycolor2"
-
+import Slider from '@react-native-community/slider';
import { HsvColor, IPickerProps, Point2D } from "./typeHelpers"
import { createPanResponder } from "./utils"

12 changes: 12 additions & 0 deletions scripts/bootstrap.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@ module.exports = {
throw new Error('Failed to run patch-package');
}

if (
child_process.spawnSync('yarn', ['example', 'patch-package'], {
cwd: project.cwd,
env: process.env,
stdio: 'inherit',
encoding: 'utf-8',
shell: true,
}).status !== 0
) {
throw new Error('Failed to run patch-package');
}

if (
child_process.spawnSync(
'yarn',
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -13519,6 +13519,7 @@ __metadata:
detox: ^20.13.0
jest: ^29.5.0
metro-react-native-babel-preset: 0.76.8
patch-package: ^6.5.0
pod-install: ^0.1.0
react: 18.2.0
react-native: 0.72.5
Expand Down

0 comments on commit f819293

Please sign in to comment.