From 734147606238afd64774c36f1961d50be6d47aaa Mon Sep 17 00:00:00 2001 From: sofisl <55454395+sofisl@users.noreply.github.com> Date: Thu, 19 May 2022 17:12:59 -0700 Subject: [PATCH] build!: update library to use Node 12 (#524) * build!: Update library to use Node 12 Co-authored-by: Summer Ji Co-authored-by: Owl Bot --- packages/google-cloud-dns/package.json | 6 +++--- packages/google-cloud-dns/samples/package.json | 4 ++-- packages/google-cloud-dns/test/record.ts | 9 +++++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/packages/google-cloud-dns/package.json b/packages/google-cloud-dns/package.json index 26a5e5d3b19..6372326d342 100644 --- a/packages/google-cloud-dns/package.json +++ b/packages/google-cloud-dns/package.json @@ -5,7 +5,7 @@ "license": "Apache-2.0", "author": "Google Inc.", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "repository": "googleapis/nodejs-dns", "main": "./build/src/index.js", @@ -67,10 +67,10 @@ "jsdoc-fresh": "^1.0.1", "jsdoc-region-tag": "^1.0.2", "linkinator": "^2.0.0", - "mocha": "^8.0.0", + "mocha": "^9.2.2", "proxyquire": "^2.0.1", "tmp": "^0.2.0", - "typescript": "^3.8.3", + "typescript": "^4.6.4", "uuid": "^8.0.0" } } diff --git a/packages/google-cloud-dns/samples/package.json b/packages/google-cloud-dns/samples/package.json index 26e59296a07..03d55a4fcb1 100644 --- a/packages/google-cloud-dns/samples/package.json +++ b/packages/google-cloud-dns/samples/package.json @@ -5,7 +5,7 @@ "author": "Google Inc.", "repository": "googleapis/nodejs-dns", "engines": { - "node": ">=10" + "node": ">=12.0.0" }, "files": [ "*.js", @@ -22,4 +22,4 @@ "mocha": "^8.0.0", "uuid": "^8.0.0" } -} +} \ No newline at end of file diff --git a/packages/google-cloud-dns/test/record.ts b/packages/google-cloud-dns/test/record.ts index d0ab9048acb..23125baa24c 100644 --- a/packages/google-cloud-dns/test/record.ts +++ b/packages/google-cloud-dns/test/record.ts @@ -20,6 +20,11 @@ import * as proxyquire from 'proxyquire'; // eslint-disable-next-line @typescript-eslint/no-unused-vars import {Record} from '../src'; +interface Metadata { + name: string; + data?: string[]; + ttl: number; +} let promisified = false; const fakePromisify = Object.assign({}, promisify, { promisifyAll(esClass: Function, options: promisify.PromisifyAllOptions) { @@ -292,7 +297,7 @@ describe('Record', () => { }); describe('delete', () => { - it('should call zone.deleteRecords', done => { + it('should call zone.deleteRecords', (done: any) => { record.zone_.deleteRecords = (records: Record[], callback: Function) => { assert.strictEqual(records, record); callback(); @@ -303,7 +308,7 @@ describe('Record', () => { describe('toJSON', () => { it('should format the data for the API', () => { - const expectedRecord = Object.assign({}, METADATA, { + const expectedRecord: Metadata = Object.assign({}, METADATA, { type: 'A', rrdatas: METADATA.data, });