@googlemaps/routing 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.2](https://github.com/googleapis/google-cloud-node/compare/routing-v1.0.1...routing-v1.0.2) (2024-01-23)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * [Many APIs] improve retry logic for streaming API calls ([#4969](https://github.com/googleapis/google-cloud-node/issues/4969)) ([70fe30a](https://github.com/googleapis/google-cloud-node/commit/70fe30af077ab6042822d62d31ca740dd5df55dd))
9
+
10
+ ## [1.0.1](https://github.com/googleapis/google-cloud-node/compare/routing-v1.0.0...routing-v1.0.1) (2023-09-06)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * [Many APIs] simplify logic for HTTP/1.1 REST fallback option ([#4589](https://github.com/googleapis/google-cloud-node/issues/4589)) ([07967ad](https://github.com/googleapis/google-cloud-node/commit/07967add1b5fc28b548cf74721b595ea0ba90d5b))
16
+
3
17
  ## [1.0.0](https://github.com/googleapis/google-cloud-node/compare/routing-v0.6.0...routing-v1.0.0) (2023-08-06)
4
18
 
5
19
 
package/README.md CHANGED
@@ -173,7 +173,7 @@ also contains samples.
173
173
 
174
174
  ## Supported Node.js Versions
175
175
 
176
- Our client libraries follow the [Node.js release schedule](https://nodejs.org/en/about/releases/).
176
+ Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule).
177
177
  Libraries are compatible with all current _active_ and _maintenance_ versions of
178
178
  Node.js.
179
179
  If you are using an end-of-life version of Node.js, we recommend that you update
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,4 +1,4 @@
1
- // Copyright 2023 Google LLC
1
+ // Copyright 2024 Google LLC
2
2
  //
3
3
  // Licensed under the Apache License, Version 2.0 (the "License");
4
4
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2023 Google LLC
2
+ // Copyright 2024 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2023 Google LLC
2
+ // Copyright 2024 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -51,8 +51,7 @@ export declare class RoutesClient {
51
51
  * API remote host.
52
52
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
53
53
  * Follows the structure of {@link gapicConfig}.
54
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
55
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
54
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
56
55
  * For more information, please check the
57
56
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
58
57
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -60,7 +59,7 @@ export declare class RoutesClient {
60
59
  * HTTP implementation. Load only fallback version and pass it to the constructor:
61
60
  * ```
62
61
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
63
- * const client = new RoutesClient({fallback: 'rest'}, gax);
62
+ * const client = new RoutesClient({fallback: true}, gax);
64
63
  * ```
65
64
  */
66
65
  constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- // Copyright 2023 Google LLC
2
+ // Copyright 2024 Google LLC
3
3
  //
4
4
  // Licensed under the Apache License, Version 2.0 (the "License");
5
5
  // you may not use this file except in compliance with the License.
@@ -61,8 +61,7 @@ class RoutesClient {
61
61
  * API remote host.
62
62
  * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
63
63
  * Follows the structure of {@link gapicConfig}.
64
- * @param {boolean | "rest"} [options.fallback] - Use HTTP fallback mode.
65
- * Pass "rest" to use HTTP/1.1 REST API instead of gRPC.
64
+ * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
66
65
  * For more information, please check the
67
66
  * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
68
67
  * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
@@ -70,7 +69,7 @@ class RoutesClient {
70
69
  * HTTP implementation. Load only fallback version and pass it to the constructor:
71
70
  * ```
72
71
  * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
73
- * const client = new RoutesClient({fallback: 'rest'}, gax);
72
+ * const client = new RoutesClient({fallback: true}, gax);
74
73
  * ```
75
74
  */
76
75
  constructor(opts, gaxInstance) {
@@ -127,7 +126,7 @@ class RoutesClient {
127
126
  if (!opts.fallback) {
128
127
  clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`);
129
128
  }
130
- else if (opts.fallback === 'rest') {
129
+ else {
131
130
  clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`);
132
131
  }
133
132
  if (opts.libName && opts.libVersion) {
@@ -138,7 +137,8 @@ class RoutesClient {
138
137
  // Some of the methods on this service provide streaming responses.
139
138
  // Provide descriptors for these.
140
139
  this.descriptors.stream = {
141
- computeRouteMatrix: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, opts.fallback === 'rest'),
140
+ computeRouteMatrix: new this._gaxModule.StreamDescriptor(this._gaxModule.StreamType.SERVER_STREAMING, !!opts.fallback,
141
+ /* gaxStreamingRetries: */ true),
142
142
  };
143
143
  // Put together the default options sent with requests.
144
144
  this._defaults = this._gaxGrpc.constructSettings('google.maps.routing.v2.Routes', gapicConfig, opts.clientConfig || {}, { 'x-goog-api-client': clientHeader.join(' ') });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@googlemaps/routing",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": " client for Node.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -38,7 +38,7 @@
38
38
  "docs-test": "linkinator docs",
39
39
  "fix": "gts fix",
40
40
  "lint": "gts check",
41
- "prepare": "npm run compile-protos && npm run compile",
41
+ "prepare": "npm run compile",
42
42
  "prelint": "cd samples; npm link ../; npm i",
43
43
  "postpack": "minifyProtoJson",
44
44
  "samples-test": "cd samples/ && npm link ../ && npm i && npm test",
@@ -51,18 +51,18 @@
51
51
  "devDependencies": {
52
52
  "@types/mocha": "^9.0.0",
53
53
  "@types/node": "^20.4.5",
54
- "@types/sinon": "^10.0.0",
54
+ "@types/sinon": "^17.0.0",
55
55
  "c8": "^8.0.1",
56
- "gapic-tools": "^0.1.8",
56
+ "gapic-tools": "^0.3.0",
57
57
  "gts": "^5.0.0",
58
58
  "jsdoc": "^4.0.0",
59
- "jsdoc-fresh": "^2.0.0",
60
- "jsdoc-region-tag": "^2.0.0",
59
+ "jsdoc-fresh": "^3.0.0",
60
+ "jsdoc-region-tag": "^3.0.0",
61
61
  "linkinator": "4.1.2",
62
62
  "long": "^5.2.3",
63
63
  "mocha": "^9.2.2",
64
- "pack-n-play": "^1.0.0-2",
65
- "sinon": "^15.0.0",
64
+ "pack-n-play": "^2.0.0",
65
+ "sinon": "^17.0.0",
66
66
  "typescript": "^5.1.6"
67
67
  },
68
68
  "engines": {