Skip to content

chore: move dependencies about to fix vulnerabilities#2654

Merged
cabljac merged 2 commits intonextfrom
@invertase/fs-bq-vulns
Feb 24, 2026
Merged

chore: move dependencies about to fix vulnerabilities#2654
cabljac merged 2 commits intonextfrom
@invertase/fs-bq-vulns

Conversation

@cabljac
Copy link
Contributor

@cabljac cabljac commented Feb 24, 2026

This PR fixes all but one npm audit vulnerability with firestore-bigquery-changetracker.

It moves certain dependencies to dev deps. We have to be careful because in the past the build/deploy process of extensions doesn't like this - I think it omits dev dependencies at some point, and then at build time we get typescript errors in e.g test files.

The solution is a separate tsconfig for build, so the test files aren't seen at build time.

The Firebase Extensions deploy process likely does something like:

  1. Uploads the source code (everything in the functions/ directory)
  2. Runs npm install on the remote build server without devDependencies (i.e.
    --omit=dev or NODE_ENV=production)
  3. That triggers the prepare script → npm run build → npm run clean && npm run compile
  4. The compiled lib/ output is what actually runs as the Cloud Function

So on the remote server, only dependencies are installed. This is why jest in dependencies was working (but wasteful) - having a separate tsconfig.build.json with "types": ["node"] fixed it as the build no longer asks for types that aren't installed

@cabljac cabljac force-pushed the @invertase/fs-bq-vulns branch from 6120fac to 93b6113 Compare February 24, 2026 13:57
@cabljac cabljac marked this pull request as ready for review February 24, 2026 14:04
@cabljac cabljac requested a review from a team as a code owner February 24, 2026 14:04
@cabljac cabljac merged commit 194f4e5 into next Feb 24, 2026
7 checks passed
cabljac added a commit that referenced this pull request Feb 24, 2026
* chore: move dependencies about to fix vulnerabilities

* test(firestore-bigquery-export): fix test harness on functions.test.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants