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

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 8cf2fc6 commit 30a1fe8
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 55 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-secretmanager/.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/secret-manager',
Expand Down
2 changes: 1 addition & 1 deletion packages/google-cloud-secretmanager/.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-cloud-secretmanager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,23 @@
"docs": "jsdoc -c .jsdoc.js",
"predocs-test": "npm run docs",
"docs-test": "linkinator docs",
"fix": "gts fix && eslint samples --fix",
"lint": "gts check && eslint samples",
"fix": "gts fix",
"lint": "gts fix",
"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.0.0",
"eslint-config-prettier": "^6.0.0",
"eslint-plugin-node": "^11.0.0",
"eslint-plugin-prettier": "^3.0.1",
"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
2 changes: 1 addition & 1 deletion packages/google-cloud-secretmanager/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["default"] || ($protobuf.roots["default"] = {});
var $root = $protobuf.roots._google_cloud_secret_manager_3_0_0_protos || ($protobuf.roots._google_cloud_secret_manager_3_0_0_protos = {});

$root.google = (function() {

Expand Down
8 changes: 4 additions & 4 deletions packages/google-cloud-secretmanager/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"updateTime": "2020-04-02T11:53:11.069823Z",
"updateTime": "2020-04-11T01:32:49.702958Z",
"sources": [
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "75047719f704d61f405cac6d7439637ab36c1232",
"internalRef": "304305096"
"sha": "1bd77e8ce6f953ac641af7966d0c52646afc16a8",
"internalRef": "305974465"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "99820243d348191bc9c634f2b48ddf65096285ed"
"sha": "6f32150677c9784f3c3a7e1949472bd29c9d72c5"
}
}
],
Expand Down
3 changes: 2 additions & 1 deletion packages/google-cloud-secretmanager/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@

# 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 @@ -315,7 +315,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.createSecret(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -435,7 +435,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.addSecretVersion(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -552,7 +552,7 @@ describe('v1.SecretManagerServiceClient', () => {
};
const expectedError = new Error('expected');
client.innerApiCalls.getSecret = stubSimpleCall(undefined, expectedError);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.getSecret(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -675,7 +675,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.updateSecret(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -795,7 +795,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.deleteSecret(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -915,7 +915,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.getSecretVersion(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1037,7 +1037,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.accessSecretVersion(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1159,7 +1159,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.disableSecretVersion(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1281,7 +1281,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.enableSecretVersion(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1403,7 +1403,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.destroySecretVersion(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1523,7 +1523,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.setIamPolicy(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1643,7 +1643,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.getIamPolicy(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1765,7 +1765,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.testIamPermissions(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -1901,7 +1901,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.listSecrets(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -2003,7 +2003,7 @@ describe('v1.SecretManagerServiceClient', () => {
reject(err);
});
});
assert.rejects(async () => {
await assert.rejects(async () => {
await promise;
}, expectedError);
assert(
Expand Down Expand Up @@ -2085,7 +2085,7 @@ describe('v1.SecretManagerServiceClient', () => {
expectedError
);
const iterable = client.listSecretsAsync(request);
assert.rejects(async () => {
await assert.rejects(async () => {
const responses: protos.google.cloud.secretmanager.v1.ISecret[] = [];
for await (const resource of iterable) {
responses.push(resource!);
Expand Down Expand Up @@ -2235,7 +2235,7 @@ describe('v1.SecretManagerServiceClient', () => {
undefined,
expectedError
);
assert.rejects(async () => {
await assert.rejects(async () => {
await client.listSecretVersions(request);
}, expectedError);
assert(
Expand Down Expand Up @@ -2338,7 +2338,7 @@ describe('v1.SecretManagerServiceClient', () => {
reject(err);
});
});
assert.rejects(async () => {
await assert.rejects(async () => {
await promise;
}, expectedError);
assert(
Expand Down Expand Up @@ -2421,7 +2421,7 @@ describe('v1.SecretManagerServiceClient', () => {
expectedError
);
const iterable = client.listSecretVersionsAsync(request);
assert.rejects(async () => {
await assert.rejects(async () => {
const responses: protos.google.cloud.secretmanager.v1.ISecretVersion[] = [];
for await (const resource of iterable) {
responses.push(resource!);
Expand Down
Loading

0 comments on commit 30a1fe8

Please sign in to comment.