Skip to content

Allow knip updates and remove the redundant Firestore dev dependency - #1509

Merged
cristianrgreco merged 2 commits into
mainfrom
claude/knip-follow-ups
Oct 12, 2026
Merged

cristianrgreco merged 2 commits into
mainfrom
claude/knip-follow-ups

Conversation

@cristianrgreco

Copy link
Copy Markdown
Collaborator

Summary

Two small follow-ups to #1492, one commit each:

  1. knip uses a caret range (^6.39.0) like the other dev dependencies, instead of an exact version. The lockfile still installs 6.39.0.
  2. The gcloud module no longer declares @google-cloud/firestore as a dev dependency, and the knip ignore for it is removed. With that, knip.jsonc has no dependency ignores left.

Why remove the Firestore declaration

The Firestore test imports firebase-admin/firestore and never imports @google-cloud/firestore directly. firebase-admin loads that package at runtime and already brings it in as an optional dependency. So the module's own declaration was a second, exact-pinned copy of the same requirement, and knip reported it as unused.

Without it:

  • The package is still installed, at the same version (9.2.0). In the lockfile it and 24 packages under it are now marked optional, because firebase-admin's optional dependency is the only thing requiring them.
  • firebase-admin chooses a Firestore version it supports. Before, two exact pins (firebase-admin 14.5.0 and @google-cloud/firestore 9.2.0) had to be kept in step by hand.
  • The Firestore test now relies on optional dependencies being installed, which npm ci does by default.

Verification

  • npx vitest run packages/modules/gcloud/src/firestore-emulator-container.test.ts with Docker, after the removal: 1 of 1 passed.
  • npm ci succeeds with the new lockfile. npm ls shows knip@6.39.0 and @google-cloud/firestore@9.2.0 under firebase-admin.
  • npm run knip with configuration hints treated as errors: passes.
  • npm run format, npm run lint:ci, npm run check-compiles: pass.
  • Lockfile diff against main: the root manifest's knip range, the gcloud workspace's manifest entry, and the optional flag on those 25 packages. No versions change.

Why this isn't breaking

Dev dependencies and tooling config only. @testcontainers/gcloud's published dependencies don't change, and no package source changes.

Use a caret range like the other dev dependencies. The lockfile still
installs 6.39.0.
The Firestore test uses it through firebase-admin, which already brings
it in as an optional dependency. Dropping our own declaration lets
firebase-admin pick a version it supports, and removes the last knip
dependency ignore.
@cristianrgreco cristianrgreco added maintenance Improvements that do not change functionality patch Backward compatible bug fix labels Oct 12, 2026
@cristianrgreco
cristianrgreco marked this pull request as ready for review October 12, 2026 14:38
@cristianrgreco
cristianrgreco merged commit 22057fd into main Oct 12, 2026
191 checks passed
@cristianrgreco
cristianrgreco deleted the claude/knip-follow-ups branch October 12, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Improvements that do not change functionality patch Backward compatible bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant