diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29bb2d..d28d2f66af9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1 @@ +- Fixes issue where `firestore:*` did not work with `--only` in `deploy`. (#4698) diff --git a/src/checkValidTargetFilters.ts b/src/checkValidTargetFilters.ts index 31dd7ec7e4e..c0b781dbda1 100644 --- a/src/checkValidTargetFilters.ts +++ b/src/checkValidTargetFilters.ts @@ -38,13 +38,13 @@ export async function checkValidTargetFilters(options: Options): Promise { return reject(new FirebaseError("Cannot specify both --only and --except")); } const nonFilteredTypes = VALID_DEPLOY_TARGETS.filter( - (t) => !["hosting", "functions"].includes(t) + (t) => !["hosting", "functions", "firestore"].includes(t) ); const targetsForNonFilteredTypes = targetsForTypes(only, ...nonFilteredTypes); if (targetsForNonFilteredTypes.length && targetsHaveFilters(...targetsForNonFilteredTypes)) { return reject( new FirebaseError( - "Filters specified with colons (e.g. --only functions:func1,functions:func2) are only supported for functions and hosting" + "Filters specified with colons (e.g. --only functions:func1,functions:func2) are only supported for functions, hosting, and firestore" ) ); } diff --git a/src/test/checkValidTargetFilters.spec.ts b/src/test/checkValidTargetFilters.spec.ts index 1b2366ede35..2cc8921aedc 100644 --- a/src/test/checkValidTargetFilters.spec.ts +++ b/src/test/checkValidTargetFilters.spec.ts @@ -20,7 +20,7 @@ const SAMPLE_OPTIONS: Options = { filteredTargets: [], rc: new RC(), }; -const UNFILTERABLE_TARGETS = ["database", "storage", "firestore", "remoteconfig", "extensions"]; +const UNFILTERABLE_TARGETS = ["database", "storage", "remoteconfig", "extensions"]; describe("checkValidTargetFilters", () => { it("should resolve", async () => { @@ -54,7 +54,7 @@ describe("checkValidTargetFilters", () => { except: null, }); await expect(checkValidTargetFilters(options)).to.be.rejectedWith( - "Filters specified with colons (e.g. --only functions:func1,functions:func2) are only supported for functions and hosting" + /Filters specified with colons \(e.g. --only functions:func1,functions:func2\) are only supported for .*/ ); }); });