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 (#68)

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 3b7c0eb commit 257b30f
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/google-monitoring-dashboard/.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/monitoring-dashboards',
Expand Down
2 changes: 1 addition & 1 deletion packages/google-monitoring-dashboard/.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
14 changes: 5 additions & 9 deletions packages/google-monitoring-dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,24 @@
"compile-protos": "compileProtos src",
"docs": "jsdoc -c .jsdoc.js",
"docs-test": "linkinator docs",
"fix": "gts fix && eslint samples --fix",
"lint": "gts check && eslint samples",
"fix": "gts fix",
"lint": "gts fix",
"predocs-test": "npm run docs",
"prepare": "npm run compile-protos && npm run compile",
"system-test": "c8 mocha build/system-test",
"test": "c8 mocha build/test",
"samples-test": "cd samples/ && npm link ../ && npm test && cd ../",
"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": "^7.0.0",
"eslint": "^6.8.0",
"eslint-config-prettier": "^6.9.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.1.2",
"gts": "2.0.0",
"gts": "^2.0.0",
"jsdoc": "^3.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
Expand Down
13 changes: 3 additions & 10 deletions packages/google-monitoring-dashboard/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,12 @@
{
"updateTime": "2020-04-03T11:56:37.405558Z",
"updateTime": "2020-04-11T00:36:02.116747Z",
"sources": [
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "3d5d228a58bdf875e6147b228db3159010c735ee",
"internalRef": "304500143"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "99820243d348191bc9c634f2b48ddf65096285ed"
"sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5",
"log": "6f32150677c9784f3c3a7e1949472bd29c9d72c5\nfix: installs test_utils from its common repo (#480)\n\n\n74ce986d3b5431eb66985e9a00c4eb45295a4020\nfix: stop recording update_time in synth.metadata (#478)\n\n\n7f8e62aa3edd225f76347a16f92e400661fdfb52\nchore(java): release-please only updates non maven versions in README (#476)\n\nPrevent release-please and synthtool from fighting over the released library version. Synthtool updates the install snippets from the samples pom.xml files so the bots fight if they are temporarily out of sync after a release.\nc7e0e517d7f46f77bebd27da2e5afcaa6eee7e25\nbuild(java): fix nightly integration test config to run integrations (#465)\n\nThis was only running the units.\nbd69a2aa7b70875f3c988e269706b22fefbef40e\nbuild(java): fix retry_with_backoff when -e option set (#475)\n\n\nd9b173c427bfa0c6cca818233562e7e8841a357c\nfix: record version of working repo in synth.metadata (#473)\n\nPartial revert of b37cf74d12e9a42b9de9e61a4f26133d7cd9c168.\nf73a541770d95a609e5be6bf6b3b220d17cefcbe\nfeat(discogapic): allow local discovery-artifact-manager (#474)\n\n\n8cf0f5d93a70c3dcb0b4999d3152c46d4d9264bf\ndoc: describe the Autosynth & Synthtool protocol (#472)\n\n* doc: describe the Autosynth & Synthtool protocol\n\n* Accommodate review comments.\n980baaa738a1ad8fa02b4fdbd56be075ee77ece5\nfix: pin sphinx to <3.0.0 as new version causes new error (#471)\n\nThe error `toctree contains reference to document changlelog that doesn't have a title: no link will be generated` occurs as of 3.0.0. Pinning to 2.x until we address the docs build issue.\n\nTowards #470\n\nI did this manually for python-datastore https://github.com/googleapis/python-datastore/pull/22\n928b2998ac5023e7c7e254ab935f9ef022455aad\nchore(deps): update dependency com.google.cloud.samples:shared-configuration to v1.0.15 (#466)\n\nCo-authored-by: Jeffrey Rennie <rennie@google.com>\n188f1b1d53181f739b98f8aa5d40cfe99eb90c47\nfix: allow local and external deps to be specified (#469)\n\nModify noxfile.py to allow local and external dependencies for\nsystem tests to be specified.\n1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie <rennie@google.com>\n"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion packages/google-monitoring-dashboard/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@

# Node.js specific cleanup
subprocess.run(['npm', 'install'])
subprocess.run(['npm', 'run', 'fix'])
subprocess.run(['npm', 'run', 'lint'])
subprocess.run(['npx', 'compileProtos', 'src'])

Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ describe('v1.DashboardsServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.createDashboard(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -413,7 +413,7 @@ describe('v1.DashboardsServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.getDashboard(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -527,7 +527,7 @@ describe('v1.DashboardsServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.deleteDashboard(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -644,7 +644,7 @@ describe('v1.DashboardsServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.updateDashboard(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -774,7 +774,7 @@ describe('v1.DashboardsServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.listDashboards(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -873,7 +873,7 @@ describe('v1.DashboardsServiceClient', () => {
reject(err);
});
});
assert.rejects(async () => {
await assert.rejects(async () => {
await promise;
}, expectedError);
assert(
Expand Down Expand Up @@ -952,7 +952,7 @@ describe('v1.DashboardsServiceClient', () => {
expectedError
);
const iterable = client.listDashboardsAsync(request);
assert.rejects(async () => {
await assert.rejects(async () => {
const responses: protos.google.monitoring.dashboard.v1.IDashboard[] = [];
for await (const resource of iterable) {
responses.push(resource!);
Expand Down

0 comments on commit 257b30f

Please sign in to comment.