@google-cloud/tasks
Advanced tools
Comparing version 5.1.0 to 5.1.1
@@ -20,5 +20,5 @@ // Copyright 2024 Google LLC | ||
import * as gax from 'google-gax'; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import { getJSON } from '../json-helper.cjs'; | ||
// @ts-ignore | ||
@@ -31,5 +31,5 @@ const dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
*/ | ||
const gapicConfig = JSON.parse(fs.readFileSync(path.join(dirname, 'cloud_tasks_client_config.json'), 'utf8')); | ||
const jsonProtos = JSON.parse(fs.readFileSync(path.join(dirname, '..', '..', '..', 'protos/protos.json'), 'utf8')); | ||
const version = JSON.parse(fs.readFileSync(path.join(dirname, '..', '..', '..', '..', 'package.json'), 'utf8')).version; | ||
const gapicConfig = getJSON(path.join(dirname, 'cloud_tasks_client_config.json')); | ||
const jsonProtos = getJSON(path.join(dirname, '..', '..', '..', 'protos/protos.json')); | ||
const version = getJSON(path.join(dirname, '..', '..', '..', '..', 'package.json')).version; | ||
/** | ||
@@ -83,3 +83,3 @@ * Cloud Tasks allows developers to manage the execution of background | ||
constructor(opts, gaxInstance) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e; | ||
this._terminated = false; | ||
@@ -154,8 +154,5 @@ this.descriptors = { | ||
const isEsm = true; | ||
if (opts.libVersion && isEsm) { | ||
clientHeader.push(`${opts.libVersion}-esm`); | ||
if ((opts.libVersion || version) && isEsm) { | ||
clientHeader.push(`${(_e = opts.libVersion) !== null && _e !== void 0 ? _e : version}-esm`); | ||
} | ||
else if (opts.libVersion && !isEsm) { | ||
clientHeader.push(`${opts.libVersion}-cjs`); | ||
} | ||
// Load the applicable protos. | ||
@@ -162,0 +159,0 @@ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); |
@@ -20,5 +20,5 @@ // Copyright 2024 Google LLC | ||
import * as gax from 'google-gax'; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import { getJSON } from '../json-helper.cjs'; | ||
// @ts-ignore | ||
@@ -31,5 +31,5 @@ const dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
*/ | ||
const gapicConfig = JSON.parse(fs.readFileSync(path.join(dirname, 'cloud_tasks_client_config.json'), 'utf8')); | ||
const jsonProtos = JSON.parse(fs.readFileSync(path.join(dirname, '..', '..', '..', 'protos/protos.json'), 'utf8')); | ||
const version = JSON.parse(fs.readFileSync(path.join(dirname, '..', '..', '..', '..', 'package.json'), 'utf8')).version; | ||
const gapicConfig = getJSON(path.join(dirname, 'cloud_tasks_client_config.json')); | ||
const jsonProtos = getJSON(path.join(dirname, '..', '..', '..', 'protos/protos.json')); | ||
const version = getJSON(path.join(dirname, '..', '..', '..', '..', 'package.json')).version; | ||
/** | ||
@@ -83,3 +83,3 @@ * Cloud Tasks allows developers to manage the execution of background | ||
constructor(opts, gaxInstance) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e; | ||
this._terminated = false; | ||
@@ -154,8 +154,5 @@ this.descriptors = { | ||
const isEsm = true; | ||
if (opts.libVersion && isEsm) { | ||
clientHeader.push(`${opts.libVersion}-esm`); | ||
if ((opts.libVersion || version) && isEsm) { | ||
clientHeader.push(`${(_e = opts.libVersion) !== null && _e !== void 0 ? _e : version}-esm`); | ||
} | ||
else if (opts.libVersion && !isEsm) { | ||
clientHeader.push(`${opts.libVersion}-cjs`); | ||
} | ||
// Load the applicable protos. | ||
@@ -162,0 +159,0 @@ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); |
@@ -20,5 +20,5 @@ // Copyright 2024 Google LLC | ||
import * as gax from 'google-gax'; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { fileURLToPath } from 'url'; | ||
import { getJSON } from '../json-helper.cjs'; | ||
// @ts-ignore | ||
@@ -31,5 +31,5 @@ const dirname = path.dirname(fileURLToPath(import.meta.url)); | ||
*/ | ||
const gapicConfig = JSON.parse(fs.readFileSync(path.join(dirname, 'cloud_tasks_client_config.json'), 'utf8')); | ||
const jsonProtos = JSON.parse(fs.readFileSync(path.join(dirname, '..', '..', '..', 'protos/protos.json'), 'utf8')); | ||
const version = JSON.parse(fs.readFileSync(path.join(dirname, '..', '..', '..', '..', 'package.json'), 'utf8')).version; | ||
const gapicConfig = getJSON(path.join(dirname, 'cloud_tasks_client_config.json')); | ||
const jsonProtos = getJSON(path.join(dirname, '..', '..', '..', 'protos/protos.json')); | ||
const version = getJSON(path.join(dirname, '..', '..', '..', '..', 'package.json')).version; | ||
/** | ||
@@ -83,3 +83,3 @@ * Cloud Tasks allows developers to manage the execution of background | ||
constructor(opts, gaxInstance) { | ||
var _a, _b, _c, _d; | ||
var _a, _b, _c, _d, _e; | ||
this._terminated = false; | ||
@@ -154,8 +154,5 @@ this.descriptors = { | ||
const isEsm = true; | ||
if (opts.libVersion && isEsm) { | ||
clientHeader.push(`${opts.libVersion}-esm`); | ||
if ((opts.libVersion || version) && isEsm) { | ||
clientHeader.push(`${(_e = opts.libVersion) !== null && _e !== void 0 ? _e : version}-esm`); | ||
} | ||
else if (opts.libVersion && !isEsm) { | ||
clientHeader.push(`${opts.libVersion}-cjs`); | ||
} | ||
// Load the applicable protos. | ||
@@ -162,0 +159,0 @@ this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); |
@@ -7,2 +7,9 @@ # Changelog | ||
## [5.1.1](https://github.com/googleapis/google-cloud-node/compare/tasks-v5.1.0...tasks-v5.1.1) (2024-02-27) | ||
### Bug Fixes | ||
* [tasks] Add client library version to headers ([#5083](https://github.com/googleapis/google-cloud-node/issues/5083)) ([411e8eb](https://github.com/googleapis/google-cloud-node/commit/411e8eb9d577c92505a1b0e6845b9ece277280e7)) | ||
## [5.1.0](https://github.com/googleapis/google-cloud-node/compare/tasks-v5.0.0...tasks-v5.1.0) (2024-02-09) | ||
@@ -9,0 +16,0 @@ |
{ | ||
"name": "@google-cloud/tasks", | ||
"description": "Cloud Tasks API client for Node.js", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"license": "Apache-2.0", | ||
@@ -25,2 +25,12 @@ "author": "Google LLC", | ||
} | ||
}, | ||
"./build/protos/protos": { | ||
"import": { | ||
"types": "./build/protos/protos/protos.d.ts", | ||
"default": "./build/protos/protos/protos.js" | ||
}, | ||
"require": { | ||
"types": "./build/protos/protos/protos.d.ts", | ||
"default": "./build/protos/protos/protos.cjs" | ||
} | ||
} | ||
@@ -66,3 +76,3 @@ }, | ||
"test": "npm run test:esm && npm run test:cjs", | ||
"compile:esm": "tsc -p ./tsconfig.esm.json", | ||
"compile:esm": "tsc -p ./tsconfig.esm.json && cp -r esm/src/json-helper.cjs build/esm/src/json-helper.cjs", | ||
"babel": "babel esm --out-dir build/cjs --ignore \"esm/**/*.d.ts\" --extensions \".ts\" --out-file-extension .cjs --copy-files", | ||
@@ -84,3 +94,3 @@ "compile:cjs": "tsc -p ./tsconfig.json && npm run babel", | ||
"babel-plugin-replace-import-extension": "^1.1.3", | ||
"c8": "^8.0.1", | ||
"c8": "^9.0.0", | ||
"gapic-tools": "^0.3.0", | ||
@@ -87,0 +97,0 @@ "gts": "5.2.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17151926
102
284261
10