Skip to content

Use public typings for release #5358

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 7 additions & 11 deletions common/api-review/storage.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,19 @@ export interface FirebaseStorageError extends FirebaseError {
serverResponse: string | null;
}

// @public
// @internal
export class _FirebaseStorageImpl implements FirebaseStorage {
constructor(
app: FirebaseApp, _authProvider: Provider<FirebaseAuthInternalName>,
_appCheckProvider: Provider<AppCheckInternalComponentName>,
_pool: ConnectionPool, _url?: string | undefined, _firebaseVersion?: string | undefined);
readonly app: FirebaseApp;
// @internal (undocumented)
// (undocumented)
readonly _appCheckProvider: Provider<AppCheckInternalComponentName>;
// (undocumented)
protected readonly _appId: string | null;
// (undocumented)
readonly _authProvider: Provider<FirebaseAuthInternalName>;
// Warning: (ae-incompatible-release-tags) The symbol "_bucket" is marked as @public, but its signature references "Location" which is marked as @internal
//
// (undocumented)
_bucket: _Location | null;
_delete(): Promise<void>;
Expand All @@ -90,8 +88,6 @@ export class _FirebaseStorageImpl implements FirebaseStorage {
_makeRequest<T>(requestInfo: RequestInfo_2<T>, authToken: string | null, appCheckToken: string | null): Request_2<T>;
// (undocumented)
makeRequestWithTokens<T>(requestInfo: RequestInfo_2<T>): Promise<Request_2<T>>;
// Warning: (ae-incompatible-release-tags) The symbol "_makeStorageReference" is marked as @public, but its signature references "Location" which is marked as @internal
// Warning: (ae-incompatible-release-tags) The symbol "_makeStorageReference" is marked as @public, but its signature references "Reference" which is marked as @internal
_makeStorageReference(loc: _Location): _Reference;
get maxOperationRetryTime(): number;
set maxOperationRetryTime(time: number);
Expand All @@ -101,7 +97,7 @@ export class _FirebaseStorageImpl implements FirebaseStorage {
_overrideAuthToken?: string;
// Warning: (ae-forgotten-export) The symbol "ConnectionPool" needs to be exported by the entry point index.d.ts
//
// @internal (undocumented)
// (undocumented)
readonly _pool: ConnectionPool;
// (undocumented)
readonly _url?: string | undefined;
Expand Down Expand Up @@ -250,21 +246,21 @@ export const StringFormat: {
// @public
export type TaskEvent = 'state_changed';

// @public
// @internal
export type _TaskEvent = string;

// @public
// @internal
export const _TaskEvent: {
STATE_CHANGED: string;
};

// @public
export type TaskState = 'running' | 'paused' | 'success' | 'canceled' | 'error';

// @public
// @internal
export type _TaskState = typeof _TaskState[keyof typeof _TaskState];

// @public
// @internal
export const _TaskState: {
readonly RUNNING: "running";
readonly PAUSED: "paused";
Expand Down
3 changes: 2 additions & 1 deletion packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"test:emulator": "ts-node --compiler-options='{\"module\":\"commonjs\"}' ../../scripts/emulator-testing/database-test-runner.ts",
"api-report": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' ts-node ../../repo-scripts/prune-dts/extract-public-api.ts --package database --packageRoot . --typescriptDts ./dist/src/index.d.ts --rollupDts ./dist/private.d.ts --untrimmedRollupDts ./dist/internal.d.ts --publicDts ./dist/public.d.ts && yarn api-report:api-json",
"api-report:api-json": "rm -rf temp && api-extractor run --local --verbose",
"doc": "api-documenter markdown --input temp --output docs"
"doc": "api-documenter markdown --input temp --output docs",
"typings:public": "node ../../scripts/exp/use_typings.js ./dist/public.d.ts"
},
"license": "Apache-2.0",
"peerDependencies": {},
Expand Down
3 changes: 2 additions & 1 deletion packages/storage/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha 'test/{,!(browser)/**/}*.test.ts' --file src/index.ts --config ../../config/mocharc.node.js",
"test:debug": "karma start --browser=Chrome",
"prettier": "prettier --write 'src/**/*.ts' 'test/**/*.ts'",
"api-report": "api-extractor run --local --verbose && ts-node-script ../../repo-scripts/prune-dts/prune-dts.ts --input dist/storage-public.d.ts --output dist/storage-public.d.ts"
"api-report": "api-extractor run --local --verbose && ts-node-script ../../repo-scripts/prune-dts/prune-dts.ts --input dist/storage-public.d.ts --output dist/storage-public.d.ts",
"typings:public": "node ../../scripts/exp/use_typings.js ./dist/storage-public.d.ts"
},
"license": "Apache-2.0",
"dependencies": {
Expand Down
4 changes: 4 additions & 0 deletions packages/storage/src/implementation/taskenums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@

/**
* An event that is triggered on a task.
* @internal
*/
export type TaskEvent = string;

/**
* An event that is triggered on a task.
* @internal
*/
export const TaskEvent = {
/**
Expand Down Expand Up @@ -58,12 +60,14 @@ export const enum InternalTaskState {

/**
* Represents the current state of a running upload.
* @internal
*/
export type TaskState = typeof TaskState[keyof typeof TaskState];

// type keys = keyof TaskState
/**
* Represents the current state of a running upload.
* @internal
*/
export const TaskState = {
/** The task is currently transferring data. */
Expand Down
2 changes: 2 additions & 0 deletions packages/storage/src/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ export function connectStorageEmulator(
/**
* A service that provides Firebase Storage Reference instances.
* @param opt_url - gs:// url to a custom Storage Bucket
*
* @internal
*/
export class FirebaseStorageImpl implements FirebaseStorage {
_bucket: Location | null = null;
Expand Down