Skip to content

Commit

Permalink
fix: remove eslint, update gax, fix generated protos, run the generat…
Browse files Browse the repository at this point in the history
…or (#400)

Run the latest version of the generator, update google-gax, update gts, and remove direct dependencies on eslint.
  • Loading branch information
alexander-fenster authored Apr 11, 2020
1 parent ad1f101 commit 24b78e2
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 80 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-tasks/.jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2019 Google, LLC.',
copyright: 'Copyright 2020 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/tasks',
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-tasks/.prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
12 changes: 4 additions & 8 deletions packages/google-cloud-tasks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"test": "c8 mocha build/test",
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
"system-test": "mocha build/system-test",
"lint": "gts fix && eslint --fix samples/*.js",
"lint": "gts fix",
"fix": "gts fix",
"docs": "jsdoc -c .jsdoc.js",
"docs-test": "linkinator docs",
Expand All @@ -41,22 +41,18 @@
"compile-protos": "compileProtos src",
"predocs-test": "npm run docs",
"prepare": "npm run compile",
"prelint": "cd samples; npm link ../; npm i"
"prelint": "cd samples; npm link ../; npm install"
},
"dependencies": {
"google-gax": "^2.0.1"
"google-gax": "^2.1.0"
},
"devDependencies": {
"@types/mocha": "^7.0.0",
"@types/node": "^12.0.0",
"@types/sinon": "^9.0.0",
"c8": "^6.0.0",
"codecov": "^3.0.2",
"eslint": "^6.0.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.0.0",
"gts": "2.0.0",
"gts": "^2.0.0",
"jsdoc": "^3.6.2",
"jsdoc-fresh": "^1.0.2",
"jsdoc-region-tag": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-tasks/protos/protos.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots._google_cloud_tasks_1_9_0_protos || ($protobuf.roots._google_cloud_tasks_1_9_0_protos = {});
var $root = $protobuf.roots._google_cloud_tasks_2_0_0_protos || ($protobuf.roots._google_cloud_tasks_2_0_0_protos = {});

$root.google = (function() {

Expand Down
1 change: 1 addition & 0 deletions packages/google-cloud-tasks/protos/protos.json
Original file line number Diff line number Diff line change
Expand Up @@ -3371,6 +3371,7 @@
},
"rpc": {
"options": {
"cc_enable_arenas": true,
"go_package": "google.golang.org/genproto/googleapis/rpc/status;status",
"java_multiple_files": true,
"java_outer_classname": "StatusProto",
Expand Down
8 changes: 4 additions & 4 deletions packages/google-cloud-tasks/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2020-04-03T12:16:51.870175Z",
"updateTime": "2020-04-11T01:45:48.684943Z",
"sources": [
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "3d5d228a58bdf875e6147b228db3159010c735ee",
"internalRef": "304500143"
"sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8",
"internalRef": "305974465"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "99820243d348191bc9c634f2b48ddf65096285ed"
"sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-tasks/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@

# Node.js specific cleanup
subprocess.run(["npm", "install"])
subprocess.run(["npm", "run", "fix"])
subprocess.run(["npm", "run", "lint"])
subprocess.run(['npx', 'compileProtos', 'src'])
40 changes: 20 additions & 20 deletions packages/google-cloud-tasks/test/gapic_cloud_tasks_v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ describe('v2.CloudTasksClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.getQueue = stubSimpleCall(undefined, expectedError);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.getQueue(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -408,7 +408,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.createQueue(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -525,7 +525,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.updateQueue(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -639,7 +639,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.deleteQueue(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -753,7 +753,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.purgeQueue(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -867,7 +867,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.pauseQueue(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -981,7 +981,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.resumeQueue(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1095,7 +1095,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.getIamPolicy(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1209,7 +1209,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.setIamPolicy(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1325,7 +1325,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.testIamPermissions(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1436,7 +1436,7 @@ describe('v2.CloudTasksClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.getTask = stubSimpleCall(undefined, expectedError);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.getTask(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1550,7 +1550,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.createTask(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1664,7 +1664,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.deleteTask(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1775,7 +1775,7 @@ describe('v2.CloudTasksClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.runTask = stubSimpleCall(undefined, expectedError);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.runTask(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1893,7 +1893,7 @@ describe('v2.CloudTasksClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.listQueues(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1979,7 +1979,7 @@ describe('v2.CloudTasksClient', () => {
reject(err);
});
});
assert.rejects(async () => {
await assert.rejects(async () => {
await promise;
}, expectedError);
assert(
Expand Down Expand Up @@ -2051,7 +2051,7 @@ describe('v2.CloudTasksClient', () => {
expectedError
);
const iterable = client.listQueuesAsync(request);
assert.rejects(async () => {
await assert.rejects(async () => {
const responses: protos.google.cloud.tasks.v2.IQueue[] = [];
for await (const resource of iterable) {
responses.push(resource!);
Expand Down Expand Up @@ -2176,7 +2176,7 @@ describe('v2.CloudTasksClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.listTasks = stubSimpleCall(undefined, expectedError);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.listTasks(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -2261,7 +2261,7 @@ describe('v2.CloudTasksClient', () => {
reject(err);
});
});
assert.rejects(async () => {
await assert.rejects(async () => {
await promise;
}, expectedError);
assert(
Expand Down Expand Up @@ -2330,7 +2330,7 @@ describe('v2.CloudTasksClient', () => {
expectedError
);
const iterable = client.listTasksAsync(request);
assert.rejects(async () => {
await assert.rejects(async () => {
const responses: protos.google.cloud.tasks.v2.ITask[] = [];
for await (const resource of iterable) {
responses.push(resource!);
Expand Down
Loading

0 comments on commit 24b78e2

Please sign in to comment.