Skip to content

Commit 8e3b7b8

Browse files
renovate[bot]JustinBeckwith
authored andcommitted
fix(deps): update dependency arrify to v2 (#565)
1 parent 09273f2 commit 8e3b7b8

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"@sindresorhus/is": "^0.15.0",
5959
"@types/duplexify": "^3.6.0",
6060
"@types/long": "^4.0.0",
61-
"arrify": "^1.0.0",
61+
"arrify": "^2.0.0",
6262
"async-each": "^1.0.1",
6363
"extend": "^3.0.1",
6464
"google-auth-library": "^3.0.0",
@@ -71,7 +71,6 @@
7171
},
7272
"devDependencies": {
7373
"@google-cloud/nodejs-repo-tools": "^3.0.0",
74-
"@types/arrify": "^1.0.4",
7574
"@types/execa": "^0.9.0",
7675
"@types/extend": "^3.0.0",
7776
"@types/mocha": "^5.2.5",

src/iam.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*/
2020

2121
import {promisifyAll} from '@google-cloud/promisify';
22-
import * as arrify from 'arrify';
22+
import arrify = require('arrify');
2323
import {CallOptions} from 'google-gax';
2424

2525
import {google} from '../proto/iam';
@@ -365,7 +365,7 @@ export class IAM {
365365
return;
366366
}
367367

368-
const availablePermissions = arrify(resp!.permissions);
368+
const availablePermissions = arrify(resp!.permissions!);
369369
const permissionHash: IamPermissionsMap =
370370
(permissions as string[]).reduce((acc, permission) => {
371371
acc[permission] = availablePermissions.indexOf(permission) > -1;

src/publisher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
import {promisifyAll} from '@google-cloud/promisify';
18-
import * as arrify from 'arrify';
18+
import arrify = require('arrify');
1919
import {CallOptions} from 'google-gax';
2020
import {google} from '../proto/pubsub';
2121

@@ -264,7 +264,7 @@ export class Publisher {
264264
gaxOpts: this.settings!.gaxOpts!,
265265
},
266266
(err, resp) => {
267-
const messageIds = arrify(resp && resp.messageIds);
267+
const messageIds = arrify(resp! && resp!.messageIds!);
268268
each(callbacks, (callback: PublishCallback, next: Function) => {
269269
const messageId = messageIds[callbacks.indexOf(callback)];
270270
callback(err, messageId);

test/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
import * as pjy from '@google-cloud/projectify';
1818
import * as promisify from '@google-cloud/promisify';
19-
import * as arrify from 'arrify';
19+
import arrify = require('arrify');
2020
import * as assert from 'assert';
2121
import * as gax from 'google-gax';
2222
import {CallOptions, ServiceError} from 'grpc';

0 commit comments

Comments
 (0)