about summary refs log tree commit diff
path: root/plugins
diff options
context:
space:
mode:
authorhailey <me@haileyok.com>2025-05-02 13:23:39 -0700
committerGitHub <noreply@github.com>2025-05-02 13:23:39 -0700
commit544f7befe0f7d3e61fb03365ec588a2ab3c5a17a (patch)
tree9d6276058aeeb44e77cba2b11bcc9e95cb8b7521 /plugins
parent46ea3fdbeeab4e31657638955401145683738fbf (diff)
downloadvoidsky-544f7befe0f7d3e61fb03365ec588a2ab3c5a17a.tar.zst
bump it bop it upgrade it (rn 79/expo 53) (#8281)
* basic bumps

* more tweaking

* fix rn patch

* fix crop picker patch

* fix media library patch

* rm unnecessary patch

* fix notifications patch

* update bottomsheet

* Update withAppDelegateReferrer.js

* Delete withNoBundleCompression.js

* rm withNoBundleCompression plugin

* rm findLast shim

* metro package exports is enabled by default

* update react/react-dom/react-compiler

* fix reanimated issue

* vendor expo-ized emoji popup

* fix types

* hackfix view full thread

* Update EmojiPickerModule.podspec

* more upgrades

* fix multiformats package version

* add baseurl

* bump mmkv

* bumps

* update react-keyed-flatten-children

* bump locale packages

* fix emoji picker dark mode

* rn upgrades

* Revert "bump locale packages"

This reverts commit fc82f0f173032127dd7c18ed0316ae26f53db51d.

* upgrade testing-library

* rm test renderer

* update patch name minors

* rm findNodeHandle from tabbar

* only do scrollview tag thing on ios

* disable package exports

* update expo notifications handler

* memoize emoji picker styles

* fix tests, mock multiformats

* bump some dev deps with RC versions

* completely rearchitect toasts

* rm logs

* layout animation config for composer footer

* disable autolinking for patched libs

* undo lingui changes

* version bump from release candidate to 0.1

* update atproto deps

* rm @did-plc/server

* fix key issue (maybe)

* move URL polyfill to the polyfill file

* fix yarn lock

* upgrade to 53.0.3

* reanimated layout anim bug patch

* workletize a function that wasn't getting autoworkletized anymore (#8309)

* bump to expo 53.0.4

* bump RN to 0.79.2

* fix yarn lock ci

* Revert "completely rearchitect toasts"

This reverts commit 2e2fcaeeed527580a6c485718544b85e8b4f52b9.

* final upgrades

* chore: cleanup yarn lock

* prettier

---------

Co-authored-by: Samuel Newman <mozzius@protonmail.com>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/withAppDelegateReferrer.js46
-rw-r--r--plugins/withNoBundleCompression.js70
2 files changed, 23 insertions, 93 deletions
diff --git a/plugins/withAppDelegateReferrer.js b/plugins/withAppDelegateReferrer.js
index de773df07..69feec57d 100644
--- a/plugins/withAppDelegateReferrer.js
+++ b/plugins/withAppDelegateReferrer.js
@@ -1,41 +1,41 @@
 const {withAppDelegate} = require('@expo/config-plugins')
 const {mergeContents} = require('@expo/config-plugins/build/utils/generateCode')
-const path = require('path')
-const fs = require('fs')
 
-module.exports = config => {
-  // eslint-disable-next-line no-shadow
-  return withAppDelegate(config, async config => {
-    const delegatePath = path.join(
-      config.modRequest.platformProjectRoot,
-      'AppDelegate.mm',
-    )
+module.exports = config =>
+  withAppDelegate(config, config => {
+    let contents = config.modResults.contents
 
-    let newContents = config.modResults.contents
-    newContents = mergeContents({
-      src: newContents,
+    contents = mergeContents({
+      src: contents,
       anchor: '// Linking API',
       newSrc: `
-  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-  [defaults setObject:options[UIApplicationOpenURLOptionsSourceApplicationKey] forKey:@"referrerApp"];\n`,
-      offset: 2,
+    // @generated begin referrer info – deep links
+    let defaults = UserDefaults.standard
+    defaults.set(
+      options[.sourceApplication] as? String,
+      forKey: "referrerApp"
+    )
+    // @generated end referrer info – deep links
+`,
+      offset: 6,
       tag: 'referrer info - deep links',
       comment: '//',
     }).contents
 
-    newContents = mergeContents({
-      src: newContents,
+    contents = mergeContents({
+      src: contents,
       anchor: '// Universal Links',
       newSrc: `
-  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
-  [defaults setURL:userActivity.referrerURL forKey:@"referrer"];\n`,
-      offset: 2,
+    // @generated begin referrer info – universal links
+    let defaults = UserDefaults.standard
+    defaults.set(userActivity.referrerURL, forKey: "referrer")
+    // @generated end referrer info – universal links
+`,
+      offset: 6,
       tag: 'referrer info - universal links',
       comment: '//',
     }).contents
 
-    config.modResults.contents = newContents
-
+    config.modResults.contents = contents
     return config
   })
-}
diff --git a/plugins/withNoBundleCompression.js b/plugins/withNoBundleCompression.js
deleted file mode 100644
index 73e571633..000000000
--- a/plugins/withNoBundleCompression.js
+++ /dev/null
@@ -1,70 +0,0 @@
-const {withAppBuildGradle} = require('@expo/config-plugins')
-
-/**
- * A Config Plugin to disable bundle compression in Android build.gradle.
- * @param {import('@expo/config-plugins').ConfigPlugin} config
- * @returns {import('@expo/config-plugins').ConfigPlugin}
- */
-module.exports = function withNoBundleCompression(config) {
-  return withAppBuildGradle(config, androidConfig => {
-    let buildGradle = androidConfig.modResults.contents
-
-    const hasAndroidResources = buildGradle.includes('androidResources {')
-    const hasNoCompress = buildGradle.includes('noCompress')
-
-    if (hasAndroidResources) {
-      if (hasNoCompress) {
-        if (
-          buildGradle.includes('noCompress += ["bundle"]') ||
-          buildGradle.includes("noCompress += 'bundle'") ||
-          buildGradle.includes('noCompress += "bundle"')
-        ) {
-          return androidConfig
-        }
-
-        const lines = buildGradle.split('\n')
-        const modifiedLines = lines.map(line => {
-          if (line.trim().startsWith('noCompress')) {
-            if (line.includes('+=')) {
-              return line.replace(/\]/, ', "bundle"]')
-            } else if (line.includes('=')) {
-              return line.replace('=', '+= ["bundle",') + ']'
-            }
-          }
-          return line
-        })
-        androidConfig.modResults.contents = modifiedLines.join('\n')
-      } else {
-        const androidResources = buildGradle.indexOf('androidResources {')
-        if (androidResources === -1) {
-          throw new Error(
-            `Cannot find androidResources { block in build.gradle!`,
-          )
-        }
-        const insertPosition = buildGradle.indexOf('\n', androidResources) + 1
-        const newContent =
-          buildGradle.slice(0, insertPosition) +
-          '        noCompress += ["bundle"]\n' +
-          buildGradle.slice(insertPosition)
-
-        androidConfig.modResults.contents = newContent
-      }
-    } else {
-      const androidBlock = buildGradle.indexOf('android {')
-      if (androidBlock === -1) {
-        throw new Error(`Cannot find android { block in build.gradle!`)
-      }
-      const insertPosition = buildGradle.indexOf('\n', androidBlock) + 1
-      const newContent =
-        buildGradle.slice(0, insertPosition) +
-        '    androidResources {\n' +
-        '        noCompress += ["bundle"]\n' +
-        '    }\n' +
-        buildGradle.slice(insertPosition)
-
-      androidConfig.modResults.contents = newContent
-    }
-
-    return androidConfig
-  })
-}