From db00e407beea93564b07d88246e2516613b4021d Mon Sep 17 00:00:00 2001 From: Mark Duckworth <1124037+MarkDuckworth@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:55:22 -0700 Subject: [PATCH] Fix issue with external exports --- .../firestore-lite-pipelines.api.md | 139 ++---------------- packages/firestore/package.json | 2 +- 2 files changed, 15 insertions(+), 126 deletions(-) diff --git a/common/api-review/firestore-lite-pipelines.api.md b/common/api-review/firestore-lite-pipelines.api.md index 73432fc2965..aea9018ae4c 100644 --- a/common/api-review/firestore-lite-pipelines.api.md +++ b/common/api-review/firestore-lite-pipelines.api.md @@ -277,13 +277,17 @@ export class Constant { static of(value: boolean): Constant; static of(value: null): Constant; static of(value: undefined): Constant; + // Warning: (ae-forgotten-export) The symbol "GeoPoint" needs to be exported by the entry point pipelines.d.ts static of(value: GeoPoint): Constant; + // Warning: (ae-forgotten-export) The symbol "Timestamp" needs to be exported by the entry point pipelines.d.ts static of(value: Timestamp): Constant; static of(value: Date): Constant; static of(value: Uint8Array): Constant; + // Warning: (ae-forgotten-export) The symbol "DocumentReference" needs to be exported by the entry point pipelines.d.ts static of(value: DocumentReference): Constant; static of(value: any[]): Constant; static of(value: Map): Constant; + // Warning: (ae-forgotten-export) The symbol "VectorValue" needs to be exported by the entry point pipelines.d.ts static of(value: VectorValue): Constant; regexContains(pattern: string): RegexContains; regexContains(pattern: Constant): RegexContains; @@ -385,23 +389,6 @@ export function divide(left: string, right: Constant): Divide; // @beta export function divide(left: string, right: any): Divide; -// @public -export interface DocumentData { - [field: string]: any; -} - -// @public -export class DocumentReference { - readonly converter: FirestoreDataConverter | null; - readonly firestore: Firestore; - get id(): string; - get parent(): Query; - get path(): string; - readonly type = "document"; - withConverter(converter: FirestoreDataConverter): DocumentReference; - withConverter(converter: null): DocumentReference; -} - // @beta (undocumented) export class DocumentsSource implements Stage { constructor(docPaths: string[]); @@ -718,6 +705,8 @@ export class Field implements Selectable { // (undocumented) notEqAny(...others: any[]): FirestoreFunction; static of(name: string): Field; + // Warning: (ae-forgotten-export) The symbol "FieldPath" needs to be exported by the entry point pipelines.d.ts + // // (undocumented) static of(path: FieldPath): Field; // (undocumented) @@ -757,12 +746,6 @@ export class Field implements Selectable { vectorLength(): VectorLength; } -// @public -export class FieldPath { - constructor(...fieldNames: string[]); - isEqual(other: FieldPath): boolean; -} - // @beta (undocumented) export class Fields implements Selectable { add(other: Constant): Add; @@ -875,11 +858,6 @@ export class Fields implements Selectable { vectorLength(): VectorLength; } -// @public -export abstract class FieldValue { - abstract isEqual(other: FieldValue): boolean; -} - // @beta export interface FilterCondition { // (undocumented) @@ -909,20 +887,6 @@ export interface FindNearestOptions { vectorValue: VectorValue | number[]; } -// @public -export class Firestore { - get app(): FirebaseApp; - toJSON(): object; - type: 'firestore-lite' | 'firestore'; -} - -// @public -export interface FirestoreDataConverter { - fromFirestore(snapshot: QueryDocumentSnapshot): AppModelType; - toFirestore(modelObject: WithFieldValue): WithFieldValue; - toFirestore(modelObject: PartialWithFieldValue, options: SetOptions): PartialWithFieldValue; -} - // @beta export class FirestoreFunction { constructor(name: string, params: Constant[]); @@ -1038,18 +1002,6 @@ export class GenericStage implements Stage { name: string; } -// @public -export class GeoPoint { - constructor(latitude: number, longitude: number); - isEqual(other: GeoPoint): boolean; - get latitude(): number; - get longitude(): number; - toJSON(): { - latitude: number; - longitude: number; - }; -} - // @beta (undocumented) export class Gt extends FirestoreFunction implements FilterCondition { constructor(left: Constant, right: Constant); @@ -1333,11 +1285,8 @@ export class Ordering { constructor(expr: Constant, direction: 'ascending' | 'descending'); } -// @public -export type PartialWithFieldValue = Partial | (T extends Primitive ? T : T extends {} ? { - [K in keyof T]?: PartialWithFieldValue | FieldValue; -} : never); - +// Warning: (ae-forgotten-export) The symbol "DocumentData" needs to be exported by the entry point pipelines.d.ts +// // @public export class Pipeline { /* Excluded from this release type: _db */ @@ -1397,11 +1346,14 @@ export class Pipeline { where(condition: FilterCondition & Constant): Pipeline; } +// Warning: (ae-forgotten-export) The symbol "Firestore" needs to be exported by the entry point pipelines.d.ts // Warning: (ae-incompatible-release-tags) The symbol "pipeline" is marked as @public, but its signature references "PipelineSource" which is marked as @beta // // @public export function pipeline(firestore: Firestore): PipelineSource; +// Warning: (ae-forgotten-export) The symbol "Query" needs to be exported by the entry point pipelines.d.ts +// // @public export function pipeline(query: Query): Pipeline; @@ -1436,29 +1388,6 @@ export class PipelineSource { documents(docs: DocumentReference[]): Pipeline; } -// @public -export type Primitive = string | number | boolean | undefined | null; - -// @public -export class Query { - protected constructor(); - readonly converter: FirestoreDataConverter | null; - readonly firestore: Firestore; - readonly type: 'query' | 'collection'; - withConverter(converter: null): Query; - withConverter(converter: FirestoreDataConverter): Query; -} - -// @public -export class QueryDocumentSnapshot { - // @override - data(): AppModelType; - exists(): this is QueryDocumentSnapshot; - get(fieldPath: string | FieldPath); - get id(): string; - get ref(): DocumentReference; -} - // @beta (undocumented) export class RegexContains extends FirestoreFunction implements FilterCondition { constructor(expr: Constant, pattern: Constant); @@ -1552,13 +1481,6 @@ export interface Selectable { // @beta export type SelectableExpr = Constant & Selectable; -// @public -export type SetOptions = { - readonly merge?: boolean; -} | { - readonly mergeFields?: Array; -}; - // @beta (undocumented) export class Sort implements Stage { constructor(orders: Ordering[]); @@ -1645,27 +1567,6 @@ export class Sum extends FirestoreFunction implements Accumulator { accumulator: true; } -// @public -export class Timestamp { - constructor( - seconds: number, - nanoseconds: number); - static fromDate(date: Date): Timestamp; - static fromMillis(milliseconds: number): Timestamp; - isEqual(other: Timestamp): boolean; - readonly nanoseconds: number; - static now(): Timestamp; - readonly seconds: number; - toDate(): Date; - toJSON(): { - seconds: number; - nanoseconds: number; - }; - toMillis(): number; - toString(): string; - valueOf(): string; -} - // @beta (undocumented) export class TimestampAdd extends FirestoreFunction { constructor(timestamp: Constant, unit: Constant, amount: Constant); @@ -1807,13 +1708,6 @@ export function vectorLength(expr: Constant): VectorLength; // @beta export function vectorLength(field: string): VectorLength; -// @public -export class VectorValue { - /* Excluded from this release type: __constructor */ - isEqual(other: VectorValue): boolean; - toArray(): number[]; -} - // @beta (undocumented) export class Where implements Stage { constructor(condition: FilterCondition & Constant); @@ -1821,11 +1715,6 @@ export class Where implements Stage { name: string; } -// @public -export type WithFieldValue = T | (T extends Primitive ? T : T extends {} ? { - [K in keyof T]: WithFieldValue | FieldValue; -} : never); - // @beta (undocumented) export class Xor extends FirestoreFunction implements FilterCondition { constructor(conditions: FilterExpr[]); @@ -1839,8 +1728,8 @@ export function xor(left: FilterExpr, ...right: FilterExpr[]): Xor; // Warnings were encountered during analysis: // -// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:8518:9 - (ae-incompatible-release-tags) The symbol "accumulators" is marked as @public, but its signature references "AccumulatorTarget" which is marked as @beta -// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:8519:9 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta -// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:8548:9 - (ae-incompatible-release-tags) The symbol "orderings" is marked as @public, but its signature references "Ordering" which is marked as @beta +// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:8118:9 - (ae-incompatible-release-tags) The symbol "accumulators" is marked as @public, but its signature references "AccumulatorTarget" which is marked as @beta +// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:8119:9 - (ae-incompatible-release-tags) The symbol "groups" is marked as @public, but its signature references "Selectable" which is marked as @beta +// /Users/markduckworth/projects/firebase-js-sdk/packages/firestore/dist/lite/pipelines.d.ts:8148:9 - (ae-incompatible-release-tags) The symbol "orderings" is marked as @public, but its signature references "Ordering" which is marked as @beta ``` diff --git a/packages/firestore/package.json b/packages/firestore/package.json index e77c1303ba5..1e37ef43ab2 100644 --- a/packages/firestore/package.json +++ b/packages/firestore/package.json @@ -51,7 +51,7 @@ "api-report:all-packages": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package firestore --packageRoot . --typescriptDts ./dist/firestore/src/all_packages.d.ts --rollupDts ./dist/private.all_packages.d.ts --untrimmedRollupDts ./dist/internal.all_packages.d.ts --publicDts ./dist/all_packages.d.ts", "api-report:pipelines": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package firestore-pipelines --packageRoot . --typescriptDts ./dist/firestore/src/pipelines.d.ts --rollupDts ./dist/private.pipelines.d.ts --untrimmedRollupDts ./dist/internal.pipelines.d.ts --publicDts ./dist/pipelines.d.ts --otherExportsPublicDtsFiles ./dist/index.d.ts", "api-report:lite": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package firestore-lite --packageRoot . --typescriptDts ./dist/firestore/lite/index.d.ts --rollupDts ./dist/lite/private.d.ts --untrimmedRollupDts ./dist/lite/internal.d.ts --publicDts ./dist/lite/index.d.ts", - "api-report:lite:pipelines": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package firestore-lite-pipelines --packageRoot . --typescriptDts ./dist/firestore/lite/pipelines.d.ts --rollupDts ./dist/lite/private.pipelines.d.ts --untrimmedRollupDts ./dist/lite/internal.pipelines.d.ts --publicDts ./dist/lite/pipelines.d.ts", + "api-report:lite:pipelines": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package firestore-lite-pipelines --packageRoot . --typescriptDts ./dist/firestore/lite/pipelines.d.ts --rollupDts ./dist/lite/private.pipelines.d.ts --untrimmedRollupDts ./dist/lite/internal.pipelines.d.ts --publicDts ./dist/lite/pipelines.d.ts --otherExportsPublicDtsFiles ./dist/index.d.ts", "api-report:api-json": "rm -rf temp && api-extractor run --local --verbose", "api-report": "run-s --npm-path npm api-report:main api-report:pipelines api-report:lite api-report:lite:pipelines && yarn api-report:api-json", "doc": "api-documenter markdown --input temp --output docs",