Skip to content

fix: Make package.json accept newer versions of libs, e.g. Expo#886

Merged
msluszniak merged 4 commits intomainfrom
@ms/fix-peer-deps
Feb 27, 2026
Merged

fix: Make package.json accept newer versions of libs, e.g. Expo#886
msluszniak merged 4 commits intomainfrom
@ms/fix-peer-deps

Conversation

@msluszniak
Copy link
Copy Markdown
Member

@msluszniak msluszniak commented Feb 27, 2026

Description

This PR fixes package.json in both expo and bare resource fetchers.

Introduces a breaking change?

  • Yes
  • No

Type of change

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Documentation update (improves or adds clarity to existing documentation)
  • Other (chores, tests, code style improvements etc.)

Tested on

  • iOS
  • Android

Testing instructions

  • Run minimal app that utilizes this version of our library with expo 55 (pack react native executorch and expo resource fetchers into tgz and install in template app) and check if everything works correctly.
  • Run text to image example as this PR introduces changes in this package and check if everything works ok.

Screenshots

Related issues

Closes #882

Checklist

  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly
  • My changes generate no new warnings

Additional notes

@msluszniak msluszniak self-assigned this Feb 27, 2026
@msluszniak msluszniak added the bug fix PRs that are fixing bugs label Feb 27, 2026
@msluszniak msluszniak changed the title fix: Make package.json accept newer versions of lib fix: Make package.json accept newer versions of libs, e.g. Expo Feb 27, 2026
Comment thread packages/bare-resource-fetcher/package.json
@msluszniak
Copy link
Copy Markdown
Member Author

Unfortunately, it seems that Expo 55.0.3 does not included fix with newer RNScreens version, which blocks us from bumping expo in our example apps look here: software-mansion/react-native-screens#3682. So we need to wait for this until this will be merged.

@msluszniak msluszniak requested a review from chmjkb February 27, 2026 15:17
Copy link
Copy Markdown
Collaborator

@chmjkb chmjkb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, but we need to do the same thing on the 0.7 release branch and release a patched version so 0.7 supports Expo 55

@chmjkb
Copy link
Copy Markdown
Collaborator

chmjkb commented Feb 27, 2026

also TBH i don't understand why we're not just saving the image to FS on the native side, and returning the URI but that's not the point of this PR, am i missing something here?

@msluszniak
Copy link
Copy Markdown
Member Author

msluszniak commented Feb 27, 2026

also TBH i don't understand why we're not just saving the image to FS on the native side, and returning the URI but that's not the point of this PR, am i missing something here?

You mean specifically TextToImage TS part which was modified in this PR?
[EDIT] Same thing is with Style transfer. Fairly honest, I don't see any reason at first so I'll create an issue for that.

@chmjkb
Copy link
Copy Markdown
Collaborator

chmjkb commented Feb 27, 2026

also TBH i don't understand why we're not just saving the image to FS on the native side, and returning the URI but that's not the point of this PR, am i missing something here?

You mean specifically TextToImage TS part which was modified in this PR? [EDIT] Same thing is with Style transfer. Fairly honest, I don't see any reason at first so I'll create an issue for that.

Yeah, style transfer does this:

std::string StyleTransfer::postprocess(const Tensor &tensor,
                                       cv::Size originalSize) {
  cv::Mat mat = image_processing::getMatrixFromTensor(modelImageSize, tensor);
  cv::resize(mat, mat, originalSize);

  return image_processing::saveToTempFile(mat);
}

It would make sense to me that TTI does this too (and we wouldnt have to do the png stuff). This isn't really related to changes made in this PR, but a thought of mine

@msluszniak
Copy link
Copy Markdown
Member Author

Ok, right style transfer is ok, but typedocs are incorrect:

  /**
   * Executes the model's forward pass, where `imageSource` can be a fetchable resource or a Base64-encoded string.
   *
   * @param imageSource - The image source to be processed.
   * @returns The stylized image as a Base64-encoded string. THIS IS INCORRECT
   */
  async forward(imageSource: string): Promise<string> {
    if (this.nativeModule == null)
      throw new RnExecutorchError(
        RnExecutorchErrorCode.ModuleNotLoaded,
        'The model is currently not loaded. Please load the model before calling forward().'
      );
    return await this.nativeModule.generate(imageSource);
  }

@msluszniak msluszniak merged commit 00fd99c into main Feb 27, 2026
6 checks passed
msluszniak added a commit that referenced this pull request Feb 27, 2026
This PR fixes package.json in both expo and bare resource fetchers.

- [ ] Yes
- [x] No

- [x] Bug fix (change which fixes an issue)
- [ ] New feature (change which adds functionality)
- [ ] Documentation update (improves or adds clarity to existing
documentation)
- [ ] Other (chores, tests, code style improvements etc.)

- [x] iOS
- [ ] Android

* Run minimal app that utilizes this version of our library with expo 55
(pack react native executorch and expo resource fetchers into tgz and
install in template app) and check if everything works correctly.
* Run text to image example as this PR introduces changes in this
package and check if everything works ok.

<!-- Add screenshots here, if applicable -->

Closes #882

- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have updated the documentation accordingly
- [ ] My changes generate no new warnings

<!-- Include any additional information, assumptions, or context that
reviewers might need to understand this PR. -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug fix PRs that are fixing bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation expo 55

2 participants