Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

feat: deferred client initialization #548

Merged
merged 2 commits into from
Mar 6, 2020
Merged

Conversation

alexander-fenster
Copy link
Contributor

This PR includes changes from googleapis/gapic-generator-typescript#317
that will move the asynchronous initialization and authentication from the client constructor
to an initialize() method. This method will be automatically called when the first RPC call
is performed.

The client library usage has not changed, there is no need to update any code.

If you want to make sure the client is authenticated before the first RPC call, you can do

await client.initialize();

manually before calling any client method.

@alexander-fenster alexander-fenster added the automerge Merge the pull request once unit tests and other checks pass. label Mar 5, 2020
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 5, 2020
@codecov
Copy link

codecov bot commented Mar 5, 2020

Codecov Report

Merging #548 into master will decrease coverage by 1.43%.
The diff coverage is 80.7%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #548      +/-   ##
==========================================
- Coverage   83.21%   81.77%   -1.44%     
==========================================
  Files          14       14              
  Lines        3289     3353      +64     
  Branches       72       60      -12     
==========================================
+ Hits         2737     2742       +5     
- Misses        550      611      +61     
+ Partials        2        0       -2
Impacted Files Coverage Δ
src/v1/speech_client.ts 88.23% <80.7%> (-4.87%) ⬇️
src/v1p1beta1/speech_client.ts 88.25% <80.7%> (-4.86%) ⬇️
src/helpers.ts 93.79% <0%> (-3.88%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75289e7...add0d69. Read the comment docs.

@gcf-merge-on-green gcf-merge-on-green bot merged commit ef931e7 into master Mar 6, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants