Skip to content

Commit 5e6995b

Browse files
yoshi-automationJustinBeckwith
authored andcommitted
refactor: drop dependency on lodash.merge and update links (#620)
1 parent af7e5c6 commit 5e6995b

4 files changed

Lines changed: 44 additions & 61 deletions

File tree

handwritten/pubsub/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"google-gax": "^1.0.0",
6666
"grpc": "^1.20.3",
6767
"is-stream-ended": "^0.1.4",
68-
"lodash.merge": "^4.6.0",
6968
"lodash.snakecase": "^4.1.1",
7069
"p-defer": "^2.0.1",
7170
"protobufjs": "^6.8.1"

handwritten/pubsub/src/v1/publisher_client.js

Lines changed: 15 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
const gapicConfig = require('./publisher_client_config.json');
1818
const gax = require('google-gax');
19-
const merge = require('lodash.merge');
2019
const path = require('path');
2120
const protobuf = require('protobufjs');
2221

@@ -90,16 +89,9 @@ class PublisherClient {
9089
}
9190

9291
// Load the applicable protos.
93-
const protos = merge(
94-
{},
95-
gaxGrpc.loadProto(
96-
path.join(__dirname, '..', '..', 'protos'),
97-
'google/iam/v1/iam_policy.proto'
98-
),
99-
gaxGrpc.loadProto(
100-
path.join(__dirname, '..', '..', 'protos'),
101-
'google/pubsub/v1/pubsub.proto'
102-
)
92+
const protos = gaxGrpc.loadProto(
93+
path.join(__dirname, '..', '..', 'protos'),
94+
['google/iam/v1/iam_policy.proto', 'google/pubsub/v1/pubsub.proto']
10395
);
10496

10597
// This API contains "path templates"; forward-slash-separated
@@ -320,7 +312,7 @@ class PublisherClient {
320312
* for production use. It is not subject to any SLA or deprecation policy.
321313
* @param {Object} [options]
322314
* Optional parameters. You can override the default settings for this call, e.g, timeout,
323-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
315+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
324316
* @param {function(?Error, ?Object)} [callback]
325317
* The function which will be called with the result of the API call.
326318
*
@@ -384,7 +376,7 @@ class PublisherClient {
384376
* This object should have the same structure as [FieldMask]{@link google.protobuf.FieldMask}
385377
* @param {Object} [options]
386378
* Optional parameters. You can override the default settings for this call, e.g, timeout,
387-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
379+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
388380
* @param {function(?Error, ?Object)} [callback]
389381
* The function which will be called with the result of the API call.
390382
*
@@ -448,7 +440,7 @@ class PublisherClient {
448440
* This object should have the same structure as [PubsubMessage]{@link google.pubsub.v1.PubsubMessage}
449441
* @param {Object} [options]
450442
* Optional parameters. You can override the default settings for this call, e.g, timeout,
451-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
443+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
452444
* @param {function(?Error, ?Object)} [callback]
453445
* The function which will be called with the result of the API call.
454446
*
@@ -511,7 +503,7 @@ class PublisherClient {
511503
* Format is `projects/{project}/topics/{topic}`.
512504
* @param {Object} [options]
513505
* Optional parameters. You can override the default settings for this call, e.g, timeout,
514-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
506+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
515507
* @param {function(?Error, ?Object)} [callback]
516508
* The function which will be called with the result of the API call.
517509
*
@@ -571,7 +563,7 @@ class PublisherClient {
571563
* resources in a page.
572564
* @param {Object} [options]
573565
* Optional parameters. You can override the default settings for this call, e.g, timeout,
574-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
566+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
575567
* @param {function(?Error, ?Array, ?Object, ?Object)} [callback]
576568
* The function which will be called with the result of the API call.
577569
*
@@ -683,7 +675,7 @@ class PublisherClient {
683675
* resources in a page.
684676
* @param {Object} [options]
685677
* Optional parameters. You can override the default settings for this call, e.g, timeout,
686-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
678+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
687679
* @returns {Stream}
688680
* An object stream which emits an object representing [Topic]{@link google.pubsub.v1.Topic} on 'data' event.
689681
*
@@ -729,7 +721,7 @@ class PublisherClient {
729721
* resources in a page.
730722
* @param {Object} [options]
731723
* Optional parameters. You can override the default settings for this call, e.g, timeout,
732-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
724+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
733725
* @param {function(?Error, ?Array, ?Object, ?Object)} [callback]
734726
* The function which will be called with the result of the API call.
735727
*
@@ -845,7 +837,7 @@ class PublisherClient {
845837
* resources in a page.
846838
* @param {Object} [options]
847839
* Optional parameters. You can override the default settings for this call, e.g, timeout,
848-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
840+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
849841
* @returns {Stream}
850842
* An object stream which emits a string on 'data' event.
851843
*
@@ -889,7 +881,7 @@ class PublisherClient {
889881
* Format is `projects/{project}/topics/{topic}`.
890882
* @param {Object} [options]
891883
* Optional parameters. You can override the default settings for this call, e.g, timeout,
892-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
884+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
893885
* @param {function(?Error)} [callback]
894886
* The function which will be called with the result of the API call.
895887
* @returns {Promise} - The promise which resolves when API call finishes.
@@ -943,7 +935,7 @@ class PublisherClient {
943935
* This object should have the same structure as [Policy]{@link google.iam.v1.Policy}
944936
* @param {Object} [options]
945937
* Optional parameters. You can override the default settings for this call, e.g, timeout,
946-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
938+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
947939
* @param {function(?Error, ?Object)} [callback]
948940
* The function which will be called with the result of the API call.
949941
*
@@ -1004,7 +996,7 @@ class PublisherClient {
1004996
* See the operation documentation for the appropriate value for this field.
1005997
* @param {Object} [options]
1006998
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1007-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
999+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
10081000
* @param {function(?Error, ?Object)} [callback]
10091001
* The function which will be called with the result of the API call.
10101002
*
@@ -1069,7 +1061,7 @@ class PublisherClient {
10691061
* [IAM Overview](https://cloud.google.com/iam/docs/overview#permissions).
10701062
* @param {Object} [options]
10711063
* Optional parameters. You can override the default settings for this call, e.g, timeout,
1072-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
1064+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
10731065
* @param {function(?Error, ?Object)} [callback]
10741066
* The function which will be called with the result of the API call.
10751067
*

0 commit comments

Comments
 (0)