29 Commits
Author SHA1 Message Date
Daniel La RocqueandGitHub dc3964e32d test(firestore): add vscode debug config for enterprise lite (#9621) 2026-03-11 15:52:51 -04:00
Daniel La RocqueandGitHub 1fab772d4d test(ai): prompt for grep string in debug script (#9400)
* test(ai): prompt for grep string in debug script

Mocha lets us filter tests using the `--grep` command-line option. This
is useful when debugging the AI integration tests, which run against a
grid of backend x model. With this grid there may me multiple redundant test runs,
and the tests may take >20 minutes.

With this new config, we can isolate the test we want to debug. Before
running, VSCode will prompt us for a regex to use for grepping tests by
name.
An example grep string would be
`Google AI gemini-2.0-flash generateContent: google search grounding`.

Without this, I've been manually editing the input test files to be the
file with the test I'm running, then manually editing
`integration/constants.ts` to remove the additional backends and model
names.

* update default and example
2025-12-01 15:28:45 -05:00
Daniel La RocqueandGitHub 56a0b60eab test(ai): do not run browser tests when debugging node tests (#9363) 2025-11-05 14:05:43 -05:00
Daniel La RocqueandGitHub 60fa358346 test(ai): add integration tests (#8853) 2025-06-05 12:50:13 -04:00
Daniel La RocqueandGitHub 8afa40af94 test: Clean up vscode launch file and add vertexai debug config (#9000) 2025-05-08 14:09:43 -04:00
Daniel La RocqueandGitHub 6c2e758589 Upgrade to TypeScript 5 (#8561) 2024-10-25 08:24:10 -04:00
Christina HollandandGitHub 56e2e84b92 Fix eslint vscode settings (#7264) 2023-04-27 11:50:15 -07:00
Tom AndersenandGitHub f8a509f0b9 Refactor Firestore tests to use targetBackend parameter (#6999)
* Refactor Firestore target backend parameters to simplify and better support preprod

* Undo `only` in test

* Formatting

* Fix

* Replace local with targetBackend=emulator

* Fix

* Run directly from ts file to avoid compiler problems.

* Remove unused dependency

* Remove unused dependency

* Remove unused dependency

* Fix test when running on emulator

* Override linter

* Add comments
2023-02-08 16:32:03 -05:00
43864c51a4 Fix for repoGet request (#6273)
Fixed issue where `get()` saved results incorrectly for non-default queries.

Co-authored-by: Jan Wyszynski <[email protected]>
2022-06-16 09:05:56 -07:00
f3fc038430 fix firestore node tests (#5741)
* fix firestore node tests

* Create plenty-trains-switch.md

* IntelliJ and VSCode runners for Babel (#5756)

* format

Co-authored-by: Sebastian Schmidt <[email protected]>
2021-12-03 14:34:45 -08:00
Kai WuandGitHub 3a321ace65 Create a logging service with flagsetDeliveryMetricsExportedToBigQueryEnabled to enable/disable (#5139) 2021-08-17 12:22:17 -07:00
Kai WuandGitHub 9c4c383ee9 Create experiment modularized FM SDK (#3822)
Check in FM modularzied SDK into exp directory
2020-12-21 10:51:56 -08:00
FeiyangandGitHub 5b167ea2fe Hide passed tests in CI (#2980)
* 1. Update mocha config file format 2. hide passed tests in CI

* prettier

* update mocha node config file name

* test

* use stricter regex, otherwise it matches mocha.browser.opts

* [AUTOMATED]: License Headers
2020-04-24 11:18:10 -07:00
FeiyangandGitHub a72ddac82e set up docgen and api review for packages-exp (#2868)
* set up doc gen tools

* save progress

* fix tsdocs

* create docs without -exp in package name

* enable api-report in app-types-exp

* set up doc and api review pipeline

* prepend underscore to internal only symbols

* remove api review

* [AUTOMATED]: Prettier Code Styling

* [AUTOMATED]: License Headers

* fix prepush hook

* add api report for app-types

* manually change the report file for testing

* [AUTOMATED]: API Reports

* centralize api review location

* rename docgen script

* enable json with comment in github
2020-04-03 18:37:39 -07:00
Thomas BouldinandGitHub 7bd5c390a5 Realtime Database increment operator
* Adds a prerelease copy of the increment operator (`_increment`)
* Updated local operations to handle increment as well as passing the server operation
* ServerValues now takes a copy of existing data, but uses JIT access to avoid performance regressions
* Lots of new tests
2020-03-30 13:06:27 -07:00
Brian ChenandGitHub 50983d2610 Fix VS Code launch.json to look for mocha/karma in the right location (#2642) 2020-02-28 10:02:54 -08:00
Michael LehenbauerandGitHub 30346af807 Fix VS Code launch.json to look for mocha/karma in right location. (#2435)
Due to c971f30945 we need to look for mocha / karma in the root node_modules folder instead of relative to packages/firestore.
2019-12-12 10:55:48 -08:00
Thomas BouldinandGitHub f8aa48b161 Add RTDB Node debug target (#2365) 2019-11-15 15:01:49 -08:00
James DanielsandGitHub 020ef40486 rxfire: Support collection groups & change detection fixess (#2223)
* rxfire was comparing documents based off ids, this was fine before collection group queries. Here I've switched to `ref.isEqual` like I have done in AngularFire.
* When a document is modified, we were only replacing the single doc in the array; this would not always trip change detection in frameworks as `===` would still equal true on the top level. Splicing it creates a new array, which will fail `===` and trip change detection.
* Further, this was an issue with the other operations as we were using splice. I'm now slicing to clone the array before modifying.
* NIT: Visual Studio Code's settings, which are committed, were not setup to track the workspace's version of Typescript. This tripped me up a little at first.
2019-10-18 00:38:12 -04:00
Brian ChenandGitHub f95ced428c Make vscode tests run against emulator (#2248) 2019-10-10 10:51:49 -07:00
Michael LehenbauerandGitHub 7c849709a0 Fix vscode test runners based on changes in #1561. (#1584)
TS_NODE_COMPILER_OPTIONS={"module":"commonjs"}. This change propagates this
into .vscode/launch.json.
2019-03-07 11:33:16 -08:00
Michael LehenbauerandGitHub 2f317d88f2 Firestore: Add "max-line-length" and "ordered-imports" tslint rules. (#1238)
This enforces a maximum line length (of 100) and import ordering via tslint rules and fixes all violations.

The line length violations were fixed manually. Prettier already targets a line length of 80 for code (but this isn't a strict limit) so mostly I just split string literals and long comments, but I did have to use tslint:disable in one place since prettier was formatting at > 100 chars.

The import ordering violations were fixed automatically via yarn lint:fix.
2018-09-21 11:01:58 -07:00
Sebastian Schmidt b51d30c494 Renaming mock_persistence to node_persistence 2018-04-30 13:37:49 -07:00
Michael LehenbauerandGitHub db43e7af70 Add VS Code launcher for persistence tests and minor cleanup. (#735)
* Add SQLite files to .gitignore so they don't pollute 'git status' or
  accidentally get committed.
* Use node-cleanup instead of process.on('exit') since it catches ctrl-C.
  Unfortunately it can't catch a pure SIGKILL.
2018-04-27 16:52:08 -07:00
Michael LehenbauerandGitHub ce8a1166df Update VSCode launch.json to match updated package.json config. (#459) 2018-01-22 10:03:55 -08:00
Michael LehenbauerandGitHub d9fc3eaf9f Revive Node.JS Support for Cloud Firestore (fixes #221). (#319)
* Fix miscellaneous node / GRPC bit rot.
  * Re-add grpc dependency (upgraded).
  * Avoid protobufjs dependency by loading protos via grpc.
  * Remove crazy grpc stream error handling nonsense that is no longer
    necessary after https://github.com/grpc/grpc/pull/9101
  * Clean up grpc_connection logging (and consistently use util.inspect()).
* Fix WebChannel / GRPC Connection compatibility issues.
  * Add an explicit mapping from "RPC name" (e.g. "BatchGetDocuments") to the
    REST url path (e.g. "batchGet") for WebChannel, and for GRPC just assume
    the first letter should be lowercased (e.g. "batchGetDocuments").
  * Split Connection.invoke() into invokeRPC() and invokeStreamingRPC(), with
    the latter accepting a stream of results and aggregating them into an
    array (needed to support BatchGetDocuments RPC).
* Fix serializer issues
  * Query limits are an 'Int32Value' but we were serializing them as a normal
    int which GRPC / protobufjs didn't like.
  * Several proto "oneof tags" were outdated.
* Add build steps to copy protos into npm package.
* Run integration tests for Node.JS
  * Added to 'test:node' script in package.json and in .vscode/launch.json
  * Include index.ts for browser and index.node.ts for node so the appropriate
    PlatformSupport gets registered.
* Misc cleanup
  * Remove unused MockPlatform since we use the normal NodePlatform now.
  * Remove 'google-auth-library' CredentialsProvider that we used to use for
    node.js (before we were integrated with FirebaseAuth).
  * Fixed several tests that were hitting node.js warnings about unhandled
    promise failures.
  * mocha commmand-line args:
    * "--compilers ts:ts-node/register" was deprecated in favor of
      "--require ts-node/register"
    * Remove "--retries 5" when running mocha tests from VS Code.
    * Consistently use "--require" instead of "-r"
    * Add "--exit" when running from VS Code.
2017-11-20 11:36:58 -08:00
Michael LehenbauerandGitHub eba194f7ec Dev-X improvements for running Firestore tests. (#243)
See new packages/firestore CONTRIBUTING.md doc for new abilities.

Changes:
* Add --local flag to run against a localhost Firestore server.
* Add --unit and --integration flags to limit to unit or integration tests.
* Make --grep work with karma / mocha to limit the tests that run.
* Change default karma port to 8089 to avoid conflicting with localhost
  Firestore server on 8080 (and other common web servers that default
  to 8080).
2017-10-20 10:07:49 -07:00
Josh CrowtherandGitHub 73a586c92a Monorepo Refactor (#171)
* Refactor monorepo to use yarn workspaces and lerna

WIP: testing

Refactor folder structure to use lerna

WIP: more testing

feat(util): add deferred class

Publish

 - @firebase/[email protected]
 - @firebase/[email protected]

WIP: asdoifj

WIP: build artifact

WIP: asdf

Cleaning up from .gitignore

Add prepublish script

Isolate base configs

Making top level scripts parallel

Adding storage

Add messaging

Adding database code

TODO: Fix all of the broken issues and import the rest of the utils

Adding type info

add database

Adding firebase package

Generating ES Module builds

Attaching firebase.js to the global scope

Adding lint-staged to the build

Removing commitizen dependency

Updating metafiles

Working on devx

Add react-native package

Move packages/firebase -> packages/core

Fix issues with package.json

Bump core version

testing a thing

Add more entries to the .npmignore

* Refactor to better separate ESM/CJS builds

* Adding test:setup script

* Fix breaking test (sourcemaps loaded in the test breaks the regex)

* Remove commitizen message from CONTRIBUTING.md

* WIP: Migrate integration tests

* Adding namespace integration tests

* Add messaging integration tests

* Fix issue with indv-module builds

* Committing yarn.lock

* Import 4.4.0 Changes

* Add dev scripts, move core -> firebase

* Add missing dependencies, flesh out dev experience

* Add top level repl for test/debugging

* Make the REPL pretty

* Refactor to scope prepublish execution

* Add @firebase/auth

* Fixing broken int tests

* Picking up missing changes from edad44d9bc

* Adding comment to .prettierignore

* Fixed issue where firebase didn't exist on reset

* Update yarn.lock for lint-staged

* Refactor test setup script and .travis.yml

* Fix firebase package dep versions

* Refactor precommit hook -> prepush hook

* [AUTOMATED]: Format Styling

* Update prettier and prettierrc

* [AUTOMATED]: Format Styling

* Adding dist to .prettierignore

* Fixing some oddities in yarn.lock

* Refactor hooks prepublish -> prepare

* Updating top-level scripts

* Add pretest validation/checking

* [AUTOMATED]: Prettier Code Styling

* Running travis tests w/ xvfb-run

* Add a spinner instead of the prettier stdio

* update yarn.lock

* [AUTOMATED]: Prettier Code Styling

* Fixing child process STDOUT

* [AUTOMATED]: Prettier Code Styling

* Switch to using stopAndPersist()

* Moving file gitHooks/index.js -> gitHooks/prepush.js

* Remove legacy .lintstagedrc

* Add typinngs file for those only including fiebase/app

* Add initial stub for @firebase/polyfill

* Adding new clean yarn.lock

* Refactor const -> var (no transpiling)

* Add automated license header validation

* [AUTOMATED]: Prettier Code Styling

* [AUTOMATED]: License Headers

* Aesthetic prepush validation things

* [AUTOMATED]: Prettier Code Styling

* Add karma-sauce-launcher

* Attempt 1: Try to get saucelabs browser testing working

* Attempt 2: Adding sauceLabs config prop to karma.base

* [AUTOMATED]: Prettier Code Styling

* Attempt 3: Getting rid of the connectOptions

* [AUTOMATED]: Prettier Code Styling

* Fix CODEOWNERS

* Add module boilerplate for @firebase/firestore

* Refactor Firestore source to standalone package

* Remove unneeded typings

* Remove unneeded promise dependency

* Fix top level paths

* Bump firebase package version

* Fix firestore source paths

* Fix @firebase/app reference

* Refactor to fix TSC errors

* Refactor to make node unit tests work

* Publish

 - @firebase/[email protected]
 - @firebase/[email protected]
 - @firebase/[email protected]
 - [email protected]
 - @firebase/[email protected]
 - @firebase/[email protected]
 - @firebase/[email protected]
 - @firebase/[email protected]
 - @firebase/[email protected]

* Add firestore to main firebase binary

* Pin firebase package to strict versions

* Fix browser firestore tests

* [AUTOMATED]: Prettier Code Styling

* [AUTOMATED]: License Headers

* Changing base karma browsers

* Disabling cross-browser karma tests

* [AUTOMATED]: Prettier Code Styling

* Removing sauce_connect addon from .travis.yml

* Refactor messaging test script

* Refactor the browserNoActivityTimeout

* [AUTOMATED]: Prettier Code Styling

* Adding polyfills to the main browser bundles

* Add firestore/README.md

TODO(jshcrowthe): Fix these tests per the comments in this file

* Fix firestore VSCode scripts

* Fix regex for firestore __data__ prop

* [AUTOMATED]: Prettier Code Styling

* Initial Commit

* Add a brief README.md

* Add *.tgz to .npmignore

* Publish: v0.1.1

* Turn on advanced optimizations for this code

* Leverage "ADVANCED_OPTIMIZATIONS" mode in closure compilation

* 0.2.0

* Add XhrIo prototype overrides

* 0.2.1

* Remove unneeded lockfile

* Fixing dependency versions

* [AUTOMATED]: Prettier Code Styling

* [AUTOMATED]: License Headers

* TEMP: Remove saucelabs reporter

* Fix prettier styling bug (fights with closure)

* Update firebase/app typings

* Leverage default exports

* Updating top-level README.md

* Refactor mocha timeout to be 20 seconds for firestore

* Addressing some review comments from @mikelehen

* temp

* Fixing license header spacing issues

* Refactor license header check

* [AUTOMATED]: Prettier Code Styling

* [AUTOMATED]: License Headers

* Revert "[AUTOMATED]: License Headers"

This reverts commit 559068ceb070519f39207e15886e147787cd941a.

* Revert "Refactor license header check"

This reverts commit 34c671ab9730d6480e487b6ddcd7283f7df3979a.

* Fixing more license headers

* Add @wilhuff and @wti806 to CODEOWNERS

* Adding one more --auto-watch flag

* Add 3 retries to firestore tests

* Bumping browserNoActiityTimeout

* @firebase/app - package.json housekeeping

* @firebase/auth - README.md housekeeping

* @firebase/database - README.md housekeeping

* @firebase/firestore - README.md housekeeping

* Updating auth readme

* @firebase/messaging - README.md housekeeping

* Updating database readme

* Fixing issue with messaging/package.json (copy-paste fail)

* @firebase/polyfill - README.md housekeeping

* @firebase/storage - README.md housekeeping

* @firebase/util - README.md housekeeping

* Fixing package.json repo links

* Refactor from PromiseLike -> Promise

* Add firebase externs

* [AUTOMATED]: Prettier Code Styling

* Fix license values in package.json
2017-10-06 20:15:50 -07:00
Josh Crowther f49c8b5c50 Add Cloud Firestore Support 2017-10-03 07:23:13 -07:00