bamlab / react-native-image-resizer

🗻 Resize local images with React Native
MIT License
1.61k stars 346 forks source link

fix: update codegen config #409

Open radko93 opened 2 months ago

radko93 commented 2 months ago

When running a project with RN 0.75 following is printed:

[Codegen] Found @bam.tech/react-native-image-resizer
[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": "."
      }
    }
ravindraguptacapgemini commented 1 week ago

when I can expect this PR to get merged?

ravindraguptacapgemini commented 1 week ago

please add include this as well in your PR, iOS build failure due to this on React Native 0.75

diff --git a/react-native-image-resizer.podspec b/react-native-image-resizer.podspec index c7ba7d9e261abbb890cccf0c9dd58eba118083be..749803239f7765994408d525e3cf7cff787e847a 100644 --- a/react-native-image-resizer.podspec +++ b/react-native-image-resizer.podspec @@ -32,6 +32,7 @@ Pod::Spec.new do |s| s.dependency "RCTRequired" s.dependency "RCTTypeSafety" s.dependency "ReactCommon/turbomodule/core"