Skip to content

Commit 762f2a3

Browse files
authored
Fix bottom sheet (#865)
* Use lower version of bottom sheet * Even lower version * yarn.lcok * Remove `disableImportExportTransform` from babel * Revert "Remove `disableImportExportTransform` from babel" This reverts commit 71e26d0. * Downgrade rn-webview * pollyfill RNCWebView * react-native-webview as peer dependancy * Remove from peer dependcies * Revert "Remove from peer dependcies" This reverts commit 034a367. * Only keep as peer dependancy * Have as dev dependancy but remove before publish * Update typos * config git in ci * Add comments * Add more comments * Add as peer depenendncy for core * Make react-native-youtube-iframe a peer dependancy * Fix script * Remove ts-ignores * Remove polyfill
1 parent 97b0f08 commit 762f2a3

File tree

6 files changed

+69
-11
lines changed

6 files changed

+69
-11
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ jobs:
3737
- name: Test
3838
run: yarn test
3939

40+
# snackager fails whenever react-native-webview is a dependency, so we remove it
41+
# Removed right before deploy to keep it during development and when running tests, but ommited in final release
42+
# Changes need to be committed, otherwise lerna refuses to publish
43+
- name: Remove `react-native-webview` from dev dependencies
44+
run: |
45+
node ./scripts/remove-rn-webview-dependency.js
46+
git config --global user.email "[email protected]"
47+
git config --global user.name "Jigsaw CI Deploys"
48+
git commit -a -m 'Remove react-native-webview dev dependency'
49+
4050
- name: Release next packages
4151
if: github.event_name == 'pull_request'
4252
env:

packages/core/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@
7272
"react-native-tab-view": "^3.4.0",
7373
"react-native-typography": "^1.4.1",
7474
"react-native-web-swiper": "^2.2.3",
75-
"react-native-youtube-iframe": "^2.2.2",
7675
"react-youtube": "^10.1.0"
7776
},
7877
"peerDependencies": {
79-
"react-native-avoid-softinput": "^4.0.1"
78+
"react-native-avoid-softinput": "^4.0.1",
79+
"react-native-youtube-iframe": "^2.2.2"
8080
},
8181
"peerDependenciesMeta": {
8282
"react-native-avoid-softinput": {
@@ -91,7 +91,8 @@
9191
"@types/lodash.isnumber": "^3.0.6",
9292
"@types/lodash.omit": "^4.5.6",
9393
"@types/lodash.tonumber": "^4.0.6",
94-
"react-native-avoid-softinput": "^4.0.1"
94+
"react-native-avoid-softinput": "^4.0.1",
95+
"react-native-youtube-iframe": "^2.2.2"
9596
},
9697
"eslintIgnore": [
9798
"node_modules/",

packages/maps/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
"@teovilla/react-native-web-maps": "^0.9.4",
4545
"color": "^4.2.3",
4646
"lodash.isequal": "^4.5.0",
47-
"react-native-maps": "1.7.1",
48-
"react-native-webview": "13.6.3"
47+
"react-native-maps": "1.7.1"
4948
},
5049
"eslintIgnore": [
5150
"node_modules/",

packages/native/package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@
4545
"@react-native-community/slider": "4.4.2",
4646
"expo-camera": "~13.4.4",
4747
"expo-linear-gradient": "~12.3.0",
48-
"react-native-svg": "13.10.0",
49-
"react-native-webview": "13.6.3"
48+
"react-native-svg": "13.10.0"
49+
},
50+
"peerDependencies": {
51+
"react-native-webview": "13.2.2"
52+
},
53+
"devDependencies": {
54+
"react-native-webview": "13.2.2"
5055
},
5156
"eslintIgnore": [
5257
"node_modules/",
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/**
2+
* snackager fails whenever react-native-webview is a dependency, so we remove it
3+
* Fails with: Error: /tmp/snackager/snackager/buildStatus/1/@[email protected],android,web/package/node_modules/react-native-webview/lib/RNCWebViewNativeComponent.js: Could not find component config for native component
4+
*
5+
* This package is still needed during development and when running tests, so we run this script on ci right before it's released
6+
*
7+
* To be removed if this snackager call can succeed without it
8+
* https://snackager.expo.io/bundle/@draftbit/core@VERSION_HERE?version_snackager=true&platforms=ios,android,web&bypassCache=true&sdkVersion=49.0.0
9+
*/
10+
11+
const fs = require("fs");
12+
const path = require("path");
13+
14+
const ROOT_PATH = path.join(__dirname, "..");
15+
const nativePackageJsonPath = path.join(
16+
ROOT_PATH,
17+
"packages",
18+
"native",
19+
"package.json"
20+
);
21+
22+
const nativePackageJsonContents = fs
23+
.readFileSync(nativePackageJsonPath)
24+
.toString();
25+
const nativePackageJson = JSON.parse(nativePackageJsonContents);
26+
27+
delete nativePackageJson.devDependencies["react-native-webview"];
28+
29+
fs.writeFileSync(nativePackageJsonPath, JSON.stringify(nativePackageJson));
30+
31+
const corePackageJsonPath = path.join(
32+
ROOT_PATH,
33+
"packages",
34+
"core",
35+
"package.json"
36+
);
37+
38+
const corePackageJsonContents = fs.readFileSync(corePackageJsonPath).toString();
39+
const corePackageJson = JSON.parse(corePackageJsonContents);
40+
41+
delete corePackageJson.devDependencies["react-native-youtube-iframe"];
42+
43+
fs.writeFileSync(corePackageJsonPath, JSON.stringify(corePackageJson));

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12923,10 +12923,10 @@ react-native-web@~0.19.6:
1292312923
postcss-value-parser "^4.2.0"
1292412924
styleq "^0.1.3"
1292512925

12926-
react-native-webview@13.6.3:
12927-
version "13.6.3"
12928-
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.6.3.tgz#f3d26e942ef5cc5a07547f2e47903aa81a68e25e"
12929-
integrity sha512-IApO0JSj0uAWsBGKWagyfgDYoX29piiMYLmkHtRjKeL1rIVjLoR/bMe7KJ/0X47y86b//a6u3cYQtphyay+F2A==
12926+
react-native-webview@13.2.2:
12927+
version "13.2.2"
12928+
resolved "https://registry.yarnpkg.com/react-native-webview/-/react-native-webview-13.2.2.tgz#06b04db8e1f4ed57a9dc92f4094aa0e41271b89b"
12929+
integrity sha512-uT70y2GUqQzaj2RwRb/QuKRdXeDjXM6oN3DdPqYQlOOMFTCT8r62fybyjVVRoik8io+KLa5KnmuSoS5B2O1BmA==
1293012930
dependencies:
1293112931
escape-string-regexp "2.0.0"
1293212932
invariant "2.2.4"

0 commit comments

Comments
 (0)