firebase / firebase-js-sdk

Firebase Javascript SDK
https://firebase.google.com/docs/web/setup
Other
4.82k stars 886 forks source link

v9 `collection()` not working with @firebase/rules-unit-testing "Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore" #6080

Closed mikob closed 2 years ago

mikob commented 2 years ago

I am trying to update my unit tests to work with firebase v9. For firebase v8 I had used mocks and dependency injection, but this is harder with v9 as now every method (e.g. collection, getDoc, setDoc) is separated. In comes this guide: https://firebase.google.com/docs/rules/unit-tests I have it partially working with this new rules unit testing library, but it seems to break with a firebase v9 call to firestore collection() with this error:

  Rejected promise returned by test. Reason:

  FirebaseError {
    code: 'invalid-argument',
    customData: undefined,
    toString: Function {},
    message: 'Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore',
  }

Steps to reproduce:

Relevant Code:

import fs from "fs";
import {
  assertSucceeds,
  initializeTestEnvironment,
  RulesTestEnvironment,
} from "@firebase/rules-unit-testing";
import { collection } from "firebase/firestore";

const EMAILS_BY_PLAN = {
    0: "test@lipsurf.com"
};
const fsTestEnv = await initializeTestEnvironment({
  projectId: "demo-lipsurf",
  firestore: {
    host: "0.0.0.0",
    port: 8080,
    rules: fs.readFileSync("../backend/firebase/firestore.rules", "utf8"),
  },
});
await fsTestEnv.withSecurityRulesDisabled(async (context) => {
  const db = context.firestore();
  for (const plan in EMAILS_BY_PLAN) {
    const email = EMAILS_BY_PLAN[plan];
    const doc = db.collection("users").doc(email);
    await assertSucceeds(
      doc.set({
        plan: +plan,
      })
    );
  }
});

const db = fsTestEnv
  .authenticatedContext(EMAILS_BY_PLAN[FREE_PLAN])
  .firestore();

// This is the line that throws the error
collection(db, "users")
// this works
// db.collection("users")

The reason I'm not simply switching to the v8 way of doing things is because that's the way my code works everywhere since I've migrated to v9. Perhaps I have the wrong approach all-together? Maybe I need some kind of mocking library to handle calls to firestore? Worth noting that I'm using the v9 compatibility library (because of firebase-ui).

schmidt-sebastian commented 2 years ago

Can you run npm list and show us the versions your are using? We would like to know whether multiple versions of Firebase are installed.

mikob commented 2 years ago
├─ @ava/cooperate@npm:1.0.0
│  ├─ Instances: 1
│  ├─ Version: 1.0.0
│  │
│  └─ Dependencies
│     └─ never@npm:^1.0.3 → npm:1.1.0
│
├─ @babel/polyfill@npm:7.12.1
│  ├─ Version: 7.12.1
│  │
│  └─ Dependencies
│     ├─ core-js@npm:^2.6.5 → npm:2.6.12
│     └─ regenerator-runtime@npm:^0.13.4 → npm:0.13.9
│
├─ @bugsnag/js@npm:7.15.1
│  ├─ Version: 7.15.1
│  │
│  └─ Dependencies
│     ├─ @bugsnag/browser@npm:^7.15.1 → npm:7.15.1
│     └─ @bugsnag/node@npm:^7.15.1 → npm:7.15.1
│
├─ @firebase/rules-unit-testing@npm:2.0.2
│  ├─ Instances: 1
│  ├─ Version: 2.0.2
│  │
│  └─ Dependencies
│     └─ node-fetch@npm:2.6.7 → npm:2.6.7
│
├─ @lipsurf/cli@workspace:packages/cli
│  ├─ Version: 2.4.2
│  │
│  ├─ Exported Binaries
│  │  └─ lipsurf-cli
│  │
│  └─ Dependencies
│     ├─ @lipsurf/types@^2.2.0 → workspace:packages/types
│     ├─ @swc/core@npm:^1.2.127 → npm:1.2.127
│     ├─ @types/node@npm:^16.11.1 → npm:16.11.2
│     ├─ chokidar@npm:^3.5.2 → npm:3.5.2
│     ├─ clone@npm:^2.1.2 → npm:2.1.2
│     ├─ commander@npm:^8.3.0 → npm:8.3.0
│     ├─ esbuild@npm:^0.14.25 → npm:0.14.25
│     ├─ globby@npm:^11.0.4 → npm:11.0.4
│     ├─ js-beautify@npm:^1.13.5 → npm:1.14.0
│     ├─ lodash@npm:^4.17.21 → npm:4.17.21
│     └─ typescript@patch:typescript@4.5.5#~builtin<compat/typescript> → patch:typescript@npm%3A4.5.5#~builtin<compat/typescript>::version=4.5.5&hash=493e53
│
├─ @lipsurf/common@link:../common/dist::locator=%40lipsurf%2Fextension%40workspace%3Apackages%2Fextension
│  └─ Version: 0.0.0
│
├─ @lipsurf/extension@workspace:packages/extension
│  ├─ Version: 4.8.1
│  │
│  └─ Dependencies
│     ├─ @babel/polyfill@npm:^7.4.4 → npm:7.12.1
│     ├─ @bugsnag/js@npm:^7.15.1 → npm:7.15.1
│     ├─ @lipsurf/cli@^2.4.2 → workspace:packages/cli
│     ├─ @lipsurf/common@link:../common/dist::locator=%40lipsurf%2Fextension%40workspace%3Apackages%2Fextension → link:../common/dist::locator=%40lipsurf%2Fextension%40workspace%3Apackages%2Fextension
│     ├─ @lipsurf/types@^2.2.0 → workspace:packages/types
│     ├─ @picovoice/porcupine-web-en-worker@npm:^2.0.2 → npm:2.0.2
│     ├─ @picovoice/web-voice-processor@npm:^2.1.3 → npm:2.1.3
│     ├─ @trust/webcrypto@npm:^0.9.2 → npm:0.9.2
│     ├─ @types/amplitude-js@npm:^8.0.1 → npm:8.0.1
│     ├─ @types/chrome@npm:^0.0.173 → npm:0.0.173
│     ├─ @types/esprima@npm:^4.0.1 → npm:4.0.3
│     ├─ @types/finalhandler@npm:^1.1.1 → npm:1.1.1
│     ├─ @types/jsdom@npm:^11.0.4 → npm:11.12.0
│     ├─ @types/lodash@npm:^4.14.165 → npm:4.14.176
│     ├─ @types/sinon@npm:^4.3.0 → npm:4.3.3
│     ├─ @types/stripe-checkout@npm:^1.0.3 → npm:1.0.4
│     ├─ @types/tmp@npm:^0.1.0 → npm:0.1.0
│     ├─ @typescript/lib-dom@npm:@types/web@* → @types/web@npm:0.0.42
│     ├─ amplitude-js@npm:^8.9.1 → npm:8.9.1
│     ├─ async-exit-hook@npm:^2.0.1 → npm:2.0.1
│     ├─ awesomplete@npm:^1.1.4 → npm:1.1.5
│     ├─ chokidar@npm:^3.5.2 → npm:3.5.2
│     ├─ chrome-remote-interface@npm:^0.28.0 → npm:0.28.2
│     ├─ cli-table@npm:^0.3.1 → npm:0.3.6
│     ├─ commander@npm:^7.2.0 → npm:7.2.0
│     ├─ concurrently@npm:^6.3.0 → npm:6.3.0
│     ├─ deepdash@npm:^5.2.1 → npm:5.3.9
│     ├─ esbuild-node-loader@npm:^0.8.0 → npm:0.8.0
│     ├─ esbuild@npm:^0.14.25 → npm:0.14.25
│     ├─ finalhandler@npm:^1.1.2 → npm:1.1.2
│     ├─ firebase@npm:^9.6.9 → npm:9.6.9
│     ├─ globby@npm:^11.0.4 → npm:11.0.4
│     ├─ ignore-emit-webpack-plugin@npm:^2.0.2 → npm:2.0.6
│     ├─ imagemin-gifsicle@npm:^7.0.0 → npm:7.0.0
│     ├─ imagemin-jpegtran@npm:^7.0.0 → npm:7.0.0
│     ├─ imagemin-optipng@npm:^8.0.0 → npm:8.0.0
│     ├─ imagemin-svgo@npm:^9.0.0 → npm:9.0.0
│     ├─ kuromoji@https://github.com/lipsurf/kuromoji.js#indexeddb-cache → https://github.com/lipsurf/kuromoji.js.git#commit=d5f13621019aa017bc4938d140cad6f194e7bd54
│     ├─ lodash@npm:^4.17.21 → npm:4.17.21
│     ├─ magic-string@npm:^0.25.7 → npm:0.25.7
│     ├─ mem@npm:^9.0.1 → npm:9.0.1
│     ├─ moment@npm:^2.29.1 → npm:2.29.1
│     ├─ node-gtts@npm:^2.0.2 → npm:2.0.2
│     ├─ nodemon@npm:2.0.15 → npm:2.0.15
│     ├─ nyc@npm:^13.1.0 → npm:13.3.0
│     ├─ primeicons@npm:^4.1.0 → npm:4.1.0
│     ├─ primevue@npm:^3.4.0 → npm:3.8.1
│     ├─ semver@npm:^7.3.5 → npm:7.3.5
│     ├─ sinon@npm:^11.1.1 → npm:11.1.2
│     ├─ terser@npm:^5.9.0 → npm:5.9.0
│     ├─ tippy.js@npm:^6.3.2 → npm:6.3.2
│     ├─ tmp@npm:^0.1.0 → npm:0.1.0
│     ├─ tslib@npm:^1.9.3 → npm:1.14.1
│     ├─ typescript@patch:typescript@4.5.5#~builtin<compat/typescript> → patch:typescript@npm%3A4.5.5#~builtin<compat/typescript>::version=4.5.5&hash=493e53
│     ├─ vue-slider-component@npm:^4.0.0-beta.3 → npm:4.0.0-beta.5
│     ├─ vue-style-loader@npm:^4.1.3 → npm:4.1.3
│     ├─ vue@npm:^3.2.31 → npm:3.2.31
│     ├─ vuepress-vite@npm:^2.0.0-beta.32 → npm:2.0.0-beta.32
│     ├─ webpack-bundle-analyzer@npm:^4.4.1 → npm:4.5.0
│     ├─ webpack-merge@npm:^5.7.3 → npm:5.8.0
│     ├─ @ava/cooperate@npm:^1.0.0 → npm:1.0.0 [e29a6]
│     ├─ @firebase/rules-unit-testing@npm:^2.0.2 → npm:2.0.2 [e29a6]
│     ├─ @lipsurf/plugins@^4.5.0 → workspace:packages/plugins [e29a6]
│     ├─ @lipsurf/premium-plugins@^4.7.2 → workspace:packages/premium-plugins [e29a6]
│     ├─ @vue/eslint-config-typescript@npm:7.0.0 → npm:7.0.0 [e29a6]
│     ├─ ava@npm:^4.1.0 → npm:4.1.0 [c101e]
│     ├─ copy-webpack-plugin@npm:^8.1.1 → npm:8.1.1 [e29a6]
│     ├─ css-loader@npm:^5.2.4 → npm:5.2.7 [e29a6]
│     ├─ css-minimizer-webpack-plugin@npm:^2.0.0 → npm:2.0.0 [e29a6]
│     ├─ esbuild-plugin-vue3@npm:^0.2.4 → npm:0.2.4 [e29a6]
│     ├─ esbuild-runner@npm:^2.2.1 → npm:2.2.1 [e29a6]
│     ├─ file-loader@npm:^6.0.0 → npm:6.2.0 [e29a6]
│     ├─ firebaseui@npm:^6.0.1 → npm:6.0.1 [e29a6]
│     ├─ fork-ts-checker-webpack-plugin@npm:^7.2.1 → npm:7.2.1 [e29a6]
│     ├─ html-loader@npm:^1.1.0 → npm:1.3.2 [e29a6]
│     ├─ html-minimizer-webpack-plugin@npm:^2.1.0 → npm:2.1.0 [e29a6]
│     ├─ image-minimizer-webpack-plugin@npm:^2.2.0 → npm:2.2.0 [e29a6]
│     ├─ jsdom@npm:^15.0.0 → npm:15.2.1 [e29a6]
│     ├─ mini-css-extract-plugin@npm:^1.5.0 → npm:1.6.2 [e29a6]
│     ├─ postcss-import@npm:^14.0.2 → npm:14.0.2 [e29a6]
│     ├─ raw-loader@npm:^4.0.2 → npm:4.0.2 [e29a6]
│     ├─ remove-files-webpack-plugin@npm:^1.4.4 → npm:1.4.5 [e29a6]
│     ├─ size-plugin@npm:^1.1.1 → npm:1.2.0 [e29a6]
│     ├─ style-loader@npm:^2.0.0 → npm:2.0.0 [e29a6]
│     ├─ terser-webpack-plugin@npm:^5.1.4 → npm:5.2.4 [e29a6]
│     ├─ ts-babel-node@looker/ts-babel-node → https://github.com/looker/ts-babel-node.git#commit=8ded2a66899de69945e426b8e3b2b27287b0a395 [e29a6]
│     ├─ ts-essentials@npm:^9.1.2 → npm:9.1.2 [e29a6]
│     ├─ ts-loader@npm:^9.2.6 → npm:9.2.6 [e29a6]
│     ├─ vue-loader@npm:16.5.0 → npm:16.5.0 [e29a6]
│     ├─ vue-router@npm:^4.0.12 → npm:4.0.12 [e29a6]
│     ├─ vue-svg-loader@npm:v0.17.0-beta.2 → npm:0.17.0-beta.2 [e29a6]
│     ├─ webpack-bugsnag-plugins@npm:^1.8.0 → npm:1.8.0 [e29a6]
│     ├─ webpack-cli@npm:^4.9.1 → npm:4.9.1 [e29a6]
│     ├─ webpack-dev-server@npm:^3.11.2 → npm:3.11.2 [e29a6]
│     ├─ webpack@npm:^5.59.0 → npm:5.59.1 [e29a6]
│     └─ ws@npm:^7.2.3 → npm:7.5.5 [1fa4b]
│
├─ @lipsurf/plugins@workspace:packages/plugins
│  ├─ Instances: 1
│  ├─ Version: 4.5.0
│  │
│  └─ Dependencies
│     ├─ @lipsurf/cli@^2.4.2 → workspace:packages/cli
│     ├─ @lipsurf/types@^2.2.0 → workspace:packages/types
│     ├─ @types/chrome@npm:^0.0.173 → npm:0.0.173
│     ├─ cross-env@npm:^7.0.3 → npm:7.0.3
│     ├─ rimraf@npm:^3.0.2 → npm:3.0.2
│     └─ vuepress-vite@npm:^2.0.0-beta.32 → npm:2.0.0-beta.32
│
├─ @lipsurf/premium-plugins@workspace:packages/premium-plugins
│  ├─ Instances: 1
│  ├─ Version: 4.7.2
│  │
│  └─ Dependencies
│     ├─ @lipsurf/cli@^2.4.2 → workspace:packages/cli
│     ├─ @lipsurf/types@^2.2.0 → workspace:packages/types
│     ├─ @types/chrome@npm:^0.0.173 → npm:0.0.173
│     ├─ @types/selenium-webdriver@npm:^3.0.10 → npm:3.0.19
│     ├─ capitalize@npm:^2.0.0 → npm:2.0.3
│     ├─ cross-env@npm:^7.0.3 → npm:7.0.3
│     ├─ esbuild-node-loader@npm:^0.8.0 → npm:0.8.0
│     ├─ firebase-admin@npm:^8.2.0 → npm:8.13.0
│     ├─ globby@npm:^11.0.4 → npm:11.0.4
│     ├─ mark.js@npm:^8.11.1 → npm:8.11.1
│     ├─ rimraf@npm:^3.0.2 → npm:3.0.2
│     ├─ wanakana@npm:^4.0.2 → npm:4.0.2
│     └─ ava@npm:^4.1.0 → npm:4.1.0 [c101e]
│
├─ @lipsurf/types@workspace:packages/types
│  ├─ Version: 2.2.0
│  │
│  └─ Dependencies
│     ├─ @types/chrome@npm:^0.0.173 → npm:0.0.173
│     ├─ webdriverio@npm:7.16.16 → npm:7.16.16
│     └─ ava@npm:^4.1.0 → npm:4.1.0 [c101e]
│
├─ @picovoice/porcupine-web-en-worker@npm:2.0.2
│  └─ Version: 2.0.2
│
├─ @picovoice/web-voice-processor@npm:2.1.3
│  ├─ Version: 2.1.3
│  │
│  └─ Dependencies
│     └─ @babel/runtime@npm:^7.12.18 → npm:7.16.7
│
├─ @trust/webcrypto@npm:0.9.2
│  ├─ Version: 0.9.2
│  │
│  └─ Dependencies
│     ├─ @trust/keyto@npm:^0.3.4 → npm:0.3.7
│     ├─ base64url@npm:^3.0.0 → npm:3.0.1
│     ├─ elliptic@npm:^6.4.0 → npm:6.5.4
│     ├─ node-rsa@npm:^0.4.0 → npm:0.4.2
│     └─ text-encoding@npm:^0.6.1 → npm:0.6.4
│
├─ @types/amplitude-js@npm:8.0.1
│  └─ Version: 8.0.1
│
├─ @types/chrome@npm:0.0.173
│  ├─ Version: 0.0.173
│  │
│  └─ Dependencies
│     ├─ @types/filesystem@npm:* → npm:0.0.32
│     └─ @types/har-format@npm:* → npm:1.2.7
│
├─ @types/esprima@npm:4.0.3
│  ├─ Version: 4.0.3
│  │
│  └─ Dependencies
│     └─ @types/estree@npm:* → npm:0.0.50
│
├─ @types/finalhandler@npm:1.1.1
│  ├─ Version: 1.1.1
│  │
│  └─ Dependencies
│     └─ @types/node@npm:* → npm:16.11.2
│
├─ @types/jsdom@npm:11.12.0
│  ├─ Version: 11.12.0
│  │
│  └─ Dependencies
│     ├─ @types/events@npm:* → npm:3.0.0
│     ├─ @types/node@npm:* → npm:16.11.2
│     ├─ @types/tough-cookie@npm:* → npm:4.0.1
│     └─ parse5@npm:^4.0.0 → npm:4.0.0
│
├─ @types/lodash@npm:4.14.176
│  └─ Version: 4.14.176
│
├─ @types/sinon@npm:4.3.3
│  └─ Version: 4.3.3
│
├─ @types/stripe-checkout@npm:1.0.4
│  ├─ Version: 1.0.4
│  │
│  └─ Dependencies
│     └─ @types/stripe-v3@npm:* → npm:3.1.26
│
├─ @types/tmp@npm:0.1.0
│  └─ Version: 0.1.0
│
├─ @types/web@npm:0.0.42
│  └─ Version: 0.0.42
│
├─ @vue/eslint-config-typescript@npm:7.0.0
│  ├─ Instances: 1
│  ├─ Version: 7.0.0
│  │
│  └─ Dependencies
│     └─ vue-eslint-parser@npm:^7.0.0 → npm:7.11.0
│
├─ amplitude-js@npm:8.9.1
│  ├─ Version: 8.9.1
│  │
│  └─ Dependencies
│     ├─ @amplitude/ua-parser-js@npm:0.7.25 → npm:0.7.25
│     ├─ @amplitude/utils@npm:^1.0.5 → npm:1.9.0
│     ├─ blueimp-md5@npm:^2.10.0 → npm:2.19.0
│     └─ query-string@npm:5 → npm:5.1.1
│
├─ async-exit-hook@npm:2.0.1
│  └─ Version: 2.0.1
│
├─ ava@npm:4.1.0
│  ├─ Instances: 1
│  ├─ Version: 4.1.0
│  │
│  ├─ Exported Binaries
│  │  └─ ava
│  │
│  └─ Dependencies
│     ├─ acorn-walk@npm:^8.2.0 → npm:8.2.0
│     ├─ acorn@npm:^8.7.0 → npm:8.7.0
│     ├─ ansi-styles@npm:^6.1.0 → npm:6.1.0
│     ├─ arrgv@npm:^1.0.2 → npm:1.0.2
│     ├─ arrify@npm:^3.0.0 → npm:3.0.0
│     ├─ callsites@npm:^4.0.0 → npm:4.0.0
│     ├─ cbor@npm:^8.1.0 → npm:8.1.0
│     ├─ chalk@npm:^5.0.0 → npm:5.0.1
│     ├─ chokidar@npm:^3.5.3 → npm:3.5.3
│     ├─ chunkd@npm:^2.0.1 → npm:2.0.1
│     ├─ ci-info@npm:^3.3.0 → npm:3.3.0
│     ├─ ci-parallel-vars@npm:^1.0.1 → npm:1.0.1
│     ├─ clean-yaml-object@npm:^0.1.0 → npm:0.1.0
│     ├─ cli-truncate@npm:^3.1.0 → npm:3.1.0
│     ├─ code-excerpt@npm:^4.0.0 → npm:4.0.0
│     ├─ common-path-prefix@npm:^3.0.0 → npm:3.0.0
│     ├─ concordance@npm:^5.0.4 → npm:5.0.4
│     ├─ currently-unhandled@npm:^0.4.1 → npm:0.4.1
│     ├─ debug@npm:^4.3.3 → npm:4.3.3
│     ├─ del@npm:^6.0.0 → npm:6.0.0
│     ├─ emittery@npm:^0.10.1 → npm:0.10.1
│     ├─ figures@npm:^4.0.0 → npm:4.0.0
│     ├─ globby@npm:^13.1.1 → npm:13.1.1
│     ├─ ignore-by-default@npm:^2.0.0 → npm:2.0.0
│     ├─ indent-string@npm:^5.0.0 → npm:5.0.0
│     ├─ is-error@npm:^2.2.2 → npm:2.2.2
│     ├─ is-plain-object@npm:^5.0.0 → npm:5.0.0
│     ├─ is-promise@npm:^4.0.0 → npm:4.0.0
│     ├─ matcher@npm:^5.0.0 → npm:5.0.0
│     ├─ mem@npm:^9.0.2 → npm:9.0.2
│     ├─ ms@npm:^2.1.3 → npm:2.1.3
│     ├─ p-event@npm:^5.0.1 → npm:5.0.1
│     ├─ p-map@npm:^5.3.0 → npm:5.3.0
│     ├─ picomatch@npm:^2.3.1 → npm:2.3.1
│     ├─ pkg-conf@npm:^4.0.0 → npm:4.0.0
│     ├─ plur@npm:^5.1.0 → npm:5.1.0
│     ├─ pretty-ms@npm:^7.0.1 → npm:7.0.1
│     ├─ resolve-cwd@npm:^3.0.0 → npm:3.0.0
│     ├─ slash@npm:^3.0.0 → npm:3.0.0
│     ├─ stack-utils@npm:^2.0.5 → npm:2.0.5
│     ├─ strip-ansi@npm:^7.0.1 → npm:7.0.1
│     ├─ supertap@npm:^3.0.1 → npm:3.0.1
│     ├─ temp-dir@npm:^2.0.0 → npm:2.0.0
│     ├─ write-file-atomic@npm:^4.0.1 → npm:4.0.1
│     └─ yargs@npm:^17.3.1 → npm:17.3.1
│
├─ awesomplete@npm:1.1.5
│  └─ Version: 1.1.5
│
├─ chokidar@npm:3.5.2
│  ├─ Version: 3.5.2
│  │
│  └─ Dependencies
│     ├─ anymatch@npm:~3.1.2 → npm:3.1.2
│     ├─ braces@npm:~3.0.2 → npm:3.0.2
│     ├─ fsevents@patch:fsevents@~2.3.2#~builtin<compat/fsevents> → patch:fsevents@npm%3A2.3.2#~builtin<compat/fsevents>::version=2.3.2&hash=18f3a7
│     ├─ glob-parent@npm:~5.1.2 → npm:5.1.2
│     ├─ is-binary-path@npm:~2.1.0 → npm:2.1.0
│     ├─ is-glob@npm:~4.0.1 → npm:4.0.3
│     ├─ normalize-path@npm:~3.0.0 → npm:3.0.0
│     └─ readdirp@npm:~3.6.0 → npm:3.6.0
│
├─ chrome-remote-interface@npm:0.28.2
│  ├─ Version: 0.28.2
│  │
│  ├─ Exported Binaries
│  │  └─ chrome-remote-interface
│  │
│  └─ Dependencies
│     ├─ commander@npm:2.11.x → npm:2.11.0
│     └─ ws@npm:^7.2.3 → npm:7.5.5 [1fa4b]
│
├─ cli-table@npm:0.3.6
│  ├─ Version: 0.3.6
│  │
│  └─ Dependencies
│     └─ colors@npm:1.0.3 → npm:1.0.3
│
├─ commander@npm:7.2.0
│  └─ Version: 7.2.0
│
├─ concurrently@npm:6.3.0
│  ├─ Version: 6.3.0
│  │
│  ├─ Exported Binaries
│  │  └─ concurrently
│  │
│  └─ Dependencies
│     ├─ chalk@npm:^4.1.0 → npm:4.1.2
│     ├─ date-fns@npm:^2.16.1 → npm:2.25.0
│     ├─ lodash@npm:^4.17.21 → npm:4.17.21
│     ├─ rxjs@npm:^6.6.3 → npm:6.6.7
│     ├─ spawn-command@npm:^0.0.2-1 → npm:0.0.2
│     ├─ supports-color@npm:^8.1.0 → npm:8.1.1
│     ├─ tree-kill@npm:^1.2.2 → npm:1.2.2
│     └─ yargs@npm:^16.2.0 → npm:16.2.0
│
├─ copy-webpack-plugin@npm:8.1.1
│  ├─ Instances: 1
│  ├─ Version: 8.1.1
│  │
│  └─ Dependencies
│     ├─ fast-glob@npm:^3.2.5 → npm:3.2.7
│     ├─ glob-parent@npm:^5.1.1 → npm:5.1.2
│     ├─ globby@npm:^11.0.3 → npm:11.0.4
│     ├─ normalize-path@npm:^3.0.0 → npm:3.0.0
│     ├─ p-limit@npm:^3.1.0 → npm:3.1.0
│     ├─ schema-utils@npm:^3.0.0 → npm:3.1.1
│     └─ serialize-javascript@npm:^5.0.1 → npm:5.0.1
│
├─ css-loader@npm:5.2.7
│  ├─ Instances: 1
│  ├─ Version: 5.2.7
│  │
│  └─ Dependencies
│     ├─ icss-utils@npm:^5.1.0 → npm:5.1.0
│     ├─ loader-utils@npm:^2.0.0 → npm:2.0.0
│     ├─ postcss-modules-extract-imports@npm:^3.0.0 → npm:3.0.0
│     ├─ postcss-modules-local-by-default@npm:^4.0.0 → npm:4.0.0
│     ├─ postcss-modules-scope@npm:^3.0.0 → npm:3.0.0
│     ├─ postcss-modules-values@npm:^4.0.0 → npm:4.0.0
│     ├─ postcss-value-parser@npm:^4.1.0 → npm:4.1.0
│     ├─ postcss@npm:^8.2.15 → npm:8.3.11
│     ├─ schema-utils@npm:^3.0.0 → npm:3.1.1
│     └─ semver@npm:^7.3.5 → npm:7.3.5
│
├─ css-minimizer-webpack-plugin@npm:2.0.0
│  ├─ Instances: 1
│  ├─ Version: 2.0.0
│  │
│  └─ Dependencies
│     ├─ cssnano@npm:^5.0.0 → npm:5.0.8
│     ├─ jest-worker@npm:^26.3.0 → npm:26.6.2
│     ├─ p-limit@npm:^3.0.2 → npm:3.1.0
│     ├─ postcss@npm:^8.2.9 → npm:8.3.11
│     ├─ schema-utils@npm:^3.0.0 → npm:3.1.1
│     ├─ serialize-javascript@npm:^5.0.1 → npm:5.0.1
│     └─ source-map@npm:^0.6.1 → npm:0.6.1
│
├─ deepdash@npm:5.3.9
│  ├─ Version: 5.3.9
│  │
│  └─ Dependencies
│     ├─ lodash-es@npm:^4.17.21 → npm:4.17.21
│     └─ lodash@npm:^4.17.21 → npm:4.17.21
│
├─ esbuild-node-loader@npm:0.8.0
│  ├─ Version: 0.8.0
│  │
│  └─ Dependencies
│     ├─ esbuild@npm:>=0.13.12 → npm:0.14.25
│     ├─ node-fetch@npm:^3.2.1 → npm:3.2.2
│     └─ semver@npm:^7.3.5 → npm:7.3.5
│
├─ esbuild-plugin-vue3@npm:0.2.4
│  ├─ Instances: 1
│  ├─ Version: 0.2.4
│  │
│  └─ Dependencies
│     ├─ @vue/compiler-core@npm:^3.2.6 → npm:3.2.20
│     ├─ @vue/compiler-sfc@npm:^3.2.6 → npm:3.2.20
│     └─ esbuild@npm:^0.12.22 → npm:0.12.29
│
├─ esbuild-runner@npm:2.2.1
│  ├─ Instances: 1
│  ├─ Version: 2.2.1
│  │
│  ├─ Exported Binaries
│  │  └─ esr
│  │
│  └─ Dependencies
│     ├─ source-map-support@npm:0.5.19 → npm:0.5.19
│     └─ tslib@npm:2.3.1 → npm:2.3.1
│
├─ esbuild@npm:0.14.25
│  ├─ Version: 0.14.25
│  │
│  ├─ Exported Binaries
│  │  └─ esbuild
│  │
│  └─ Dependencies
│     ├─ esbuild-android-64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-android-arm64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-darwin-64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-darwin-arm64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-freebsd-64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-freebsd-arm64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-linux-32@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-linux-64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-linux-arm64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-linux-arm@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-linux-mips64le@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-linux-ppc64le@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-linux-riscv64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-linux-s390x@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-netbsd-64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-openbsd-64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-sunos-64@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-windows-32@npm:0.14.25 → npm:0.14.25
│     ├─ esbuild-windows-64@npm:0.14.25 → npm:0.14.25
│     └─ esbuild-windows-arm64@npm:0.14.25 → npm:0.14.25
│
├─ file-loader@npm:6.2.0
│  ├─ Instances: 1
│  ├─ Version: 6.2.0
│  │
│  └─ Dependencies
│     ├─ loader-utils@npm:^2.0.0 → npm:2.0.0
│     └─ schema-utils@npm:^3.0.0 → npm:3.1.1
│
├─ finalhandler@npm:1.1.2
│  ├─ Version: 1.1.2
│  │
│  └─ Dependencies
│     ├─ encodeurl@npm:~1.0.2 → npm:1.0.2
│     ├─ escape-html@npm:~1.0.3 → npm:1.0.3
│     ├─ on-finished@npm:~2.3.0 → npm:2.3.0
│     ├─ parseurl@npm:~1.3.3 → npm:1.3.3
│     ├─ statuses@npm:~1.5.0 → npm:1.5.0
│     ├─ unpipe@npm:~1.0.0 → npm:1.0.0
│     └─ debug@npm:^2.6.9 → npm:2.6.9 [3f602]
│
├─ firebase@npm:9.6.9
│  ├─ Version: 9.6.9
│  │
│  └─ Dependencies
│     ├─ @firebase/app-compat@npm:0.1.20 → npm:0.1.20
│     ├─ @firebase/app-types@npm:0.7.0 → npm:0.7.0
│     ├─ @firebase/app@npm:0.7.19 → npm:0.7.19
│     ├─ @firebase/database@npm:0.12.6 → npm:0.12.6
│     ├─ @firebase/polyfill@npm:0.3.36 → npm:0.3.36
│     ├─ @firebase/util@npm:1.5.0 → npm:1.5.0
│     ├─ @firebase/analytics-compat@npm:0.1.7 → npm:0.1.7 [31be5]
│     ├─ @firebase/analytics@npm:0.7.6 → npm:0.7.6 [31be5]
│     ├─ @firebase/app-check-compat@npm:0.2.4 → npm:0.2.4 [31be5]
│     ├─ @firebase/app-check@npm:0.5.4 → npm:0.5.4 [31be5]
│     ├─ @firebase/auth-compat@npm:0.2.10 → npm:0.2.10 [31be5]
│     ├─ @firebase/auth@npm:0.19.10 → npm:0.19.10 [31be5]
│     ├─ @firebase/database-compat@npm:0.1.6 → npm:0.1.6 [31be5]
│     ├─ @firebase/firestore-compat@npm:0.1.15 → npm:0.1.15 [31be5]
│     ├─ @firebase/firestore@npm:3.4.6 → npm:3.4.6 [31be5]
│     ├─ @firebase/functions-compat@npm:0.1.10 → npm:0.1.10 [31be5]
│     ├─ @firebase/functions@npm:0.7.9 → npm:0.7.9 [31be5]
│     ├─ @firebase/installations@npm:0.5.6 → npm:0.5.6 [31be5]
│     ├─ @firebase/messaging-compat@npm:0.1.10 → npm:0.1.10 [31be5]
│     ├─ @firebase/messaging@npm:0.9.10 → npm:0.9.10 [31be5]
│     ├─ @firebase/performance-compat@npm:0.1.6 → npm:0.1.6 [31be5]
│     ├─ @firebase/performance@npm:0.5.6 → npm:0.5.6 [31be5]
│     ├─ @firebase/remote-config-compat@npm:0.1.6 → npm:0.1.6 [31be5]
│     ├─ @firebase/remote-config@npm:0.3.5 → npm:0.3.5 [31be5]
│     ├─ @firebase/storage-compat@npm:0.1.11 → npm:0.1.11 [31be5]
│     └─ @firebase/storage@npm:0.9.3 → npm:0.9.3 [31be5]
│
├─ firebaseui@npm:6.0.1
│  ├─ Instances: 1
│  ├─ Version: 6.0.1
│  │
│  └─ Dependencies
│     ├─ dialog-polyfill@npm:^0.4.7 → npm:0.4.10
│     └─ material-design-lite@npm:^1.2.0 → npm:1.3.0
│
├─ fork-ts-checker-webpack-plugin@npm:7.2.1
│  ├─ Instances: 1
│  ├─ Version: 7.2.1
│  │
│  └─ Dependencies
│     ├─ @babel/code-frame@npm:^7.16.7 → npm:7.16.7
│     ├─ chalk@npm:^4.1.2 → npm:4.1.2
│     ├─ chokidar@npm:^3.5.3 → npm:3.5.3
│     ├─ cosmiconfig@npm:^7.0.1 → npm:7.0.1
│     ├─ deepmerge@npm:^4.2.2 → npm:4.2.2
│     ├─ fs-extra@npm:^10.0.0 → npm:10.0.0
│     ├─ memfs@npm:^3.4.1 → npm:3.4.1
│     ├─ minimatch@npm:^3.0.4 → npm:3.0.4
│     ├─ schema-utils@npm:4.0.0 → npm:4.0.0
│     ├─ semver@npm:^7.3.5 → npm:7.3.5
│     └─ tapable@npm:^2.2.1 → npm:2.2.1
│
├─ globby@npm:11.0.4
│  ├─ Version: 11.0.4
│  │
│  └─ Dependencies
│     ├─ array-union@npm:^2.1.0 → npm:2.1.0
│     ├─ dir-glob@npm:^3.0.1 → npm:3.0.1
│     ├─ fast-glob@npm:^3.1.1 → npm:3.2.7
│     ├─ ignore@npm:^5.1.4 → npm:5.1.8
│     ├─ merge2@npm:^1.3.0 → npm:1.4.1
│     └─ slash@npm:^3.0.0 → npm:3.0.0
│
├─ html-loader@npm:1.3.2
│  ├─ Instances: 1
│  ├─ Version: 1.3.2
│  │
│  └─ Dependencies
│     ├─ html-minifier-terser@npm:^5.1.1 → npm:5.1.1
│     ├─ htmlparser2@npm:^4.1.0 → npm:4.1.0
│     ├─ loader-utils@npm:^2.0.0 → npm:2.0.0
│     └─ schema-utils@npm:^3.0.0 → npm:3.1.1
│
├─ html-minimizer-webpack-plugin@npm:2.1.0
│  ├─ Instances: 1
│  ├─ Version: 2.1.0
│  │
│  └─ Dependencies
│     ├─ html-minifier-terser@npm:^5.1.1 → npm:5.1.1
│     ├─ jest-worker@npm:^26.5.0 → npm:26.6.2
│     ├─ p-limit@npm:^3.1.0 → npm:3.1.0
│     ├─ schema-utils@npm:^3.0.0 → npm:3.1.1
│     └─ serialize-javascript@npm:^5.0.1 → npm:5.0.1
│
├─ ignore-emit-webpack-plugin@npm:2.0.6
│  └─ Version: 2.0.6
│
├─ image-minimizer-webpack-plugin@npm:2.2.0
│  ├─ Instances: 1
│  ├─ Version: 2.2.0
│  │
│  └─ Dependencies
│     ├─ imagemin@npm:^7.0.1 → npm:7.0.1
│     ├─ klona@npm:^2.0.4 → npm:2.0.4
│     ├─ p-limit@npm:^3.1.0 → npm:3.1.0
│     ├─ schema-utils@npm:^3.0.0 → npm:3.1.1
│     └─ serialize-javascript@npm:^5.0.1 → npm:5.0.1
│
├─ imagemin-gifsicle@npm:7.0.0
│  ├─ Version: 7.0.0
│  │
│  └─ Dependencies
│     ├─ execa@npm:^1.0.0 → npm:1.0.0
│     ├─ gifsicle@npm:^5.0.0 → npm:5.2.1
│     └─ is-gif@npm:^3.0.0 → npm:3.0.0
│
├─ imagemin-jpegtran@npm:7.0.0
│  ├─ Version: 7.0.0
│  │
│  └─ Dependencies
│     ├─ exec-buffer@npm:^3.0.0 → npm:3.2.0
│     ├─ is-jpg@npm:^2.0.0 → npm:2.0.0
│     └─ jpegtran-bin@npm:^5.0.0 → npm:5.0.2
│
├─ imagemin-optipng@npm:8.0.0
│  ├─ Version: 8.0.0
│  │
│  └─ Dependencies
│     ├─ exec-buffer@npm:^3.0.0 → npm:3.2.0
│     ├─ is-png@npm:^2.0.0 → npm:2.0.0
│     └─ optipng-bin@npm:^7.0.0 → npm:7.0.1
│
├─ imagemin-svgo@npm:9.0.0
│  ├─ Version: 9.0.0
│  │
│  └─ Dependencies
│     ├─ is-svg@npm:^4.2.1 → npm:4.3.1
│     └─ svgo@npm:^2.1.0 → npm:2.7.0
│
├─ jsdom@npm:15.2.1
│  ├─ Instances: 1
│  ├─ Version: 15.2.1
│  │
│  └─ Dependencies
│     ├─ abab@npm:^2.0.0 → npm:2.0.5
│     ├─ acorn-globals@npm:^4.3.2 → npm:4.3.4
│     ├─ acorn@npm:^7.1.0 → npm:7.4.1
│     ├─ array-equal@npm:^1.0.0 → npm:1.0.0
│     ├─ cssom@npm:^0.4.1 → npm:0.4.4
│     ├─ cssstyle@npm:^2.0.0 → npm:2.3.0
│     ├─ data-urls@npm:^1.1.0 → npm:1.1.0
│     ├─ domexception@npm:^1.0.1 → npm:1.0.1
│     ├─ escodegen@npm:^1.11.1 → npm:1.14.3
│     ├─ html-encoding-sniffer@npm:^1.0.2 → npm:1.0.2
│     ├─ nwsapi@npm:^2.2.0 → npm:2.2.0
│     ├─ parse5@npm:5.1.0 → npm:5.1.0
│     ├─ pn@npm:^1.1.0 → npm:1.1.0
│     ├─ request-promise-native@npm:^1.0.7 → npm:1.0.9
│     ├─ request@npm:^2.88.0 → npm:2.88.2
│     ├─ saxes@npm:^3.1.9 → npm:3.1.11
│     ├─ symbol-tree@npm:^3.2.2 → npm:3.2.4
│     ├─ tough-cookie@npm:^3.0.1 → npm:3.0.1
│     ├─ w3c-hr-time@npm:^1.0.1 → npm:1.0.2
│     ├─ w3c-xmlserializer@npm:^1.1.2 → npm:1.1.2
│     ├─ webidl-conversions@npm:^4.0.2 → npm:4.0.2
│     ├─ whatwg-encoding@npm:^1.0.5 → npm:1.0.5
│     ├─ whatwg-mimetype@npm:^2.3.0 → npm:2.3.0
│     ├─ whatwg-url@npm:^7.0.0 → npm:7.1.0
│     ├─ ws@npm:^7.0.0 → npm:7.5.5
│     └─ xml-name-validator@npm:^3.0.0 → npm:3.0.0
│
├─ kuromoji@https://github.com/lipsurf/kuromoji.js.git#commit=d5f13621019aa017bc4938d140cad6f194e7bd54
│  ├─ Version: 0.1.2
│  │
│  └─ Dependencies
│     └─ doublearray@npm:0.0.2 → npm:0.0.2
│
├─ lodash@npm:4.17.21
│  └─ Version: 4.17.21
│
├─ magic-string@npm:0.25.7
│  ├─ Version: 0.25.7
│  │
│  └─ Dependencies
│     └─ sourcemap-codec@npm:^1.4.4 → npm:1.4.8
│
├─ mem@npm:9.0.1
│  ├─ Version: 9.0.1
│  │
│  └─ Dependencies
│     ├─ map-age-cleaner@npm:^0.1.3 → npm:0.1.3
│     └─ mimic-fn@npm:^4.0.0 → npm:4.0.0
│
├─ mini-css-extract-plugin@npm:1.6.2
│  ├─ Instances: 1
│  ├─ Version: 1.6.2
│  │
│  └─ Dependencies
│     ├─ loader-utils@npm:^2.0.0 → npm:2.0.0
│     ├─ schema-utils@npm:^3.0.0 → npm:3.1.1
│     └─ webpack-sources@npm:^1.1.0 → npm:1.4.3
│
├─ moment@npm:2.29.1
│  └─ Version: 2.29.1
│
├─ node-gtts@npm:2.0.2
│  ├─ Version: 2.0.2
│  │
│  ├─ Exported Binaries
│  │  └─ node-gtts
│  │
│  └─ Dependencies
│     ├─ async@npm:^2.4.1 → npm:2.6.3
│     ├─ escape-string-regexp@npm:^1.0.5 → npm:1.0.5
│     ├─ fake-useragent@npm:^1.0.1 → npm:1.0.1
│     ├─ multistream@npm:^2.1.0 → npm:2.1.1
│     └─ request@npm:^2.81.0 → npm:2.88.2
│
├─ nodemon@npm:2.0.15
│  ├─ Version: 2.0.15
│  │
│  ├─ Exported Binaries
│  │  └─ nodemon
│  │
│  └─ Dependencies
│     ├─ chokidar@npm:^3.5.2 → npm:3.5.2
│     ├─ ignore-by-default@npm:^1.0.1 → npm:1.0.1
│     ├─ minimatch@npm:^3.0.4 → npm:3.0.4
│     ├─ pstree.remy@npm:^1.1.8 → npm:1.1.8
│     ├─ semver@npm:^5.7.1 → npm:5.7.1
│     ├─ supports-color@npm:^5.5.0 → npm:5.5.0
│     ├─ touch@npm:^3.1.0 → npm:3.1.0
│     ├─ undefsafe@npm:^2.0.5 → npm:2.0.5
│     ├─ update-notifier@npm:^5.1.0 → npm:5.1.0
│     └─ debug@npm:^3.2.7 → npm:3.2.7 [5e88e]
│
├─ nyc@npm:13.3.0
│  ├─ Version: 13.3.0
│  │
│  ├─ Exported Binaries
│  │  └─ nyc
│  │
│  └─ Dependencies
│     ├─ archy@npm:^1.0.0 → npm:1.0.0
│     ├─ arrify@npm:^1.0.1 → npm:1.0.1
│     ├─ caching-transform@npm:^3.0.1 → npm:3.0.2
│     ├─ convert-source-map@npm:^1.6.0 → npm:1.8.0
│     ├─ find-cache-dir@npm:^2.0.0 → npm:2.1.0
│     ├─ find-up@npm:^3.0.0 → npm:3.0.0
│     ├─ foreground-child@npm:^1.5.6 → npm:1.5.6
│     ├─ glob@npm:^7.1.3 → npm:7.2.0
│     ├─ istanbul-lib-coverage@npm:^2.0.3 → npm:2.0.5
│     ├─ istanbul-lib-hook@npm:^2.0.3 → npm:2.0.7
│     ├─ istanbul-lib-instrument@npm:^3.1.0 → npm:3.3.0
│     ├─ istanbul-lib-report@npm:^2.0.4 → npm:2.0.8
│     ├─ istanbul-lib-source-maps@npm:^3.0.2 → npm:3.0.6
│     ├─ istanbul-reports@npm:^2.1.1 → npm:2.2.7
│     ├─ make-dir@npm:^1.3.0 → npm:1.3.0
│     ├─ merge-source-map@npm:^1.1.0 → npm:1.1.0
│     ├─ resolve-from@npm:^4.0.0 → npm:4.0.0
│     ├─ rimraf@npm:^2.6.3 → npm:2.7.1
│     ├─ signal-exit@npm:^3.0.2 → npm:3.0.5
│     ├─ spawn-wrap@npm:^1.4.2 → npm:1.4.3
│     ├─ test-exclude@npm:^5.1.0 → npm:5.2.3
│     ├─ uuid@npm:^3.3.2 → npm:3.4.0
│     ├─ yargs-parser@npm:^11.1.1 → npm:11.1.1
│     └─ yargs@npm:^12.0.5 → npm:12.0.5
│
├─ postcss-import@npm:14.0.2
│  ├─ Instances: 1
│  ├─ Version: 14.0.2
│  │
│  └─ Dependencies
│     ├─ postcss-value-parser@npm:^4.0.0 → npm:4.1.0
│     ├─ read-cache@npm:^1.0.0 → npm:1.0.0
│     └─ resolve@patch:resolve@^1.1.7#~builtin<compat/resolve> → patch:resolve@npm%3A1.20.0#~builtin<compat/resolve>::version=1.20.0&hash=07638b
│
├─ primeicons@npm:4.1.0
│  └─ Version: 4.1.0
│
├─ primevue@npm:3.8.1
│  └─ Version: 3.8.1
│
├─ raw-loader@npm:4.0.2
│  ├─ Instances: 1
│  ├─ Version: 4.0.2
│  │
│  └─ Dependencies
│     ├─ loader-utils@npm:^2.0.0 → npm:2.0.0
│     └─ schema-utils@npm:^3.0.0 → npm:3.1.1
│
├─ remove-files-webpack-plugin@npm:1.4.5
│  ├─ Instances: 1
│  ├─ Version: 1.4.5
│  │
│  └─ Dependencies
│     ├─ @types/webpack@npm:5.28.0 → npm:5.28.0
│     └─ trash@npm:7.1.1 → npm:7.1.1
│
├─ semver@npm:7.3.5
│  ├─ Version: 7.3.5
│  │
│  ├─ Exported Binaries
│  │  └─ semver
│  │
│  └─ Dependencies
│     └─ lru-cache@npm:^6.0.0 → npm:6.0.0
│
├─ sinon@npm:11.1.2
│  ├─ Version: 11.1.2
│  │
│  └─ Dependencies
│     ├─ @sinonjs/commons@npm:^1.8.3 → npm:1.8.3
│     ├─ @sinonjs/fake-timers@npm:^7.1.2 → npm:7.1.2
│     ├─ @sinonjs/samsam@npm:^6.0.2 → npm:6.0.2
│     ├─ diff@npm:^5.0.0 → npm:5.0.0
│     ├─ nise@npm:^5.1.0 → npm:5.1.0
│     └─ supports-color@npm:^7.2.0 → npm:7.2.0
│
├─ size-plugin@npm:1.2.0
│  ├─ Instances: 1
│  ├─ Version: 1.2.0
│  │
│  └─ Dependencies
│     ├─ chalk@npm:^2.4.1 → npm:2.4.2
│     ├─ escape-string-regexp@npm:^1.0.5 → npm:1.0.5
│     ├─ glob@npm:^7.1.2 → npm:7.2.0
│     ├─ gzip-size@npm:^5.0.0 → npm:5.1.1
│     ├─ minimatch@npm:^3.0.4 → npm:3.0.4
│     ├─ pretty-bytes@npm:^5.1.0 → npm:5.6.0
│     └─ util.promisify@npm:^1.0.0 → npm:1.1.1
│
├─ style-loader@npm:2.0.0
│  ├─ Instances: 1
│  ├─ Version: 2.0.0
│  │
│  └─ Dependencies
│     ├─ loader-utils@npm:^2.0.0 → npm:2.0.0
│     └─ schema-utils@npm:^3.0.0 → npm:3.1.1
│
├─ terser-webpack-plugin@npm:5.2.4
│  ├─ Instances: 1
│  ├─ Version: 5.2.4
│  │
│  └─ Dependencies
│     ├─ jest-worker@npm:^27.0.6 → npm:27.3.1
│     ├─ p-limit@npm:^3.1.0 → npm:3.1.0
│     ├─ schema-utils@npm:^3.1.1 → npm:3.1.1
│     ├─ serialize-javascript@npm:^6.0.0 → npm:6.0.0
│     ├─ source-map@npm:^0.6.1 → npm:0.6.1
│     └─ terser@npm:^5.7.2 → npm:5.9.0
│
├─ terser@npm:5.9.0
│  ├─ Version: 5.9.0
│  │
│  ├─ Exported Binaries
│  │  └─ terser
│  │
│  └─ Dependencies
│     ├─ commander@npm:^2.20.0 → npm:2.20.3
│     ├─ source-map-support@npm:~0.5.20 → npm:0.5.20
│     └─ source-map@npm:~0.7.2 → npm:0.7.3
│
├─ tippy.js@npm:6.3.2
│  ├─ Version: 6.3.2
│  │
│  └─ Dependencies
│     └─ @popperjs/core@npm:^2.9.0 → npm:2.10.2
│
├─ tmp@npm:0.1.0
│  ├─ Version: 0.1.0
│  │
│  └─ Dependencies
│     └─ rimraf@npm:^2.6.3 → npm:2.7.1
│
├─ ts-babel-node@https://github.com/looker/ts-babel-node.git#commit=8ded2a66899de69945e426b8e3b2b27287b0a395
│  ├─ Instances: 1
│  ├─ Version: 1.1.1
│  │
│  ├─ Exported Binaries
│  │  └─ ts-babel-node
│  │
│  └─ Dependencies
│     ├─ babel-core@npm:^6.9.1 → npm:6.26.3
│     ├─ babel-preset-env@npm:^1.5.2 → npm:1.7.0
│     └─ source-map-support@npm:^0.4.0 → npm:0.4.18
│
├─ ts-essentials@npm:9.1.2
│  ├─ Instances: 1
│  └─ Version: 9.1.2
│
├─ ts-loader@npm:9.2.6
│  ├─ Instances: 1
│  ├─ Version: 9.2.6
│  │
│  └─ Dependencies
│     ├─ chalk@npm:^4.1.0 → npm:4.1.2
│     ├─ enhanced-resolve@npm:^5.0.0 → npm:5.8.3
│     ├─ micromatch@npm:^4.0.0 → npm:4.0.4
│     └─ semver@npm:^7.3.4 → npm:7.3.5
│
├─ tslib@npm:1.14.1
│  └─ Version: 1.14.1
│
├─ typescript@patch:typescript@npm%3A4.5.5#~builtin<compat/typescript>::version=4.5.5&hash=493e53
│  ├─ Version: 4.5.5
│  │
│  └─ Exported Binaries
│     ├─ tsc
│     └─ tsserver
│
├─ vue-loader@npm:16.5.0
│  ├─ Instances: 1
│  ├─ Version: 16.5.0
│  │
│  └─ Dependencies
│     ├─ chalk@npm:^4.1.0 → npm:4.1.2
│     ├─ hash-sum@npm:^2.0.0 → npm:2.0.0
│     └─ loader-utils@npm:^2.0.0 → npm:2.0.0
│
├─ vue-router@npm:4.0.12
│  ├─ Instances: 1
│  ├─ Version: 4.0.12
│  │
│  └─ Dependencies
│     └─ @vue/devtools-api@npm:^6.0.0-beta.18 → npm:6.0.0-beta.19
│
├─ vue-slider-component@npm:4.0.0-beta.5
│  ├─ Version: 4.0.0-beta.5
│  │
│  └─ Dependencies
│     ├─ core-js@npm:^3.6.5 → npm:3.18.3
│     └─ vue-property-decorator@npm:^9.0.2 → npm:9.1.2 [a6e15]
│
├─ vue-style-loader@npm:4.1.3
│  ├─ Version: 4.1.3
│  │
│  └─ Dependencies
│     ├─ hash-sum@npm:^1.0.2 → npm:1.0.2
│     └─ loader-utils@npm:^1.0.2 → npm:1.4.0
│
├─ vue-svg-loader@npm:0.17.0-beta.2
│  ├─ Instances: 1
│  ├─ Version: 0.17.0-beta.2
│  │
│  └─ Dependencies
│     ├─ loader-utils@npm:^2.0.0 → npm:2.0.0
│     ├─ semver@npm:^7.3.2 → npm:7.3.5
│     └─ svgo@npm:^1.3.2 → npm:1.3.2
│
├─ vue@npm:3.2.31
│  ├─ Version: 3.2.31
│  │
│  └─ Dependencies
│     ├─ @vue/compiler-dom@npm:3.2.31 → npm:3.2.31
│     ├─ @vue/compiler-sfc@npm:3.2.31 → npm:3.2.31
│     ├─ @vue/runtime-dom@npm:3.2.31 → npm:3.2.31
│     ├─ @vue/shared@npm:3.2.31 → npm:3.2.31
│     └─ @vue/server-renderer@npm:3.2.31 → npm:3.2.31 [82ecf]
│
├─ vuepress-vite@npm:2.0.0-beta.32
│  ├─ Version: 2.0.0-beta.32
│  │
│  ├─ Exported Binaries
│  │  ├─ vuepress
│  │  └─ vuepress-vite
│  │
│  └─ Dependencies
│     ├─ @vuepress/bundler-vite@npm:2.0.0-beta.32 → npm:2.0.0-beta.32
│     ├─ @vuepress/cli@npm:2.0.0-beta.32 → npm:2.0.0-beta.32
│     ├─ @vuepress/core@npm:2.0.0-beta.32 → npm:2.0.0-beta.32
│     └─ @vuepress/theme-default@npm:2.0.0-beta.32 → npm:2.0.0-beta.32
│
├─ webpack-bugsnag-plugins@npm:1.8.0
│  ├─ Instances: 1
│  ├─ Version: 1.8.0
│  │
│  └─ Dependencies
│     ├─ @bugsnag/source-maps@npm:^2.0.0 → npm:2.3.0
│     ├─ bugsnag-build-reporter@npm:^2.0.0 → npm:2.0.0
│     └─ run-parallel-limit@npm:^1.0.6 → npm:1.1.0
│
├─ webpack-bundle-analyzer@npm:4.5.0
│  ├─ Version: 4.5.0
│  │
│  ├─ Exported Binaries
│  │  └─ webpack-bundle-analyzer
│  │
│  └─ Dependencies
│     ├─ acorn-walk@npm:^8.0.0 → npm:8.2.0
│     ├─ acorn@npm:^8.0.4 → npm:8.5.0
│     ├─ chalk@npm:^4.1.0 → npm:4.1.2
│     ├─ commander@npm:^7.2.0 → npm:7.2.0
│     ├─ gzip-size@npm:^6.0.0 → npm:6.0.0
│     ├─ lodash@npm:^4.17.20 → npm:4.17.21
│     ├─ opener@npm:^1.5.2 → npm:1.5.2
│     ├─ sirv@npm:^1.0.7 → npm:1.0.18
│     └─ ws@npm:^7.2.3 → npm:7.5.5 [1fa4b]
│
├─ webpack-cli@npm:4.9.1
│  ├─ Instances: 1
│  ├─ Version: 4.9.1
│  │
│  ├─ Exported Binaries
│  │  └─ webpack-cli
│  │
│  └─ Dependencies
│     ├─ @discoveryjs/json-ext@npm:^0.5.0 → npm:0.5.5
│     ├─ @webpack-cli/configtest@npm:^1.1.0 → npm:1.1.0
│     ├─ @webpack-cli/info@npm:^1.4.0 → npm:1.4.0
│     ├─ @webpack-cli/serve@npm:^1.6.0 → npm:1.6.0
│     ├─ colorette@npm:^2.0.14 → npm:2.0.16
│     ├─ commander@npm:^7.0.0 → npm:7.2.0
│     ├─ execa@npm:^5.0.0 → npm:5.1.1
│     ├─ fastest-levenshtein@npm:^1.0.12 → npm:1.0.12
│     ├─ import-local@npm:^3.0.2 → npm:3.0.3
│     ├─ interpret@npm:^2.2.0 → npm:2.2.0
│     ├─ rechoir@npm:^0.7.0 → npm:0.7.1
│     └─ webpack-merge@npm:^5.7.3 → npm:5.8.0
│
├─ webpack-dev-server@npm:3.11.2
│  ├─ Instances: 1
│  ├─ Version: 3.11.2
│  │
│  ├─ Exported Binaries
│  │  └─ webpack-dev-server
│  │
│  └─ Dependencies
│     ├─ ansi-html@npm:0.0.7 → npm:0.0.7
│     ├─ bonjour@npm:^3.5.0 → npm:3.5.0
│     ├─ chokidar@npm:^2.1.8 → npm:2.1.8
│     ├─ compression@npm:^1.7.4 → npm:1.7.4
│     ├─ connect-history-api-fallback@npm:^1.6.0 → npm:1.6.0
│     ├─ debug@npm:^4.1.1 → npm:4.3.2
│     ├─ del@npm:^4.1.1 → npm:4.1.1
│     ├─ express@npm:^4.17.1 → npm:4.17.1
│     ├─ html-entities@npm:^1.3.1 → npm:1.4.0
│     ├─ http-proxy-middleware@npm:0.19.1 → npm:0.19.1
│     ├─ import-local@npm:^2.0.0 → npm:2.0.0
│     ├─ internal-ip@npm:^4.3.0 → npm:4.3.0
│     ├─ ip@npm:^1.1.5 → npm:1.1.5
│     ├─ is-absolute-url@npm:^3.0.3 → npm:3.0.3
│     ├─ killable@npm:^1.0.1 → npm:1.0.1
│     ├─ loglevel@npm:^1.6.8 → npm:1.7.1
│     ├─ opn@npm:^5.5.0 → npm:5.5.0
│     ├─ p-retry@npm:^3.0.1 → npm:3.0.1
│     ├─ portfinder@npm:^1.0.26 → npm:1.0.28
│     ├─ schema-utils@npm:^1.0.0 → npm:1.0.0
│     ├─ selfsigned@npm:^1.10.8 → npm:1.10.11
│     ├─ semver@npm:^6.3.0 → npm:6.3.0
│     ├─ serve-index@npm:^1.9.1 → npm:1.9.1
│     ├─ sockjs-client@npm:^1.5.0 → npm:1.5.2
│     ├─ sockjs@npm:^0.3.21 → npm:0.3.21
│     ├─ spdy@npm:^4.0.2 → npm:4.0.2
│     ├─ strip-ansi@npm:^3.0.1 → npm:3.0.1
│     ├─ supports-color@npm:^6.1.0 → npm:6.1.0
│     ├─ url@npm:^0.11.0 → npm:0.11.0
│     ├─ webpack-dev-middleware@npm:^3.7.2 → npm:3.7.3
│     ├─ webpack-log@npm:^2.0.0 → npm:2.0.0
│     ├─ ws@npm:^6.2.1 → npm:6.2.2
│     └─ yargs@npm:^13.3.2 → npm:13.3.2
│
├─ webpack-merge@npm:5.8.0
│  ├─ Version: 5.8.0
│  │
│  └─ Dependencies
│     ├─ clone-deep@npm:^4.0.1 → npm:4.0.1
│     └─ wildcard@npm:^2.0.0 → npm:2.0.0
│
├─ webpack@npm:5.59.1
│  ├─ Instances: 1
│  ├─ Version: 5.59.1
│  │
│  ├─ Exported Binaries
│  │  └─ webpack
│  │
│  └─ Dependencies
│     ├─ @types/eslint-scope@npm:^3.7.0 → npm:3.7.1
│     ├─ @types/estree@npm:^0.0.50 → npm:0.0.50
│     ├─ @webassemblyjs/ast@npm:1.11.1 → npm:1.11.1
│     ├─ @webassemblyjs/wasm-edit@npm:1.11.1 → npm:1.11.1
│     ├─ @webassemblyjs/wasm-parser@npm:1.11.1 → npm:1.11.1
│     ├─ acorn-import-assertions@npm:^1.7.6 → npm:1.8.0
│     ├─ acorn@npm:^8.4.1 → npm:8.5.0
│     ├─ browserslist@npm:^4.14.5 → npm:4.17.4
│     ├─ chrome-trace-event@npm:^1.0.2 → npm:1.0.3
│     ├─ enhanced-resolve@npm:^5.8.3 → npm:5.8.3
│     ├─ es-module-lexer@npm:^0.9.0 → npm:0.9.3
│     ├─ eslint-scope@npm:5.1.1 → npm:5.1.1
│     ├─ events@npm:^3.2.0 → npm:3.3.0
│     ├─ glob-to-regexp@npm:^0.4.1 → npm:0.4.1
│     ├─ graceful-fs@npm:^4.2.4 → npm:4.2.8
│     ├─ json-parse-better-errors@npm:^1.0.2 → npm:1.0.2
│     ├─ loader-runner@npm:^4.2.0 → npm:4.2.0
│     ├─ mime-types@npm:^2.1.27 → npm:2.1.33
│     ├─ neo-async@npm:^2.6.2 → npm:2.6.2
│     ├─ schema-utils@npm:^3.1.0 → npm:3.1.1
│     ├─ tapable@npm:^2.1.1 → npm:2.2.1
│     ├─ terser-webpack-plugin@npm:^5.1.3 → npm:5.2.4
│     ├─ watchpack@npm:^2.2.0 → npm:2.2.0
│     └─ webpack-sources@npm:^3.2.0 → npm:3.2.1
│
└─ ws@npm:7.5.5
   ├─ Instances: 1
   └─ Version: 7.5.5
Jasperhino commented 2 years ago

I ran into the same problem simply trying to getDoc a document reference in a v9 unit test.

import fs from 'fs'
import { assertFails, assertSucceeds, initializeTestEnvironment } from '@firebase/rules-unit-testing'
import { setDoc, getDoc, doc } from 'firebase/firestore'

let env = await initializeTestEnvironment({
  projectId: 'XXX',
  firestore: {
    rules: fs.readFileSync('firestore.rules', 'utf8'),
  },
})

let user = env.unauthenticatedContext()
const db = user.firestore()
...
await assertSucceeds(getDoc(doc(db, 'example_collection', 'example_doc')))

FirebaseError: Expected first argument to collection() to be a CollectionReference, a DocumentReference or FirebaseFirestore

Is there any workaround for this?

ghost commented 2 years ago

I am facing the same error: https://stackoverflow.com/questions/72539977/error-on-having-vitest-and-firestore-working-inside-a-sveltekit-project I have tried mocha and downgrade my firesbase dependencies and I also have the same error. Nevertheless, this is working: https://github.com/firebase/quickstart-testing/tree/master/unit-test-security-rules-v9

acorcutt commented 2 years ago

I'm seeing the same error with nextjs but only on the build step or server render.

It loose like the firestore is created but is not an instanceof Firestore...

console.log(!!firestore, firestore instanceof Firestore); // client=true, true node=true, false
const docRef = doc(firestore, 'posts','1234') // fails

Overriding the prototype makes it work...

firestore.__proto__ = Firestore.prototype;
console.log(firestore instanceof Firestore) // true
const docRef = doc(firestore, 'posts','1234') // ok

Suggesting getFirestore() and doc() are not using the same Firestore?

yuchenshi commented 2 years ago

@acorcutt Are you using @firebase/rules-unit-testing? If not, please open a separate issue. If so, would you mind letting us know why you're using it in server render? (FYI @firebase/rules-unit-testing is a library meant for unit tests and isn't needed / should not be used for merely connecting to emulators from your app -- the Firestore JS SDK has connectFirestoreEmulator for that.)

acorcutt commented 2 years ago

@yuchenshi No this is in a nextjs build step - disabling esmExternals as suggested here https://github.com/FirebaseExtended/reactfire/issues/491#issuecomment-1014925578 is now working for me so possibly a esm/cjs conflict.

MarkDuckworth commented 2 years ago

I was able to reproduce this issue. I will file it internally and follow up with the appropriate tracking info.

laurentpayot commented 2 years ago

I encountered the same bug. I see you're using Vue, are you also using Vitest as a test runner? To make my tests work in Vitest I had to force the usage of the commonjs version of Firestore, because @firebase/rules-unit-testing uses firebase/compat under the hood (see https://github.com/firebase/firebase-js-sdk/issues/6077#issuecomment-1130367878) You can force commonjs Firestore in Vitest by adding the following lines in vite.config.js:

export default defineConfig({
    // ...
    resolve: {
        alias: process.env.VITEST ?
            [{ find: /^@firebase\/firestore$/, replacement: `${__dirname}/node_modules/@firebase/firestore/dist/index.node.cjs.js` }]
            : []
    },
    // ....
})