From c7c4eb7f4eb7776a92d2f979b9c55dd0d023ac88 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Mon, 29 Nov 2021 13:41:09 -0700 Subject: [PATCH 1/2] Fix caching errors during Firestore build --- packages/firestore/rollup.config.js | 1 - packages/firestore/test/unit/specs/describe_spec.ts | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/firestore/rollup.config.js b/packages/firestore/rollup.config.js index 7deee0e78d1..a75701466ad 100644 --- a/packages/firestore/rollup.config.js +++ b/packages/firestore/rollup.config.js @@ -84,7 +84,6 @@ const browserPlugins = function () { } }, cacheDir: tmp.dirSync(), - clean: true, abortOnError: false, transformers: [util.removeAssertAndPrefixInternalTransformer] }), diff --git a/packages/firestore/test/unit/specs/describe_spec.ts b/packages/firestore/test/unit/specs/describe_spec.ts index 47054be3c6e..cfb6b2ee9b8 100644 --- a/packages/firestore/test/unit/specs/describe_spec.ts +++ b/packages/firestore/test/unit/specs/describe_spec.ts @@ -252,7 +252,7 @@ export function describeSpec( // Note: We use json-stable-stringify instead of JSON.stringify() to ensure // that the generated JSON does not produce diffs merely due to the order // of the keys in an object changing. - const output = stringify(specsInThisTest, { + const output = stringify.default(specsInThisTest, { space: 2, cmp: stringifyComparator }); From a638cff9c274b9e580895944f4b4d138ac1e6f24 Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Mon, 29 Nov 2021 15:24:43 -0700 Subject: [PATCH 2/2] Update describe_spec.ts --- packages/firestore/test/unit/specs/describe_spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/firestore/test/unit/specs/describe_spec.ts b/packages/firestore/test/unit/specs/describe_spec.ts index cfb6b2ee9b8..464cddf2321 100644 --- a/packages/firestore/test/unit/specs/describe_spec.ts +++ b/packages/firestore/test/unit/specs/describe_spec.ts @@ -15,7 +15,7 @@ * limitations under the License. */ -import * as stringify from 'json-stable-stringify'; +import stringify from 'json-stable-stringify'; import { ExclusiveTestFunction, PendingTestFunction } from 'mocha'; import { queryEquals, QueryImpl } from '../../../src/core/query'; @@ -252,7 +252,7 @@ export function describeSpec( // Note: We use json-stable-stringify instead of JSON.stringify() to ensure // that the generated JSON does not produce diffs merely due to the order // of the keys in an object changing. - const output = stringify.default(specsInThisTest, { + const output = stringify(specsInThisTest, { space: 2, cmp: stringifyComparator });