* test(auth): fix flakiness in browser integration and webdriver tests
* Fix WebDriver email sign-in test flakiness by using robust JS click/fill
* Ensure deleteApp is called even if resetEmulator fails
* test(auth): catch emulator and deleteApp cleanup errors to prevent failing afterEach hook
* build: do not throw on missing deploying token if deployment is not needed
* build: add --include-dependencies to build_changed so dependents compile successfully
* build: workaround glob-stream singular glob Node 22 bug in firestore integration tests
* chore: revert allowEmpty: true
### Discussion
Upgrade `lerna` from `4.x` to `9.x`. This newer version of `lerna` is powered by `NX`, which also requires a newer minor version bump of `node` in our workflows, and slight changes our test execution parms.
The new version of Lerna is said to improve performance, and that seems to have exacerbated race conditions in the Auth test suites (@firebase/auth and @firebase/auth-compat). To resolve intermittent CI failures caused by these race conditions, I've configured these tests to run in serial instead of concurrently.
Also I needed to bump the node version of our workflows by 2 minor versions (20.10.0 -> 2.12.0) because Lerna 9.0.6 isn't supported in Node 20.10.0.
### Testing
- Clean repo, clean cache, clean dependency installs.
- CI, local builds and tests.
Note: The Firestore WebKit failure in the optional CI execution list is a known issue (b/524995481).
### API Changes
None.
Enable prettier caching (--cache) across all package prettier scripts and the main format script, and optimize the custom license header checker to read only the first 1000 bytes of each file.
Performance Data:
- Repo-wide formatting (yarn format --all):
- Before caching: ~35-40s (uncached formatting + full license check)
- After caching: ~5.8s (cached formatting + header-only license check)
- Speedup: ~6x speedup
* Filter empty text parts when streaming
* Add changeset
* Remove unused filterEmptyTextParts()
* Move logic into a function
* final
* dont throw if mock response file isn't found
* update responses version to 6
* Only ignore empty text parts in the aggregated response.
* review fixes
* Throw in `aggregateResponses` if `newPart` has no properties
* Consolidate CI test output into a single string
Having CI test process stdout and stderr in a single string makes it
easier to read when looking through failures, since you can see the test
output alongside the error messages.
Without this, any stderr output written during a test will be captured
seperately from the test output, so when we then log it after a test
failure, we can't tell which test logged which errors.
* Prefix stdout and stderr output
* 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
The default concurrency value for leran run is the number of logical CPU
cores. This is better than arbitrarily using 4 threads, since different
machines may be able to handle more.
The custom domain "firebase-sdk-health-metrics.com" currently
associated with the Metric Service will be deprecated eventually,
due to the acquisition of Google Domains by Squarespace.
Switching to the original URL created by Google Cloud Run (which
hosts the Metric Service) to avoid service disruption.
See b/303931111 for more details.
* Add docgen all script and update documentation
* Move toc to devsite, and rename to `_toc.yaml`
* Fix formatting
* Remove seperate toc CI check
* Update Contributing guide
* revert changes made to refdocs
A Firestore CI test configuration was previously disabled in our GitHub action Workflows due to a 100% failure rate. While revisiting this issue months later, it seems that the test now passes. This might be related to our Node v20 CI upgrade.
As a bonus, fixed a comment typo in the check changeset script.
Upgrade our CI scripts and workflows to work in Node 20.x:
- Updated workflows to use node 20.x across the board
- Updated tests which use the emualtor to connect to '127.0.0.1' explicitly instead of 'localhost', since newer versions of `node` treat `localhost` differently depending on the executing OS. For instance, `localhost` might resolve to the IPv6 address `::1`, but that's not the address that the emulators bind to.
- Updated `packages/rules-unit-testing/functions/package.json` `engines` directive to define `>=16` instead of requiring `16` explicitly.