* test: prompt for WebKit playwright installation
Adds a check to see if WebKitHeadless is available, and prompts the user
for permission to install it with playwright if it's not installed.
* format
There were a pair of `download-artifact` GitHub actions that were still set to `v3` instead of `v4`. The `v3` actions were unable to find the build archive in the test-changed-firestore workflow. This PR upgrades those to `v4` actions.
The new .stream() API allows the client to consume streaming responses from the WIP streaming callable functions in Firebase Functions Node.js SDK.
When client makes a request to the callable function w/ header Accept: text/event-stream, the callable function responds with response chunks in Server-Sent Event format.
The sdk changes here abstracts over the wire-protocol by parsing the response chunks and returning an instance of a AsyncIterable to consume to data:
import { getFunctions, httpsCallable } from "firebase/functions";
const functions = getFunctions();
const generateText = httpsCallable(functions, 'generateText');
const resp = await generateText.stream(
{ text: 'What is your favorite Firebase service and why?' },
{ signal: AbortSignal.timeout(60_000) },
);
try {
for await (const message of resp.stream) {
console.log(message); // prints "foo", "bar"
}
console.log(await resp.data) // prints "foo bar"
} catch (e) {
// FirebaseError(code='cancelled', message='Request was cancelled.');
console.error(e)
}
* Add node engines fields specifying a minimum of 18 (#8457)
* Make memory lru gc the default (#8110)
* Make memory lru gc the default
* undo yarn.lock
* Make memory lru gc the default
* Fix tests
* V11 release removal of node-fetch and undici dependencies (#8492)
Our v11 release will require node 18+. Since fetch has been introduced in these node versions, we can remove our dependency on third party fetch implementations.
This change removes our usage of fetch variants undici and node-fetch for our node target builds and our CI tools.
* V11 - Remove functions node bundle (#8507)
With the removal of fetch we no long need to create a node bundle for functions. Instead the sourcebase may become isomorphic, so long as we remove the older node sources. And that's what the PR does!
* Initial changes for Vertex GA packaging (#8498)
* [Vertex GA] Rewrite Schema (#8479)
* [Vertex GA] Add new endpoint and error message. (#8497)
* [Vertex GA] Miscellaneous breaking changes for Vertex GA (#8514)
* Remove ES5 Support (#8509)
* Emit a module package file for functions ESM builds (#8517)
* Update API_NOT_ENABLED error for Vertex (#8549)
* Upgrade cjs bundles for storage and performance (#8557)
These should have been part of the bigger PR, but I missed these.
* Rollup JS files with rollup-typescript-plugin (#8503)
The rollup-typescript-plugin does not transpile JS files using the TS
compiler by default. This means that external dependencies that provide
JS bundles will not be transpiled to the target ES version specified in
the TypeScript config used by the plugin.
This resulted in one of our dependencies (https://github.com/jakearchibald/idb)
being included in the CDN bundles without being transpiled to
ES5 (the target ES version). Since this dependencies bundle uses
ES2018 syntax (object spread operator `{ ...x }`), this upgraded our CDN
bundles' minimum ES version requirement to ES2018 which isn't compatible with older browser versions.
To see the ES2018 syntax in one of the CDN bundles, see
https://www.gstatic.com/firebasejs/10.13.1/firebase-app.js and search for `...oldTraps`.
* Fix tsc errors in vertex tests (#8562)
* Make SafetySettings.method optional (#8567)
* Make SafetySettings.method optional
* Update API reports
---------
Co-authored-by: hsubox76 <[email protected]>
* [Vertex GA] Regenerate docs after Vertex GA changes (#8505)
* Close emulator file after download is complete (#8572)
* close file
* Add test:ci to end of test command in CI
* revert workflow file changes
* format
* rename vertexai package reference in a changeset (#8573)
* Missed one doc change from a PR (#8575)
* Overwrite undefined candidate index (#8577)
* Overwrite undefined candidate index
* Fix index overwrite condition to only be true when index is not a property
* Upgrade Vertex Mock Responses to V5 (#8579)
* Upgrade to mock responses v4
* Upgrade from v4 to v5 mock responses
---------
Co-authored-by: wu-hui <[email protected]>
Co-authored-by: DellaBitta <[email protected]>
Co-authored-by: Daniel La Rocque <[email protected]>
Co-authored-by: hsubox76 <[email protected]>
* Introduce WebkitHeadless browser testing
Replace Safari with WebkitHeadless in list of supported karma browsers
Install playwright browsers in CI
Set WEBKIT_HEADLESS_BIN
Update launcher version
Run firestore test changed on push
Fix
Don't use in test-changed-firestore
Ignore failing tests
* Formatting
* Respond to review comments
Added the `yarn trusted-type-check` script to all packages. The script runs https://github.com/google/tsec to report possible security issues related to XSS.
Previously we ran into an issue where we couldn't use the latest firebase-tools CLI version (v13+) due to an error attempting to deploy the E2E cloud function.
The error was due to a new requirement of the CLI that `firebase.json` requires a `functions` configuration. This change adds that configuration and pins the firebase CLI version to 13.0.2.
* Add limited token support for functions
* add test, works as a unit test, broken karma
* Finish adding support for app check callable functions SDK
* PR Feedback
* Doc feedback
Co-authored-by: Kevin Cheung <[email protected]>
* s/useLimitedUseAppCheckToken/limitedUseAppCheckTokens/g
* PR Feedback
---------
Co-authored-by: Samuel Bushi <[email protected]>
Co-authored-by: Kevin Cheung <[email protected]>
Fixed issue where if a listener on a filtered query with a server-side index is created with a listener at a non-intersecting path would cause incorrect results to be reported.
* exports for analytics
* support exports for app
* support exports for app-check
* add exports to auth
* support exports for auth-compat
* add exports to component
* add exports to database packages
* exports for firestore
* add exports to functions
* add exports to installations
* add exports to logger
* add exports to messaging
* add exports to perf
* add exports to rc
* add exports to storage
* update template
* add exports to util
* add exports to webchannel
* use default import to import cjs libs
* make node code esm compatible
* remove esm entrypoint for app in nodejs to mininize dual package hazard
* reorganize builds by env
* fix typo
* format
* remove esm entrypoint for nodejs for fcm
* expose package.json to nodejs
* fix
* fix path in build
* simplify exports
* formatting
* enable esModuleInterop
* use default import
* use default import
* remove esm support for Nodejs in messaging
* use esm2017 builds by default for util libs
* Create heavy-books-mate.md
* fix tests
* get function name properly
* Create wet-queens-tell.md
* update