Skip to content

Commit

Permalink
fix(deps): update dependency @google-cloud/common to ^0.32.0 (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
renovate[bot] authored and JustinBeckwith committed Apr 4, 2019
1 parent 26b7c75 commit 6570a11
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 47 deletions.
18 changes: 7 additions & 11 deletions packages/google-cloud-dns/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
"types": "./build/src/index.d.ts",
"files": [
"build/src",
"!build/src/**/*.map",
"AUTHORS",
"CONTRIBUTORS",
"LICENSE"
"!build/src/**/*.map"
],
"keywords": [
"google apis client",
Expand Down Expand Up @@ -46,14 +43,13 @@
"predocs-test": "npm run docs"
},
"dependencies": {
"@google-cloud/common": "^0.31.0",
"@google-cloud/common": "^0.32.0",
"@google-cloud/paginator": "^0.2.0",
"@google-cloud/promisify": "^0.4.0",
"arrify": "^1.0.1",
"dns-zonefile": "0.2.2",
"lodash.groupby": "^4.6.0",
"string-format-obj": "^1.1.1",
"teeny-request": "^3.6.0"
"string-format-obj": "^1.1.1"
},
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "^3.0.0",
Expand All @@ -62,7 +58,7 @@
"@types/mocha": "^5.2.5",
"@types/node": "^10.9.4",
"@types/proxyquire": "^1.3.28",
"@types/request": "^2.47.1",
"@types/request": "^2.48.1",
"@types/tmp": "0.1.0",
"@types/uuid": "^3.4.4",
"codecov": "^3.0.2",
Expand All @@ -71,17 +67,17 @@
"eslint-plugin-node": "^8.0.0",
"eslint-plugin-prettier": "^3.0.0",
"gts": "^0.9.0",
"jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git",
"intelli-espower-loader": "^1.0.1",
"jsdoc": "^3.5.5",
"jsdoc-baseline": "git+https://github.com/hegemonic/jsdoc-baseline.git",
"linkinator": "^1.1.2",
"mocha": "^6.0.0",
"nyc": "^13.0.0",
"power-assert": "^1.5.0",
"prettier": "^1.13.5",
"proxyquire": "^2.0.1",
"tmp": "^0.1.0",
"typescript": "~3.4.0",
"uuid": "^3.2.1",
"linkinator": "^1.1.2"
"uuid": "^3.2.1"
}
}
11 changes: 4 additions & 7 deletions packages/google-cloud-dns/src/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,8 @@
* limitations under the License.
*/

import {ServiceObject} from '@google-cloud/common';
import {Metadata, ServiceObject} from '@google-cloud/common';
import {promisifyAll} from '@google-cloud/promisify';
import * as r from 'request';
import {teenyRequest} from 'teeny-request';

import {Record} from './record';
import {Zone} from './zone';
Expand All @@ -27,10 +25,10 @@ export interface CreateChangeRequest {
delete?: Record|Record[];
}

export type CreateChangeResponse = [Change, r.Response];
export type CreateChangeResponse = [Change, Metadata];

export interface CreateChangeCallback {
(err: Error|null, change?: Change|null, apiResponse?: r.Response): void;
(err: Error|null, change?: Change|null, apiResponse?: Metadata): void;
}

/**
Expand Down Expand Up @@ -193,8 +191,7 @@ export class Change extends ServiceObject {
* @type {string}
*/
id,
methods,
requestModule: teenyRequest as typeof r,
methods
});
}

Expand Down
15 changes: 6 additions & 9 deletions packages/google-cloud-dns/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@
* limitations under the License.
*/

import {GoogleAuthOptions, Service} from '@google-cloud/common';
import {GoogleAuthOptions, Metadata, Service} from '@google-cloud/common';
import {paginator} from '@google-cloud/paginator';
import {promisifyAll} from '@google-cloud/promisify';
import * as arrify from 'arrify';
import * as r from 'request';
import {Stream} from 'stream';
import {teenyRequest} from 'teeny-request';

import {Zone} from './zone';

Expand All @@ -40,13 +38,13 @@ export interface DNSConfig extends GoogleAuthOptions {

export interface GetZonesCallback {
(err: Error|null, zones: Zone[]|null, nextQuery?: GetZonesRequest|null,
apiResponse?: r.Response): void;
apiResponse?: Metadata): void;
}

export type GetZonesResponse = [Zone[], GetZonesRequest | null, r.Response];
export type GetZonesResponse = [Zone[], GetZonesRequest | null, Metadata];

export interface GetZoneCallback {
(err: Error|null, zone?: Zone|null, apiResponse?: r.Response): void;
(err: Error|null, zone?: Zone|null, apiResponse?: Metadata): void;
}

export interface CreateZoneRequest {
Expand All @@ -55,7 +53,7 @@ export interface CreateZoneRequest {
name?: string;
}

export type CreateZoneResponse = [Zone, r.Response];
export type CreateZoneResponse = [Zone, Metadata];

/**
* @typedef {object} ClientConfig
Expand Down Expand Up @@ -124,8 +122,7 @@ class DNS extends Service {
'https://www.googleapis.com/auth/ndev.clouddns.readwrite',
'https://www.googleapis.com/auth/cloud-platform',
],
packageJson: require('../../package.json'),
requestModule: teenyRequest as typeof r,
packageJson: require('../../package.json')
};
super(config, options);

Expand Down
26 changes: 12 additions & 14 deletions packages/google-cloud-dns/src/zone.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,21 @@
* limitations under the License.
*/

import {DeleteCallback, GetConfig, ServiceObject} from '@google-cloud/common';
import {DeleteCallback, GetConfig, Metadata, ServiceObject} from '@google-cloud/common';
import {paginator} from '@google-cloud/paginator';
import {promisifyAll} from '@google-cloud/promisify';
import * as arrify from 'arrify';
import * as fs from 'fs';

import groupBy = require('lodash.groupby');
import {teenyRequest} from 'teeny-request';
const zonefile = require('dns-zonefile');

import {Change, CreateChangeCallback, CreateChangeRequest} from './change';
import {Record, RecordMetadata, RecordObject} from './record';
import {DNS, CreateZoneRequest} from '.';
import * as r from 'request';
import {Readable} from 'stream';
import {GetResponse, InstanceResponseCallback} from '@google-cloud/common/build/src/service-object';
import {InstanceResponseCallback} from '@google-cloud/common';
import {GetResponse} from '@google-cloud/common/build/src/service-object';

/**
* Config to set for the change.
Expand All @@ -50,7 +49,7 @@ export interface CreateChangeRequest {
* @property {Change} 0 A {@link Change} object.
* @property {object} 1 The full API response.
*/
export type CreateChangeResponse = [Change, r.Response];
export type CreateChangeResponse = [Change, Metadata];

/**
* @callback CreateChangeCallback
Expand All @@ -59,14 +58,14 @@ export type CreateChangeResponse = [Change, r.Response];
* @param {object} apiResponse The full API response.
*/
export interface CreateChangeCallback {
(err: Error|null, change?: Change, apiResponse?: r.Response): void;
(err: Error|null, change?: Change, apiResponse?: Metadata): void;
}

/**
* @typedef {array} DeleteZoneResponse
* @property {object} 0 The full API response.
*/
export type DeleteZoneResponse = [r.Response];
export type DeleteZoneResponse = [Metadata];

/**
* @callback DeleteZoneCallback
Expand All @@ -81,10 +80,10 @@ export interface DeleteZoneConfig {

export interface GetRecordsCallback {
(err: Error|null, records?: Record[]|null, nextQuery?: {}|null,
apiResponse?: r.Response): void;
apiResponse?: Metadata): void;
}

export type GetRecordsResponse = [Record[], r.Response];
export type GetRecordsResponse = [Record[], Metadata];

export interface GetRecordsRequest {
autoPaginate?: boolean;
Expand Down Expand Up @@ -125,7 +124,7 @@ export interface GetChangesRequest {
* @property {Change[]} 0 Array of {@link Change} instances.
* @property {object} 1 The full API response.
*/
export type GetChangesResponse = [Change[], r.Response];
export type GetChangesResponse = [Change[], Metadata];

/**
* @callback GetChangesCallback
Expand All @@ -136,14 +135,14 @@ export type GetChangesResponse = [Change[], r.Response];

export interface GetChangesCallback {
(err: Error|null, changes?: Change[]|null, nextQuery?: {}|null,
apiResponse?: r.Response): void;
apiResponse?: Metadata): void;
}

/**
* @typedef {array} ZoneExportResponse
* @property {object} 0 The full API response.
*/
export type ZoneExportResponse = [r.Response];
export type ZoneExportResponse = [Metadata];

/**
* @callback ZoneExportCallback
Expand Down Expand Up @@ -335,8 +334,7 @@ class Zone extends ServiceObject<Zone> {
*/
id: name,
createMethod: dns.createZone.bind(dns),
methods,
requestModule: teenyRequest as typeof r,
methods
});
/**
* @name Zone#name
Expand Down
3 changes: 1 addition & 2 deletions packages/google-cloud-dns/system-test/dns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

import * as assert from 'assert';
import * as fs from 'fs';
import {Response} from 'request';
import * as tmp from 'tmp';
import * as util from 'util';
import * as uuid from 'uuid';
Expand Down Expand Up @@ -276,7 +275,7 @@ describe('dns', () => {
assert.ifError(err);
const onRecordsReceived =
(err?: Error|null, records?: Record[]|null, nextQuery?: {}|null,
apiResponse?: Response) => {
apiResponse?: Metadata) => {
if (nextQuery) {
ZONE.getRecords(nextQuery, onRecordsReceived);
return;
Expand Down
7 changes: 3 additions & 4 deletions packages/google-cloud-dns/test/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,10 @@
* limitations under the License.
*/

import {ServiceObject, ServiceObjectConfig} from '@google-cloud/common';
import {Metadata, ServiceObject, ServiceObjectConfig} from '@google-cloud/common';
import * as promisify from '@google-cloud/promisify';
import * as assert from 'assert';
import * as proxyquire from 'proxyquire';
import {Response} from 'request';

import {Change} from '../src/change';

Expand Down Expand Up @@ -110,7 +109,7 @@ describe('Change', () => {

it('should execute callback with error & apiResponse', done => {
change.create(
{}, (err: Error, change: Change, apiResponse_: Response) => {
{}, (err: Error, change: Change, apiResponse_: Metadata) => {
assert.strictEqual(err, error);
assert.strictEqual(change, null);
assert.strictEqual(apiResponse_, apiResponse);
Expand All @@ -134,7 +133,7 @@ describe('Change', () => {

it('should execute callback with self & API response', done => {
change.create(
{}, (err: Error, change_: Change, apiResponse_: Response) => {
{}, (err: Error, change_: Change, apiResponse_: Metadata) => {
assert.ifError(err);
assert.strictEqual(change_, change);
assert.strictEqual(apiResponse_, apiResponse);
Expand Down

0 comments on commit 6570a11

Please sign in to comment.