Skip to content

Commit

Permalink
fix: do not use #private (#1454)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster authored Aug 31, 2022
1 parent bd30098 commit 6c30274
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/auth/googleauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
*
* @returns Promise that resolves with project id (or `null`)
*/
async #getProjectIdOptional(): Promise<string | null> {
private async getProjectIdOptional(): Promise<string | null> {
try {
return await this.getProjectId();
} catch (e) {
Expand All @@ -232,7 +232,7 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
*
* @returns projectId
*/
async #findAndCacheProjectId(): Promise<string> {
private async findAndCacheProjectId(): Promise<string> {
let projectId: string | null | undefined = null;

projectId ||= await this.getProductionProjectId();
Expand All @@ -255,7 +255,7 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
}

if (!this._findProjectIdPromise) {
this._findProjectIdPromise = this.#findAndCacheProjectId();
this._findProjectIdPromise = this.findAndCacheProjectId();
}
return this._findProjectIdPromise;
}
Expand Down Expand Up @@ -305,7 +305,7 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
if (this.cachedCredential) {
return {
credential: this.cachedCredential,
projectId: await this.#getProjectIdOptional(),
projectId: await this.getProjectIdOptional(),
};
}

Expand All @@ -323,7 +323,7 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
credential.scopes = this.getAnyScopes();
}
this.cachedCredential = credential;
projectId = await this.#getProjectIdOptional();
projectId = await this.getProjectIdOptional();

return {credential, projectId};
}
Expand All @@ -339,7 +339,7 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
credential.scopes = this.getAnyScopes();
}
this.cachedCredential = credential;
projectId = await this.#getProjectIdOptional();
projectId = await this.getProjectIdOptional();
return {credential, projectId};
}

Expand All @@ -366,7 +366,7 @@ export class GoogleAuth<T extends AuthClient = JSONClient> {
// the rest.
(options as ComputeOptions).scopes = this.getAnyScopes();
this.cachedCredential = new Compute(options);
projectId = await this.#getProjectIdOptional();
projectId = await this.getProjectIdOptional();
return {projectId, credential: this.cachedCredential};
}

Expand Down

0 comments on commit 6c30274

Please sign in to comment.