Skip to content

Commit bb136d3

Browse files
yoshi-automationJustinBeckwith
authored andcommitted
refactor: drop dependency on lodash.merge and update links (#243)
1 parent 79017bc commit bb136d3

9 files changed

+46
-75
lines changed

packages/google-cloud-videointelligence/package.json

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
},
4343
"dependencies": {
4444
"google-gax": "^1.0.0",
45-
"lodash.merge": "^4.6.1",
4645
"protobufjs": "^6.8.8"
4746
},
4847
"devDependencies": {

packages/google-cloud-videointelligence/src/v1/video_intelligence_service_client.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
const gapicConfig = require('./video_intelligence_service_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

@@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
8988
}
9089

9190
// Load the applicable protos.
92-
const protos = merge(
93-
{},
94-
gaxGrpc.loadProto(
95-
path.join(__dirname, '..', '..', 'protos'),
96-
'google/cloud/videointelligence/v1/video_intelligence.proto'
97-
)
91+
const protos = gaxGrpc.loadProto(
92+
path.join(__dirname, '..', '..', 'protos'),
93+
['google/cloud/videointelligence/v1/video_intelligence.proto']
9894
);
9995
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
10096
protoFilesRoot = protobuf.loadSync(
@@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
252248
* is specified, a region will be determined based on video file location.
253249
* @param {Object} [options]
254250
* Optional parameters. You can override the default settings for this call, e.g, timeout,
255-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
251+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
256252
* @param {function(?Error, ?Object)} [callback]
257253
* The function which will be called with the result of the API call.
258254
*
259-
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
255+
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
260256
* @returns {Promise} - The promise which resolves to an array.
261-
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
257+
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
262258
* The promise has a method named "cancel" which cancels the ongoing API call.
263259
*
264260
* @example

packages/google-cloud-videointelligence/src/v1beta1/video_intelligence_service_client.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
const gapicConfig = require('./video_intelligence_service_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

@@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
8988
}
9089

9190
// Load the applicable protos.
92-
const protos = merge(
93-
{},
94-
gaxGrpc.loadProto(
95-
path.join(__dirname, '..', '..', 'protos'),
96-
'google/cloud/videointelligence/v1beta1/video_intelligence.proto'
97-
)
91+
const protos = gaxGrpc.loadProto(
92+
path.join(__dirname, '..', '..', 'protos'),
93+
['google/cloud/videointelligence/v1beta1/video_intelligence.proto']
9894
);
9995
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
10096
protoFilesRoot = protobuf.loadSync(
@@ -251,13 +247,13 @@ class VideoIntelligenceServiceClient {
251247
* is specified, a region will be determined based on video file location.
252248
* @param {Object} [options]
253249
* Optional parameters. You can override the default settings for this call, e.g, timeout,
254-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
250+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
255251
* @param {function(?Error, ?Object)} [callback]
256252
* The function which will be called with the result of the API call.
257253
*
258-
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
254+
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
259255
* @returns {Promise} - The promise which resolves to an array.
260-
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
256+
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
261257
* The promise has a method named "cancel" which cancels the ongoing API call.
262258
*
263259
* @example

packages/google-cloud-videointelligence/src/v1beta2/video_intelligence_service_client.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
const gapicConfig = require('./video_intelligence_service_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

@@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
8988
}
9089

9190
// Load the applicable protos.
92-
const protos = merge(
93-
{},
94-
gaxGrpc.loadProto(
95-
path.join(__dirname, '..', '..', 'protos'),
96-
'google/cloud/videointelligence/v1beta2/video_intelligence.proto'
97-
)
91+
const protos = gaxGrpc.loadProto(
92+
path.join(__dirname, '..', '..', 'protos'),
93+
['google/cloud/videointelligence/v1beta2/video_intelligence.proto']
9894
);
9995
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
10096
protoFilesRoot = protobuf.loadSync(
@@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
252248
* is specified, a region will be determined based on video file location.
253249
* @param {Object} [options]
254250
* Optional parameters. You can override the default settings for this call, e.g, timeout,
255-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
251+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
256252
* @param {function(?Error, ?Object)} [callback]
257253
* The function which will be called with the result of the API call.
258254
*
259-
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
255+
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
260256
* @returns {Promise} - The promise which resolves to an array.
261-
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
257+
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
262258
* The promise has a method named "cancel" which cancels the ongoing API call.
263259
*
264260
* @example

packages/google-cloud-videointelligence/src/v1p1beta1/video_intelligence_service_client.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
const gapicConfig = require('./video_intelligence_service_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

@@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
8988
}
9089

9190
// Load the applicable protos.
92-
const protos = merge(
93-
{},
94-
gaxGrpc.loadProto(
95-
path.join(__dirname, '..', '..', 'protos'),
96-
'google/cloud/videointelligence/v1p1beta1/video_intelligence.proto'
97-
)
91+
const protos = gaxGrpc.loadProto(
92+
path.join(__dirname, '..', '..', 'protos'),
93+
['google/cloud/videointelligence/v1p1beta1/video_intelligence.proto']
9894
);
9995
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
10096
protoFilesRoot = protobuf.loadSync(
@@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
252248
* is specified, a region will be determined based on video file location.
253249
* @param {Object} [options]
254250
* Optional parameters. You can override the default settings for this call, e.g, timeout,
255-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
251+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
256252
* @param {function(?Error, ?Object)} [callback]
257253
* The function which will be called with the result of the API call.
258254
*
259-
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
255+
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
260256
* @returns {Promise} - The promise which resolves to an array.
261-
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
257+
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
262258
* The promise has a method named "cancel" which cancels the ongoing API call.
263259
*
264260
* @example

packages/google-cloud-videointelligence/src/v1p2beta1/video_intelligence_service_client.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
const gapicConfig = require('./video_intelligence_service_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

@@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
8988
}
9089

9190
// Load the applicable protos.
92-
const protos = merge(
93-
{},
94-
gaxGrpc.loadProto(
95-
path.join(__dirname, '..', '..', 'protos'),
96-
'google/cloud/videointelligence/v1p2beta1/video_intelligence.proto'
97-
)
91+
const protos = gaxGrpc.loadProto(
92+
path.join(__dirname, '..', '..', 'protos'),
93+
['google/cloud/videointelligence/v1p2beta1/video_intelligence.proto']
9894
);
9995
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
10096
protoFilesRoot = protobuf.loadSync(
@@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
252248
* is specified, a region will be determined based on video file location.
253249
* @param {Object} [options]
254250
* Optional parameters. You can override the default settings for this call, e.g, timeout,
255-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
251+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
256252
* @param {function(?Error, ?Object)} [callback]
257253
* The function which will be called with the result of the API call.
258254
*
259-
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
255+
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
260256
* @returns {Promise} - The promise which resolves to an array.
261-
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
257+
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
262258
* The promise has a method named "cancel" which cancels the ongoing API call.
263259
*
264260
* @example

packages/google-cloud-videointelligence/src/v1p3beta1/streaming_video_intelligence_service_client.js

+4-8
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

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

2221
const VERSION = require('../../package.json').version;
@@ -88,12 +87,9 @@ class StreamingVideoIntelligenceServiceClient {
8887
}
8988

9089
// Load the applicable protos.
91-
const protos = merge(
92-
{},
93-
gaxGrpc.loadProto(
94-
path.join(__dirname, '..', '..', 'protos'),
95-
'google/cloud/videointelligence/v1p3beta1/video_intelligence.proto'
96-
)
90+
const protos = gaxGrpc.loadProto(
91+
path.join(__dirname, '..', '..', 'protos'),
92+
['google/cloud/videointelligence/v1p3beta1/video_intelligence.proto']
9793
);
9894

9995
// Some of the methods on this service provide streaming responses.
@@ -191,7 +187,7 @@ class StreamingVideoIntelligenceServiceClient {
191187
*
192188
* @param {Object} [options]
193189
* Optional parameters. You can override the default settings for this call, e.g, timeout,
194-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
190+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
195191
* @returns {Stream}
196192
* An object stream which is both readable and writable. It accepts objects
197193
* representing [StreamingAnnotateVideoRequest]{@link google.cloud.videointelligence.v1p3beta1.StreamingAnnotateVideoRequest} for write() method, and

packages/google-cloud-videointelligence/src/v1p3beta1/video_intelligence_service_client.js

+6-10
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
const gapicConfig = require('./video_intelligence_service_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

@@ -89,12 +88,9 @@ class VideoIntelligenceServiceClient {
8988
}
9089

9190
// Load the applicable protos.
92-
const protos = merge(
93-
{},
94-
gaxGrpc.loadProto(
95-
path.join(__dirname, '..', '..', 'protos'),
96-
'google/cloud/videointelligence/v1p3beta1/video_intelligence.proto'
97-
)
91+
const protos = gaxGrpc.loadProto(
92+
path.join(__dirname, '..', '..', 'protos'),
93+
['google/cloud/videointelligence/v1p3beta1/video_intelligence.proto']
9894
);
9995
let protoFilesRoot = new gax.GoogleProtoFilesRoot();
10096
protoFilesRoot = protobuf.loadSync(
@@ -252,13 +248,13 @@ class VideoIntelligenceServiceClient {
252248
* is specified, a region will be determined based on video file location.
253249
* @param {Object} [options]
254250
* Optional parameters. You can override the default settings for this call, e.g, timeout,
255-
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/global.html#CallOptions} for the details.
251+
* retries, paginations, etc. See [gax.CallOptions]{@link https://googleapis.github.io/gax-nodejs/interfaces/CallOptions.html} for the details.
256252
* @param {function(?Error, ?Object)} [callback]
257253
* The function which will be called with the result of the API call.
258254
*
259-
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
255+
* The second parameter to the callback is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
260256
* @returns {Promise} - The promise which resolves to an array.
261-
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/Operation} object.
257+
* The first element of the array is a [gax.Operation]{@link https://googleapis.github.io/gax-nodejs/classes/Operation.html} object.
262258
* The promise has a method named "cancel" which cancels the ongoing API call.
263259
*
264260
* @example

packages/google-cloud-videointelligence/synth.metadata

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
{
2-
"updateTime": "2019-05-17T19:54:44.439574Z",
2+
"updateTime": "2019-05-21T11:29:32.143324Z",
33
"sources": [
44
{
55
"generator": {
66
"name": "artman",
7-
"version": "0.19.0",
8-
"dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e"
7+
"version": "0.20.0",
8+
"dockerImage": "googleapis/artman@sha256:3246adac900f4bdbd62920e80de2e5877380e44036b3feae13667ec255ebf5ec"
99
}
1010
},
1111
{
1212
"git": {
1313
"name": "googleapis",
1414
"remote": "https://github.com/googleapis/googleapis.git",
15-
"sha": "99efb1441b7c2aeb75c69f8baf9b61d4221bb744",
16-
"internalRef": "248724297"
15+
"sha": "32a10f69e2c9ce15bba13ab1ff928bacebb25160",
16+
"internalRef": "249058354"
1717
}
1818
},
1919
{
2020
"template": {
2121
"name": "node_library",
2222
"origin": "synthtool.gcp",
23-
"version": "2019.4.10"
23+
"version": "2019.5.2"
2424
}
2525
}
2626
],

0 commit comments

Comments
 (0)