-
Notifications
You must be signed in to change notification settings - Fork 924
Fei v9 main firestore #5319
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
Fei v9 main firestore #5319
Conversation
|
@@ -33,31 +29,32 @@ | |||
"test:lite:prod": "node ./scripts/run-tests.js --platform node_lite --main=lite/index.ts 'test/lite/**/*.test.ts'", | |||
"test:lite:browser": "karma start --single-run --lite", | |||
"test:lite:browser:debug": "karma start --browsers=Chrome --lite --auto-watch", | |||
"pretest": "yarn test:prepare", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unlike the database PR, all tests including the compat tests remain in the main firestore
package. I tried to move compat tests to firestore-compat
, but it got really messy and requires exporting a lot of internal symbols from the main package.
pretest
copies source code from firestore-compat
to the compat
folder in the main package, and replaces import path from @firebase/firestore
to directly point to source code in the main package. This recreates the code structure before the split, so tests run correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
However there are 2 issues I haven't figure out, and need your help:
test:node:prod
doesn't run- There are 2 failing tests when running
test:browser
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will take a lot this morning.
Changeset File Check
|
@@ -33,31 +29,32 @@ | |||
"test:lite:prod": "node ./scripts/run-tests.js --platform node_lite --main=lite/index.ts 'test/lite/**/*.test.ts'", | |||
"test:lite:browser": "karma start --single-run --lite", | |||
"test:lite:browser:debug": "karma start --browsers=Chrome --lite --auto-watch", | |||
"pretest": "yarn test:prepare", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will take a lot this morning.
|
||
prepareTest(); | ||
|
||
function prepareTest() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried just updating the import paths, similar to what we do for platform injection?
I also wonder if this new setup makes is hard to use IDEs to run the test since the won't invoke this rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that it work for node tests?
For sure it's one more thing you need to do, but you only have to do it once.
I think long term, we want to rewrite these tests and remove the dependencies on the compat layer.
* Always block on Auth * Don't block on token if already recevied
* compile firestore * update typings path * compile firestore compat * lint compat * make test work * get most tests work * build * remove special paths * update firestore-compat pkg json * fix merge issues * Simplify bundles * Prettier * Fix Bundle compile * Fix build * address comments * console build * Fix all tests * Prettier * fix merge issues * fix typo * update paths * app-exp * fix lint * correct path * fix * fix compat lint * fix firestore integration * fix workflow * update dep * Always block on Auth (#5340) * Always block on Auth * Don't block on token if already recevied * fix lint * build firestore * remove memory only tests * fix firebase integration tests * enable more build and tests * add firestore-compat to firebase dep * fix auth compat class * enable auth test * auth package doc * Update API reports Co-authored-by: Sebastian Schmidt <[email protected]> Co-authored-by: Feiyang1 <[email protected]>
* compile firestore * update typings path * compile firestore compat * lint compat * make test work * get most tests work * build * remove special paths * update firestore-compat pkg json * fix merge issues * Simplify bundles * Prettier * Fix Bundle compile * Fix build * address comments * console build * Fix all tests * Prettier * fix merge issues * fix typo * update paths * app-exp * fix lint * correct path * fix * fix compat lint * fix firestore integration * fix workflow * update dep * Always block on Auth (#5340) * Always block on Auth * Don't block on token if already recevied * fix lint * build firestore * remove memory only tests * fix firebase integration tests * enable more build and tests * add firestore-compat to firebase dep * fix auth compat class * enable auth test * auth package doc * Update API reports Co-authored-by: Sebastian Schmidt <[email protected]> Co-authored-by: Feiyang1 <[email protected]>
* compile firestore * update typings path * compile firestore compat * lint compat * make test work * get most tests work * build * remove special paths * update firestore-compat pkg json * fix merge issues * Simplify bundles * Prettier * Fix Bundle compile * Fix build * address comments * console build * Fix all tests * Prettier * fix merge issues * fix typo * update paths * app-exp * fix lint * correct path * fix * fix compat lint * fix firestore integration * fix workflow * update dep * Always block on Auth (#5340) * Always block on Auth * Don't block on token if already recevied * fix lint * build firestore * remove memory only tests * fix firebase integration tests * enable more build and tests * add firestore-compat to firebase dep * fix auth compat class * enable auth test * auth package doc * Update API reports Co-authored-by: Sebastian Schmidt <[email protected]> Co-authored-by: Feiyang1 <[email protected]>
* Split storage and storage-compat (#5271) * separate storage-compat from storage * commit * fix tests * wat? * build storage-compat * save * fixing some compat tests * format * update import path * format * get compat tests to work * format * update package json * cleanup * format * address comments * Update packages/storage-compat/test/unit/service.test.ts Co-authored-by: Christina Holland <[email protected]> * add missing dev dep * Update packages/storage-compat/package.json * Update packages/storage-compat/package.json * Update deps after v8 release * update compat version * Split database and database-compat (#5276) * compile database * pass database tests * compile and test database-compat * pass all tests * prettier * cleanup * fix lint * address comments * what is going on with ci * use correct case in import path * uppercase * rename * fix component name * Repo refactoring for v9 (#5325) * rename folders * rename folders * migrate app and app-compat * migrate installations and analytics * migrate app check * migrate auth * migrate functions * migrate messaging * migrate performance * migrate remoteconfig * remove v8 code * update versions * migrate firebase * fix merge issues * save * fix firebase builds * update changeset config * update build scripts * update release script * fix functions typings * remove redundant typings * update path * treat external dependencies correctly * fix lint * remove firestore-compat references * fix build issues * update build scripts * update pkg json * fix test * fix some tests * fix some tests * fix integration tests * fixes * fix dep * update ci tests * resolve todos * remove exp references * docgen build * export FirebaseError (#5349) * firebase packaging update (#5348) * Fei v9 main firestore (#5319) * compile firestore * update typings path * compile firestore compat * lint compat * make test work * get most tests work * build * remove special paths * update firestore-compat pkg json * fix merge issues * Simplify bundles * Prettier * Fix Bundle compile * Fix build * address comments * console build * Fix all tests * Prettier * fix merge issues * fix typo * update paths * app-exp * fix lint * correct path * fix * fix compat lint * fix firestore integration * fix workflow * update dep * Always block on Auth (#5340) * Always block on Auth * Don't block on token if already recevied * fix lint * build firestore * remove memory only tests * fix firebase integration tests * enable more build and tests * add firestore-compat to firebase dep * fix auth compat class * enable auth test * auth package doc * Update API reports Co-authored-by: Sebastian Schmidt <[email protected]> Co-authored-by: Feiyang1 <[email protected]> * rebasing * Create registerMessagingCompat.ts * Add changeset for v9 (#5350) * add changeset * publish messaging interop * add firestore bumps * update changeset * Revert "Create registerMessagingCompat.ts" This reverts commit 0b95a51. * Revert "rebasing" This reverts commit a8bf697. * Update index.d.ts (#5355) * Fix Context Check in `Messaging-Compat` (#5353) * Add Rules Unit Testing v2 skeleton for v9 release (#5352) * Reset package for next major version. * Switch emulator script to node-fetch. * Migrate the other request call to fetch. * Update packages/rules-unit-testing/package.json Co-authored-by: Feiyang <[email protected]> * Create stale-ducks-live.md * Revert version change. Co-authored-by: Feiyang <[email protected]> * fix import path (#5356) * Add new types and function stubs for RUT vNext. (#5316) * Add new types and function stubs. * Fix types for testEnv.emulators. * Add util functions. * Add withFunctionTriggersDisabled overloads. * Improve typing for EmulatorConfig. * Fix tests. * Rename test_environment.ts to initialize.ts. * Add a dummy test to make CI pass. * Implement emulators discovery in RUTv2. (#5334) * Add new types and function stubs. * Fix types for testEnv.emulators. * Add util functions. * Add withFunctionTriggersDisabled overloads. * Improve typing for EmulatorConfig. * Fix tests. * Rename test_environment.ts to initialize.ts. * Add a dummy test to make CI pass. * Implement emulators discovery. * Use URL object from global. * Fix unreachable error code. * Implement most of RUTv2 features. (#5343) * Implement most of RUTv2 features. * Switch to compat instances. * Remove legacy code. * Use public typings for release (#5358) * use public typings for storage * use public typings for database * Implement rest of RUTv2 features. (#5360) * Implement loading rules and withFunctionTriggersDisabled. * Implement clearFirestore and storage. * Add missing await. * Add default bucketUrl. * Use alternative method to clear bucket. * Use default param (review feedback). * Storage typing updates (#5359) * rename to StorageError * more type safety * Update API reports * update api report Co-authored-by: Feiyang1 <[email protected]> * correct component name * fix installtions-compat typing * remove rules-unit-testing from ignore list * reenable things * support mjs files * correct matching pattern * transform only @firebase/util * use public types for database doc * transform all but compat packages Co-authored-by: Sebastian Schmidt <[email protected]> Co-authored-by: Feiyang1 <[email protected]> Co-authored-by: kai <[email protected]> Co-authored-by: Yuchen Shi <[email protected]> Co-authored-by: Kai Wu <[email protected]>
No description provided.