Skip to content

Commit 6717ed4

Browse files
committed
Fixing build and lint issues
1 parent 4f9a5fc commit 6717ed4

File tree

7 files changed

+73
-70
lines changed

7 files changed

+73
-70
lines changed

common/api-review/firestore-lite.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,8 +2176,8 @@ export function xor(left: FilterExpr, ...right: FilterExpr[]): Xor;
21762176

21772177
// Warnings were encountered during analysis:
21782178
//
2179-
// /home/runner/work/firebase-js-sdk/firebase-js-sdk/packages/firestore/dist/lite/index.d.ts:9258:9 - (ae-incompatible-release-tags) The symbol "accumulators" is marked as @public, but its signature references "AccumulatorTarget" which is marked as @beta
2180-
// /home/runner/work/firebase-js-sdk/firebase-js-sdk/packages/firestore/dist/lite/index.d.ts:9259:9 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta
2181-
// /home/runner/work/firebase-js-sdk/firebase-js-sdk/packages/firestore/dist/lite/index.d.ts:9288:9 - (ae-incompatible-release-tags) The symbol "orderings" is marked as @public, but its signature references "Ordering" which is marked as @beta
2179+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/index.d.ts:9258:9 - (ae-incompatible-release-tags) The symbol "accumulators" is marked as @public, but its signature references "AccumulatorTarget" which is marked as @beta
2180+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/index.d.ts:9259:9 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta
2181+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/index.d.ts:9288:9 - (ae-incompatible-release-tags) The symbol "orderings" is marked as @public, but its signature references "Ordering" which is marked as @beta
21822182

21832183
```

common/api-review/firestore.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2464,8 +2464,8 @@ export function xor(left: FilterExpr, ...right: FilterExpr[]): Xor;
24642464

24652465
// Warnings were encountered during analysis:
24662466
//
2467-
// /home/runner/work/firebase-js-sdk/firebase-js-sdk/packages/firestore/dist/index.d.ts:10108:9 - (ae-incompatible-release-tags) The symbol "accumulators" is marked as @public, but its signature references "AccumulatorTarget" which is marked as @beta
2468-
// /home/runner/work/firebase-js-sdk/firebase-js-sdk/packages/firestore/dist/index.d.ts:10109:9 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta
2469-
// /home/runner/work/firebase-js-sdk/firebase-js-sdk/packages/firestore/dist/index.d.ts:10138:9 - (ae-incompatible-release-tags) The symbol "orderings" is marked as @public, but its signature references "Ordering" which is marked as @beta
2467+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/index.d.ts:10108:9 - (ae-incompatible-release-tags) The symbol "accumulators" is marked as @public, but its signature references "AccumulatorTarget" which is marked as @beta
2468+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/index.d.ts:10109:9 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta
2469+
// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/index.d.ts:10138:9 - (ae-incompatible-release-tags) The symbol "orderings" is marked as @public, but its signature references "Ordering" which is marked as @beta
24702470

24712471
```

packages/firestore/src/core/firestore_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ export function firestoreClientRunAggregateQuery(
556556

557557
export function firestoreClientExecutePipeline(
558558
client: FirestoreClient,
559-
pipeline: Pipeline
559+
pipeline: Pipeline<unknown>
560560
): Promise<PipelineStreamElement[]> {
561561
const deferred = new Deferred<PipelineStreamElement[]>();
562562

packages/firestore/src/lite-api/pipeline.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ import {
2424
import { invokeExecutePipeline } from '../remote/datastore';
2525
import {
2626
getEncodedDatabaseId,
27-
JsonProtoSerializer, ProtoSerializable
27+
JsonProtoSerializer,
28+
ProtoSerializable
2829
} from '../remote/serializer';
2930

3031
import { getDatastore } from './components';
@@ -117,7 +118,9 @@ function isReadableUserData(value: any): value is ReadableUserData {
117118
/**
118119
* Base-class implementation
119120
*/
120-
export class Pipeline<AppModelType = DocumentData> implements ProtoSerializable<ExecutePipelineRequest>{
121+
export class Pipeline<AppModelType = DocumentData>
122+
implements ProtoSerializable<ExecutePipelineRequest>
123+
{
121124
/**
122125
* @internal
123126
* @private

packages/firestore/src/lite-api/stage.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ import {
1919
} from '../protos/firestore_proto_api';
2020
import { toNumber } from '../remote/number_serializer';
2121
import {
22-
JsonProtoSerializer, ProtoSerializable,
22+
JsonProtoSerializer,
23+
ProtoSerializable,
2324
toMapValue,
2425
toStringValue
2526
} from '../remote/serializer';
@@ -37,7 +38,7 @@ import { VectorValue } from './vector_value';
3738
/**
3839
* @beta
3940
*/
40-
export interface Stage extends ProtoSerializable<ProtoStage>{
41+
export interface Stage extends ProtoSerializable<ProtoStage> {
4142
name: string;
4243
}
4344

packages/firestore/src/remote/datastore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ export async function invokeBatchGetDocumentsRpc(
241241

242242
export async function invokeExecutePipeline(
243243
datastore: Datastore,
244-
pipeline: Pipeline
244+
pipeline: Pipeline<unknown>
245245
): Promise<PipelineStreamElement[]> {
246246
const datastoreImpl = debugCast(datastore, DatastoreImpl);
247247
const executePipelineRequest = pipeline._toProto(datastoreImpl.serializer);

packages/firestore/test/integration/api/pipeline.test.ts

Lines changed: 57 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import {
4848
regexMatch,
4949
setDoc,
5050
startsWith,
51-
strConcat,
5251
subtract
5352
} from '../util/firebase_export';
5453
import { apiDescribe, withTestCollection } from '../util/helpers';
@@ -304,18 +303,18 @@ apiDescribe.only('Pipelines', persistence => {
304303
});
305304

306305
// skip: toLower not supported
307-
it.skip('returns distinct values as expected', async () => {
308-
const results = await randomCol
309-
.pipeline()
310-
.where(lt('published', 1900))
311-
.distinct(Field.of('genre').toLower().as('lowerGenre'))
312-
.execute();
313-
expectResults(
314-
results,
315-
{ lowerGenre: 'romance' },
316-
{ lowerGenre: 'psychological thriller' }
317-
);
318-
});
306+
// it.skip('returns distinct values as expected', async () => {
307+
// const results = await randomCol
308+
// .pipeline()
309+
// .where(lt('published', 1900))
310+
// .distinct(Field.of('genre').toLower().as('lowerGenre'))
311+
// .execute();
312+
// expectResults(
313+
// results,
314+
// { lowerGenre: 'romance' },
315+
// { lowerGenre: 'psychological thriller' }
316+
// );
317+
// });
319318

320319
it('returns group and accumulate results', async () => {
321320
const results = await randomCol
@@ -460,18 +459,18 @@ apiDescribe.only('Pipelines', persistence => {
460459
});
461460

462461
// skip: arrayConcat not supported
463-
it.skip('arrayConcat works', async () => {
464-
const results = await randomCol
465-
.pipeline()
466-
.select(
467-
Field.of('tags').arrayConcat(['newTag1', 'newTag2']).as('modifiedTags')
468-
)
469-
.limit(1)
470-
.execute();
471-
expectResults(results, {
472-
modifiedTags: ['comedy', 'space', 'adventure', 'newTag1', 'newTag2']
473-
});
474-
});
462+
// it.skip('arrayConcat works', async () => {
463+
// const results = await randomCol
464+
// .pipeline()
465+
// .select(
466+
// Field.of('tags').arrayConcat(['newTag1', 'newTag2']).as('modifiedTags')
467+
// )
468+
// .limit(1)
469+
// .execute();
470+
// expectResults(results, {
471+
// modifiedTags: ['comedy', 'space', 'adventure', 'newTag1', 'newTag2']
472+
// });
473+
// });
475474

476475
it('testStrConcat', async () => {
477476
const results = await randomCol
@@ -550,43 +549,43 @@ apiDescribe.only('Pipelines', persistence => {
550549
});
551550

552551
// skip: toLower not supported
553-
it.skip('testToLowercase', async () => {
554-
const results = await randomCol
555-
.pipeline()
556-
.select(Field.of('title').toLower().as('lowercaseTitle'))
557-
.limit(1)
558-
.execute();
559-
expectResults(results, {
560-
lowercaseTitle: "the hitchhiker's guide to the galaxy"
561-
});
562-
});
552+
// it.skip('testToLowercase', async () => {
553+
// const results = await randomCol
554+
// .pipeline()
555+
// .select(Field.of('title').toLower().as('lowercaseTitle'))
556+
// .limit(1)
557+
// .execute();
558+
// expectResults(results, {
559+
// lowercaseTitle: "the hitchhiker's guide to the galaxy"
560+
// });
561+
// });
563562

564563
// skip: toUpper not supported
565-
it.skip('testToUppercase', async () => {
566-
const results = await randomCol
567-
.pipeline()
568-
.select(Field.of('author').toUpper().as('uppercaseAuthor'))
569-
.limit(1)
570-
.execute();
571-
expectResults(results, { uppercaseAuthor: 'DOUGLAS ADAMS' });
572-
});
564+
// it.skip('testToUppercase', async () => {
565+
// const results = await randomCol
566+
// .pipeline()
567+
// .select(Field.of('author').toUpper().as('uppercaseAuthor'))
568+
// .limit(1)
569+
// .execute();
570+
// expectResults(results, { uppercaseAuthor: 'DOUGLAS ADAMS' });
571+
// });
573572

574573
// skip: trim not supported
575-
it.skip('testTrim', async () => {
576-
const results = await randomCol
577-
.pipeline()
578-
.addFields(strConcat(' ', Field.of('title'), ' ').as('spacedTitle'))
579-
.select(
580-
Field.of('spacedTitle').trim().as('trimmedTitle'),
581-
Field.of('spacedTitle')
582-
)
583-
.limit(1)
584-
.execute();
585-
expectResults(results, {
586-
spacedTitle: " The Hitchhiker's Guide to the Galaxy ",
587-
trimmedTitle: "The Hitchhiker's Guide to the Galaxy"
588-
});
589-
});
574+
// it.skip('testTrim', async () => {
575+
// const results = await randomCol
576+
// .pipeline()
577+
// .addFields(strConcat(' ', Field.of('title'), ' ').as('spacedTitle'))
578+
// .select(
579+
// Field.of('spacedTitle').trim().as('trimmedTitle'),
580+
// Field.of('spacedTitle')
581+
// )
582+
// .limit(1)
583+
// .execute();
584+
// expectResults(results, {
585+
// spacedTitle: " The Hitchhiker's Guide to the Galaxy ",
586+
// trimmedTitle: "The Hitchhiker's Guide to the Galaxy"
587+
// });
588+
// });
590589

591590
it('testLike', async () => {
592591
const results = await randomCol

0 commit comments

Comments
 (0)