Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS: CodegenConfig Deprecated Setup for @bam.tech/react-native-image-resizer #413

Open
short-dsb opened this issue Oct 2, 2024 · 4 comments

Comments

@short-dsb
Copy link

Thanks for your work on this project! Not sure when this will become a problem versus just a warning, but wanted to flag it here since I didn’t see an existing issue for it.

Describe the bug
Deprecation warning when running pod install with React Native v0.75.4.

To Reproduce
Steps to reproduce the behavior:

  1. cd ios
  2. pod install

Observed behavior

[Codegen] CodegenConfig Deprecated Setup for @bam.tech/react-native-image-resizer.
    The configuration file still contains the codegen in the libraries array.
    If possible, replace it with a single object.

BEFORE:
    {
      // ...
      "codegenConfig": {
        "libraries": [
          {
            "name": "libName1",
            "type": "all|components|modules",
            "jsSrcsRoot": "libName1/js"
          },
          {
            "name": "libName2",
            "type": "all|components|modules",
            "jsSrcsRoot": "libName2/src"
          }
        ]
      }
    }

    AFTER:
    {
      "codegenConfig": {
        "name": "libraries",
        "type": "all",
        "jsSrcsRoot": "."
      }
    }

Expected behavior
No deprecation warnings.

@johnnywang
Copy link

johnnywang commented Oct 10, 2024

+1, also seeing this after bumping to 3.0.10, on RN 0.75.4

@Barteque
Copy link

Barteque commented Oct 14, 2024

Try this patch (it's in a format of patch-package)

diff --git a/node_modules/@bam.tech/react-native-image-resizer/package.json b/node_modules/@bam.tech/react-native-image-resizer/package.json
index 7a73b6e..2033e59 100644
--- a/node_modules/@bam.tech/react-native-image-resizer/package.json
+++ b/node_modules/@bam.tech/react-native-image-resizer/package.json
@@ -169,12 +169,8 @@
     ]
   },
   "codegenConfig": {
-    "libraries": [
-      {
-        "name": "RNImageResizerSpec",
-        "type": "modules",
-        "jsSrcsDir": "src"
-      }
-    ]
+    "name": "RNImageResizerSpec",
+    "type": "modules",
+    "jsSrcsDir": "src"
   }
 }

@ravindraguptacapgemini
Copy link

when I can expect this code change to get merged?

@freeboub
Copy link

fixed by: #409 This issue can be closed I think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants