about summary refs log tree commit diff
path: root/patches/metro-transform-worker+0.80.1.patch
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2023-12-23 17:44:38 -0600
committerGitHub <noreply@github.com>2023-12-23 15:44:38 -0800
commit93f5bb3b1f10cb6011f1770132067fc58df39f3b (patch)
treeecf0d6987030f3695568eef30d7a4ab4f676cd00 /patches/metro-transform-worker+0.80.1.patch
parent7d6b7d2fa6ec074db3f38785e46834f826c82772 (diff)
downloadvoidsky-93f5bb3b1f10cb6011f1770132067fc58df39f3b.tar.zst
Bump react-native to 0.73.1, expo to 50 (#2214)
* Bump to react-native@0.73, bump expo@next

Includes bumps for all expo deps and dev dependencies. Updates
react-native patch and others, and removes the babel-preset-expo patch.

* Remove duplicate Splash ref

* Bump more deps

* Properly install expo-notifications

* Bump webview dep

* Bump packages according to expo fix; remove pager-view patch as it is no longer needed

* Don't access expo-camera from Web

* Fix crypto dep on web

* Fix some type issues

* Build esnext modules to support dynamic imports

---------

Co-authored-by: Paul Frazee <pfrazee@gmail.com>
Diffstat (limited to 'patches/metro-transform-worker+0.80.1.patch')
-rw-r--r--patches/metro-transform-worker+0.80.1.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/patches/metro-transform-worker+0.80.1.patch b/patches/metro-transform-worker+0.80.1.patch
new file mode 100644
index 000000000..65f44e578
--- /dev/null
+++ b/patches/metro-transform-worker+0.80.1.patch
@@ -0,0 +1,41 @@
+diff --git a/node_modules/metro-transform-worker/src/index.js b/node_modules/metro-transform-worker/src/index.js
+index cae11e7..42f251b 100644
+--- a/node_modules/metro-transform-worker/src/index.js
++++ b/node_modules/metro-transform-worker/src/index.js
+@@ -189,6 +189,10 @@ async function transformJS(file, { config, options, projectRoot }) {
+   let dependencyMapName = "";
+   let dependencies;
+   let wrappedAst;
++  const minify =
++    options.minify &&
++    options.unstable_transformProfile !== "hermes-canary" &&
++    options.unstable_transformProfile !== "hermes-stable";
+ 
+   // If the module to transform is a script (meaning that is not part of the
+   // dependency graph and it code will just be prepended to the bundle modules),
+@@ -228,19 +232,20 @@ async function transformJS(file, { config, options, projectRoot }) {
+     if (config.unstable_disableModuleWrapping === true) {
+       wrappedAst = ast;
+     } else {
++      let moduleFactoryName;
++      if (options.dev && !minify) {
++        moduleFactoryName = file.filename;
++      }
+       ({ ast: wrappedAst } = JsFileWrapping.wrapModule(
+         ast,
+         importDefault,
+         importAll,
+         dependencyMapName,
+-        config.globalPrefix
++        config.globalPrefix,
++        moduleFactoryName
+       ));
+     }
+   }
+-  const minify =
+-    options.minify &&
+-    options.unstable_transformProfile !== "hermes-canary" &&
+-    options.unstable_transformProfile !== "hermes-stable";
+   const reserved = [];
+   if (config.unstable_dependencyMapReservedName != null) {
+     reserved.push(config.unstable_dependencyMapReservedName);