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

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 3e1880a commit 3989fce
Show file tree
Hide file tree
Showing 21 changed files with 29 additions and 16 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-monitoring/.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-monitoring/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,33 +28,29 @@
],
"scripts": {
"docs": "jsdoc -c .jsdoc.js",
"lint": "gts fix && eslint --fix samples/*.js",
"lint": "gts fix",
"samples-test": "cd samples/ && npm link ../ && npm install && npm test && cd ../",
"system-test": "mocha build/system-test",
"test": "c8 mocha build/test",
"fix": "gts fix && eslint 'samples/**/*.js' --fix",
"fix": "gts fix",
"docs-test": "linkinator docs",
"predocs-test": "npm run docs",
"prelint": "cd samples; npm link ../; npm i",
"prelint": "cd samples; npm link ../; npm install",
"clean": "gts clean",
"compile": "tsc -p . && cp -r protos build/",
"compile-protos": "compileProtos src",
"prepare": "npm run compile"
},
"dependencies": {
"google-gax": "^2.0.1"
"google-gax": "^2.1.0"
},
"devDependencies": {
"@types/mocha": "^7.0.0",
"@types/node": "^12.12.27",
"@types/sinon": "^9.0.0",
"c8": "^7.1.0",
"codecov": "^3.6.5",
"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.5.5",
"jsdoc-fresh": "^1.0.1",
"jsdoc-region-tag": "^1.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ option java_multiple_files = true;
option java_outer_classname = "AlertProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// A description of the conditions under which some aspect of your system is
// considered to be "unhealthy" and the ways to notify people or services about
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option java_multiple_files = true;
option java_outer_classname = "AlertServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// The AlertPolicyService API is used to manage (list, create, delete,
// edit) alert policies in Stackdriver Monitoring. An alerting policy is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ option java_multiple_files = true;
option java_outer_classname = "CommonProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// A single strongly-typed value.
message TypedValue {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ option java_multiple_files = true;
option java_outer_classname = "DroppedLabelsProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// A set of (label, value) pairs which were dropped during aggregation, attached
// to google.api.Distribution.Exemplars in google.api.Distribution values during
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ option java_multiple_files = true;
option java_outer_classname = "GroupProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// The description of a dynamic collection of monitored resources. Each group
// has a filter that is matched against monitored resources and their associated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ option java_multiple_files = true;
option java_outer_classname = "GroupServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// The Group API lets you inspect and manage your
// [groups](#google.monitoring.v3.Group).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ option java_multiple_files = true;
option java_outer_classname = "MetricProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// A single data point in a time series.
message Point {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ option java_multiple_files = true;
option java_outer_classname = "MetricServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";
option (google.api.resource_definition) = {
type: "monitoring.googleapis.com/MetricDescriptor"
pattern: "projects/{project}/metricDescriptors/{metric_descriptor=**}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ option java_multiple_files = true;
option java_outer_classname = "MutationRecordProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// Describes a change made to a configuration.
message MutationRecord {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ option java_multiple_files = true;
option java_outer_classname = "NotificationProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// A description of a notification channel. The descriptor includes
// the properties of the channel and the set of labels or fields that
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ option java_multiple_files = true;
option java_outer_classname = "NotificationServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// The Notification Channel API provides access to configuration that
// controls how messages related to incidents are sent.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ option java_multiple_files = true;
option java_outer_classname = "ServiceMonitoringProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// A `Service` is a discrete, autonomous, and network-accessible unit, designed
// to solve an individual concern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ option java_multiple_files = true;
option java_outer_classname = "ServiceMonitoringServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// The Cloud Monitoring Service-Oriented Monitoring API has endpoints for
// managing and querying aspects of a workspace's services. These include the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ option java_multiple_files = true;
option java_outer_classname = "SpanContextProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// The context of a span, attached to
// [Exemplars][google.api.Distribution.Exemplars]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ option java_multiple_files = true;
option java_outer_classname = "UptimeProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// The regions from which an Uptime check can be run.
enum UptimeCheckRegion {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ option java_multiple_files = true;
option java_outer_classname = "UptimeServiceProto";
option java_package = "com.google.monitoring.v3";
option php_namespace = "Google\\Cloud\\Monitoring\\V3";
option ruby_package = "Google::Cloud::Monitoring::V3";

// The UptimeCheckService API is used to manage (list, create, delete, edit)
// Uptime check configurations in the Stackdriver Monitoring product. An Uptime
Expand Down
2 changes: 2 additions & 0 deletions packages/google-cloud-monitoring/protos/protos.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"java_outer_classname": "UptimeProto",
"java_package": "com.google.monitoring.v3",
"php_namespace": "Google\\Cloud\\Monitoring\\V3",
"ruby_package": "Google::Cloud::Monitoring::V3",
"(google.api.resource_definition).type": "monitoring.googleapis.com/MonitoredResourceDescriptor",
"(google.api.resource_definition).pattern": "*",
"(google.api.resource_definition).history": "ORIGINALLY_SINGLE_PATTERN"
Expand Down Expand Up @@ -4460,6 +4461,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
9 changes: 4 additions & 5 deletions packages/google-cloud-monitoring/synth.metadata
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
{
"updateTime": "2020-04-04T11:35:38.942200Z",
"updateTime": "2020-04-11T01:36:38.708200Z",
"sources": [
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "1346f5c11a0376bc82c5c03259b304de52671518",
"internalRef": "304467075",
"log": "1346f5c11a0376bc82c5c03259b304de52671518\nRefresh public client library for Cloud Monitoring.\nIncrease default ListTimeSeries deadline to 90s.\n\nPiperOrigin-RevId: 304467075\n\n4a6cfccb4a32cb28db7366295d90078c6af3112f\ndocs: Fix link in monitoring summary description.\n\nPiperOrigin-RevId: 304438717\n\n6e2ea9a4b63a264090f1bd4b5b25766a3f634f3a\nfix: add interface name overrides back to logging gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304438432\n\n01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0\nFix: Add package/namespace options for C#, Ruby and PHP in remaining protos.\n\nPiperOrigin-RevId: 304416658\n\nb89abbf12cd3c086abddcd79adb0a653349f960a\nchore(google/maps): Rename nox.py to noxfile.py\n\nupstream wip fix here: https://github.com/googleapis/gapic-generator/pull/3156\n\nPiperOrigin-RevId: 304411146\n\nbbf26d7f11fae7789b13959bf100983c496c9807\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 304409906\n\n"
"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-monitoring/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,5 @@
s.copy(templates)

subprocess.run(["npm", "install"])
subprocess.run(["npm", "run", "fix"])
subprocess.run(["npm", "run", "lint"])
subprocess.run(['npx', 'compileProtos', 'src'])

0 comments on commit 3989fce

Please sign in to comment.