Skip to content

Commit

Permalink
fix(deps): update dependency arrify to v2 (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and JustinBeckwith committed Apr 5, 2019
1 parent 09273f2 commit 8e3b7b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@sindresorhus/is": "^0.15.0",
"@types/duplexify": "^3.6.0",
"@types/long": "^4.0.0",
"arrify": "^1.0.0",
"arrify": "^2.0.0",
"async-each": "^1.0.1",
"extend": "^3.0.1",
"google-auth-library": "^3.0.0",
Expand All @@ -71,7 +71,6 @@
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
"@types/arrify": "^1.0.4",
"@types/execa": "^0.9.0",
"@types/extend": "^3.0.0",
"@types/mocha": "^5.2.5",
Expand Down
4 changes: 2 additions & 2 deletions src/iam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

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

import {google} from '../proto/iam';
Expand Down Expand Up @@ -365,7 +365,7 @@ export class IAM {
return;
}

const availablePermissions = arrify(resp!.permissions);
const availablePermissions = arrify(resp!.permissions!);
const permissionHash: IamPermissionsMap =
(permissions as string[]).reduce((acc, permission) => {
acc[permission] = availablePermissions.indexOf(permission) > -1;
Expand Down
4 changes: 2 additions & 2 deletions src/publisher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

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

Expand Down Expand Up @@ -264,7 +264,7 @@ export class Publisher {
gaxOpts: this.settings!.gaxOpts!,
},
(err, resp) => {
const messageIds = arrify(resp && resp.messageIds);
const messageIds = arrify(resp! && resp!.messageIds!);
each(callbacks, (callback: PublishCallback, next: Function) => {
const messageId = messageIds[callbacks.indexOf(callback)];
callback(err, messageId);
Expand Down
2 changes: 1 addition & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

import * as pjy from '@google-cloud/projectify';
import * as promisify from '@google-cloud/promisify';
import * as arrify from 'arrify';
import arrify = require('arrify');
import * as assert from 'assert';
import * as gax from 'google-gax';
import {CallOptions, ServiceError} from 'grpc';
Expand Down

0 comments on commit 8e3b7b8

Please sign in to comment.