Skip to content

Commit 203e9ca

Browse files
committed
fix(deps): remove vulnerable dependency uuid
1 parent 7c62c7d commit 203e9ca

77 files changed

Lines changed: 117 additions & 196 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

core/packages/teeny-request/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
"@types/mocha": "^10.0.10",
5353
"@types/node-fetch": "^2.6.12",
5454
"@types/sinon": "^17.0.3",
55-
"@types/uuid": "^10.0.0",
5655
"c8": "^10.1.3",
5756
"codecov": "^3.8.3",
5857
"gts": "^6.0.2",

core/paginator/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"@types/node": "^22.13.8",
4040
"@types/proxyquire": "^1.3.31",
4141
"@types/sinon": "^17.0.4",
42-
"@types/uuid": "^10.0.0",
4342
"c8": "^10.1.3",
4443
"codecov": "^3.8.3",
4544
"gts": "^6.0.2",
@@ -51,8 +50,7 @@
5150
"path-to-regexp": "^8.2.0",
5251
"proxyquire": "^2.1.3",
5352
"sinon": "^19.0.2",
54-
"typescript": "^5.8.2",
55-
"uuid": "^11.1.0"
53+
"typescript": "^5.8.2"
5654
},
5755
"dependencies": {
5856
"extend": "^3.0.2"

core/paginator/test/index.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {describe, it, beforeEach, afterEach} from 'mocha';
1717
import * as proxyquire from 'proxyquire';
1818
import * as sinon from 'sinon';
1919
import {PassThrough, Transform} from 'stream';
20-
import * as uuid from 'uuid';
2120
import * as P from '../src';
2221
import {paginator, ParsedArguments} from '../src';
2322

@@ -53,7 +52,7 @@ function createFakeStream<T = any>() {
5352
}
5453

5554
describe('paginator', () => {
56-
const UUID = uuid.v1();
55+
const UUID = crypto.randomUUID();
5756
function FakeClass() {
5857
// do nothing
5958
}
@@ -124,7 +123,7 @@ describe('paginator', () => {
124123

125124
/* eslint-disable @typescript-eslint/no-explicit-any */
126125
const cls = new (FakeClass as any)();
127-
cls.uuid = uuid.v1();
126+
cls.uuid = crypto.randomUUID();
128127

129128
sandbox.stub(paginator, 'run_').callsFake((_, originalMethod) => {
130129
assert.strictEqual(originalMethod(), cls.uuid);

handwritten/bigquery-storage/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@
4949
"@types/mocha": "^10.0.10",
5050
"@types/node": "^22.13.14",
5151
"@types/sinon": "^21.0.0",
52-
"@types/uuid": "^10.0.0",
5352
"avsc": "^5.7.9",
5453
"c8": "^10.1.3",
5554
"gapic-tools": "^1.0.1",
@@ -66,7 +65,6 @@
6665
"sinon": "21.0.3",
6766
"ts-loader": "^9.5.2",
6867
"typescript": "^5.8.2",
69-
"uuid": "^11.1.0",
7068
"webpack": "^5.98.0",
7169
"webpack-cli": "^6.0.1"
7270
},

handwritten/bigquery-storage/system-test/managed_writer_client_test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import * as assert from 'assert';
1616
import {readFileSync} from 'fs';
1717
import * as path from 'path';
1818
import {describe, it} from 'mocha';
19-
import * as uuid from 'uuid';
2019
import * as gax from 'google-gax';
2120
import * as sinon from 'sinon';
2221
import {BigQuery, TableSchema} from '@google-cloud/bigquery';
@@ -59,7 +58,7 @@ const FieldDescriptorProtoType =
5958
const GCLOUD_TESTS_PREFIX = 'nodejs_bqstorage_system_test';
6059
const bigquery = new BigQuery();
6160
const generateUuid = () =>
62-
`${GCLOUD_TESTS_PREFIX}_${uuid.v4()}`.replace(/-/gi, '_');
61+
`${GCLOUD_TESTS_PREFIX}_${crypto.randomUUID()}`.replace(/-/gi, '_');
6362
const datasetId = generateUuid();
6463

6564
const sleep = (ms: number) =>

handwritten/bigquery-storage/system-test/reader_client_test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import * as assert from 'assert';
1616
import {describe, it} from 'mocha';
1717
import * as gax from 'google-gax';
18-
import * as uuid from 'uuid';
1918
import * as sinon from 'sinon';
2019
import {BigQuery, TableRow, TableSchema} from '@google-cloud/bigquery';
2120
import * as protos from '../protos/protos';
@@ -46,7 +45,7 @@ if (process.env.NODE_ENV === 'DEBUG') {
4645
const GCLOUD_TESTS_PREFIX = 'nodejs_bqstorage_system_test';
4746
const bigquery = new BigQuery();
4847
const generateUuid = () =>
49-
`${GCLOUD_TESTS_PREFIX}_${uuid.v4()}`.replace(/-/gi, '_');
48+
`${GCLOUD_TESTS_PREFIX}_${crypto.randomUUID()}`.replace(/-/gi, '_');
5049
const datasetId = generateUuid();
5150

5251
const sleep = (ms: number) =>

handwritten/bigtable/package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
"@types/proxyquire": "^1.3.31",
9292
"@types/pumpify": "^1.4.4",
9393
"@types/sinon": "^17.0.4",
94-
"@types/uuid": "^10.0.0",
9594
"c8": "^10.1.3",
9695
"codecov": "^3.8.3",
9796
"gapic-tools": "^1.0.1",
@@ -109,7 +108,6 @@
109108
"tcp-port-used": "^1.0.2",
110109
"ts-loader": "^9.5.2",
111110
"typescript": "^5.8.2",
112-
"uuid": "8.0.0",
113111
"webpack": "^5.98.0",
114112
"webpack-cli": "^6.0.1"
115113
},

handwritten/bigtable/system-test/common.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,13 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
import * as uuid from 'uuid';
1615
import {Cluster} from '../src/cluster';
1716
import * as inst from '../src/instance';
1817

1918
export const PREFIX = 'gt-';
2019

2120
export function generateId(resourceType: string) {
22-
const newUuid = uuid.v1().substr(4, 4);
21+
const newUuid = crypto.randomUUID().substr(4, 4);
2322
return `${PREFIX}${resourceType}-${newUuid}-${Date.now()}`;
2423
}
2524

handwritten/error-reporting/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@
5151
"@types/once": "^1.4.5",
5252
"@types/proxyquire": "^1.3.31",
5353
"@types/restify": "^8.0.0",
54-
"@types/uuid": "^8.3.0",
5554
"boom": "^7.2.0",
5655
"c8": "^10.1.3",
5756
"codecov": "^3.6.2",
@@ -67,8 +66,7 @@
6766
"pack-n-play": "^2.0.0",
6867
"proxyquire": "^2.1.3",
6968
"restify": "^11.0.0",
70-
"typescript": "^5.9.3",
71-
"uuid": "^8.3.2"
69+
"typescript": "^5.9.3"
7270
},
7371
"overrides": {
7472
"undici": "5.28.4",

handwritten/error-reporting/system-test/error-reporting.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ import {
2828
ErrorsApiTransport,
2929
} from '../utils/errors-api-transport';
3030

31-
import * as uuid from 'uuid';
3231
import * as util from 'util';
3332
import * as path from 'path';
3433

@@ -446,7 +445,7 @@ describe('Expected Behavior', () => {
446445

447446
describe('error-reporting', () => {
448447
const SRC_ROOT = path.join(__dirname, '..', 'src');
449-
const UUID = uuid.v4();
448+
const UUID = crypto.randomUUID();
450449
const BASE_NAME = 'error-reporting-system-test';
451450
function buildName(suffix: string) {
452451
return [UUID, BASE_NAME, suffix].join('_');

0 commit comments

Comments
 (0)