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

feat: vertexAI package support #8236

Draft
wants to merge 79 commits into
base: main
Choose a base branch
from
Draft

feat: vertexAI package support #8236

wants to merge 79 commits into from

Conversation

russellwheatley
Copy link
Member

Description

Related issues

Release Summary

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
  • My change includes tests;
    • e2e tests added or updated in packages/\*\*/e2e
    • jest tests added or updated in packages/\*\*/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan


Think react-native-firebase is great? Please consider supporting the project with any of the below:

Copy link

vercel bot commented Jan 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-native-firebase ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 27, 2025 6:15pm

@russellwheatley russellwheatley changed the title init feat: vertexAI package support Jan 17, 2025
@mikehardy
Copy link
Collaborator

it was collapsed because this PR is pretty busy comment-wise + push-wise, but I only had one pending thing left I saw in review, and it was a documentation note that VertexAI requires iOS 15, which is higher than our current / general minimum.

#8236 (review)

previously (for e.g. auth where app-check modules require minSdk 25 vs current-app-baseline 23) we just put it in the module documentation as a note. That seems fine to me here personally at least and is quick+easy

@mikehardy
Copy link
Collaborator

@russellwheatley
The lint failure seems real, I reproduced the hang locally as well. It is your last remaining CI failure

But at the same time the current failure is sort of fake - it only hangs if it tries to digest packages/vertexai/dist in testing, and we don't care about that directory as it is a compile artifact, this seems like a reasonable fix:

diff --git a/.eslintignore b/.eslintignore
index f906059ad..97d12eabb 100644
--- a/.eslintignore
+++ b/.eslintignore
@@ -8,4 +8,6 @@ docs
 packages/template/project/**
 app.playground.js
 type-test.ts
-packages/**/modular/dist/**
\ No newline at end of file
+packages/**/modular/dist/**
+packages/vertexai/__tests__/test-utils
+packages/vertexai/dist
\ No newline at end of file

Then it runs without hanging but does expose a couple trivial errors that need a fix


/Users/mike/work/invertase/react-native-firebase/packages/app/lib/index.d.ts
  614:1  error  Delete `⏎`  prettier/prettier

/Users/mike/work/invertase/react-native-firebase/packages/app/lib/internal/logger.js
  76:5  warning  Unexpected console statement  no-console

✖ 2 problems (1 error, 1 warning)
  1 error and 0 warnings potentially fixable with the `--fix` option.


# Installation

This module requires that the `@react-native-firebase/app` module is already setup and installed. To install the "app" module, view the
Copy link
Collaborator

Choose a reason for hiding this comment

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

Make sure to note it requires iOS minimum target 15 - 13 is the minimum target for react-native-firebase as a whole so VertexAI is an outlier / special case #8236 (comment)

Comment on lines +18 to +24
import { polyfillGlobal } from 'react-native/Libraries/Utilities/PolyfillFunctions';
// @ts-ignore
import { ReadableStream } from 'web-streams-polyfill/dist/ponyfill';
// @ts-ignore
import { fetch, Headers, Request, Response } from 'react-native-fetch-api';

polyfillGlobal(
Copy link
Collaborator

Choose a reason for hiding this comment

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

@russellwheatley where did you learn this subtle voodoo !?
Curious for the source so I can see what it's doing...

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

Successfully merging this pull request may close these issues.

3 participants