Skip to content

Commit

Permalink
chore: refactor reference.ts to one class per file (#2037)
Browse files Browse the repository at this point in the history
* Refactor reference.ts to be one class per file.
  • Loading branch information
MarkDuckworth authored May 22, 2024
1 parent 591fff1 commit 1e949b8
Show file tree
Hide file tree
Showing 29 changed files with 5,180 additions and 4,756 deletions.
112 changes: 57 additions & 55 deletions api-report/firestore.api.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/src/bundle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import {firestore, google} from '../protos/firestore_v1_proto_api';

import {DocumentSnapshot} from './document';
import {QuerySnapshot} from './reference';
import {QuerySnapshot} from './reference/query-snapshot';
import {Timestamp} from './timestamp';
import {
invalidArgumentMessage,
Expand Down
3 changes: 2 additions & 1 deletion dev/src/collection-group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import * as protos from '../protos/firestore_v1_proto_api';
import {QueryPartition} from './query-partition';
import {requestTag} from './util';
import {logger} from './logger';
import {Query, QueryOptions} from './reference';
import {Query} from './reference/query';
import {QueryOptions} from './reference/query-options';
import {FieldPath} from './path';
import {Firestore} from './index';
import {validateInteger} from './validate';
Expand Down
2 changes: 1 addition & 1 deletion dev/src/document-reader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

import {DocumentSnapshot, DocumentSnapshotBuilder} from './document';
import {DocumentReference} from './reference';
import {DocumentReference} from './reference/document-reference';
import {FieldPath} from './path';
import {isPermanentRpcError} from './util';
import {google} from '../protos/firestore_v1_proto_api';
Expand Down
2 changes: 1 addition & 1 deletion dev/src/document.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import * as assert from 'assert';
import {google} from '../protos/firestore_v1_proto_api';
import {FieldTransform} from './field-value';
import {FieldPath, validateFieldPath} from './path';
import {DocumentReference} from './reference';
import {DocumentReference} from './reference/document-reference';
import {Serializer} from './serializer';
import {Timestamp} from './timestamp';
import {ApiMapValue, defaultConverter, UpdateMap} from './types';
Expand Down
23 changes: 10 additions & 13 deletions dev/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ import {
validateResourcePath,
} from './path';
import {ClientPool} from './pool';
import {CollectionReference, DocumentReference} from './reference';
import {CollectionReference} from './reference/collection-reference';
import {DocumentReference} from './reference/document-reference';
import {Serializer} from './serializer';
import {Timestamp} from './timestamp';
import {parseGetAllArguments, Transaction} from './transaction';
Expand Down Expand Up @@ -85,18 +86,14 @@ import {
RecursiveDelete,
} from './recursive-delete';

export {
CollectionReference,
DocumentReference,
QuerySnapshot,
Query,
} from './reference';
export type {
AggregateQuery,
AggregateQuerySnapshot,
VectorQuery,
VectorQuerySnapshot,
} from './reference';
export {CollectionReference} from './reference/collection-reference';
export {DocumentReference} from './reference/document-reference';
export {QuerySnapshot} from './reference/query-snapshot';
export {Query} from './reference/query';
export type {AggregateQuery} from './reference/aggregate-query';
export type {AggregateQuerySnapshot} from './reference/aggregate-query-snapshot';
export type {VectorQuery} from './reference/vector-query';
export type {VectorQuerySnapshot} from './reference/vector-query-snapshot';
export {BulkWriter} from './bulk-writer';
export type {BulkWriterError} from './bulk-writer';
export type {BundleBuilder} from './bundle';
Expand Down
4 changes: 3 additions & 1 deletion dev/src/query-partition.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import * as firestore from '@google-cloud/firestore';
import * as protos from '../protos/firestore_v1_proto_api';

import {FieldOrder, Query, QueryOptions} from './reference';
import {FieldOrder} from './reference/field-order';
import {Query} from './reference/query';
import {QueryOptions} from './reference/query-options';
import {FieldPath} from './path';
import {Serializer} from './serializer';
import {Firestore} from './index';
Expand Down
2 changes: 1 addition & 1 deletion dev/src/recursive-delete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import Firestore, {
import {Deferred, wrapError} from './util';
import type {GoogleError} from 'google-gax';
import {BulkWriterError} from './bulk-writer';
import {QueryOptions} from './reference';
import {QueryOptions} from './reference/query-options';
import {StatusCode} from './status-code';

/*!
Expand Down
Loading

0 comments on commit 1e949b8

Please sign in to comment.