Skip to content

Commit

Permalink
refactor(bazel): replace deprecated node-uuid with uuid (#152)
Browse files Browse the repository at this point in the history
The `node-uuid` package has been deprecated and recommends using the `uuid` package instead. The `uuid` package's type definitions have also been added to allow for type checking its usage as well as remove the need to use `require` with the package.

PR Close #152
  • Loading branch information
clydin authored and angular-ci committed Aug 16, 2021
1 parent 4dfa5cb commit 1638e3f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
2 changes: 1 addition & 1 deletion bazel/benchmark/driver-utilities/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ts_library(
"@npm//@angular/benchpress",
"@npm//@types/node",
"@npm//@types/selenium-webdriver",
"@npm//node-uuid",
"@npm//@types/uuid",
"@npm//protractor",
"@npm//selenium-webdriver",
],
Expand Down
5 changes: 2 additions & 3 deletions bazel/benchmark/driver-utilities/perf_util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ import {mkdirSync} from 'fs';

export {verifyNoBrowserErrors} from './e2e_util';

const nodeUuid = require('node-uuid');

import {
SeleniumWebDriverAdapter,
Options,
Expand All @@ -24,6 +22,7 @@ import {
Runner,
StaticProvider,
} from '@angular/benchpress';
import {v1 as uuidv1} from 'uuid';
import {openBrowser} from './e2e_util';

// Note: Keep the `modules/benchmarks/README.md` file in sync with the supported options.
Expand Down Expand Up @@ -68,7 +67,7 @@ export async function runBenchmark({
}

function createBenchpressRunner(): Runner {
let runId = nodeUuid.v1();
let runId = uuidv1();
if (process.env.GIT_SHA) {
runId = process.env.GIT_SHA + ' ' + runId;
}
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"@types/node-fetch": "^2.5.10",
"@types/semver": "^7.3.6",
"@types/shelljs": "^0.8.8",
"@types/uuid": "^8.3.1",
"@types/yaml": "^1.9.7",
"@types/yargs": "^17.0.0",
"brotli": "^1.3.2",
Expand All @@ -59,7 +60,6 @@
"multimatch": "^5.0.0",
"nock": "^13.0.3",
"node-fetch": "^2.6.1",
"node-uuid": "1.4.8",
"ora": "^5.0.0",
"prettier": "^2.3.2",
"protractor": "^7.0.0",
Expand All @@ -74,6 +74,7 @@
"tslint": "^6.1.3",
"typed-graphqlify": "^3.1.1",
"typescript": "~4.3.5",
"uuid": "^8.3.2",
"yaml": "^1.10.0",
"yargs": "^17.0.0"
}
Expand Down
15 changes: 10 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,11 @@
dependencies:
"@types/node" "*"

"@types/uuid@^8.3.1":
version "8.3.1"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-8.3.1.tgz#1a32969cf8f0364b3d8c8af9cc3555b7805df14f"
integrity sha512-Y2mHTRAbqfFkpjldbkHGY8JIzRN6XqYRliG8/24FcHm2D2PwW24fl5xMRTVGdrb7iMrwCaIEbLWerGIkXuFWVg==

"@types/yaml@^1.9.7":
version "1.9.7"
resolved "https://registry.yarnpkg.com/@types/yaml/-/yaml-1.9.7.tgz#2331f36e0aac91311a63d33eb026c21687729679"
Expand Down Expand Up @@ -2110,11 +2115,6 @@ [email protected]:
dependencies:
asn1 "^0.2.4"

[email protected]:
version "1.4.8"
resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.8.tgz#b040eb0923968afabf8d32fb1f17f1167fdab907"
integrity sha1-sEDrCSOWivq/jTL7HxfxFn/auQc=

normalize-package-data@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
Expand Down Expand Up @@ -3058,6 +3058,11 @@ uuid@^3.3.2:
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee"
integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==

uuid@^8.3.2:
version "8.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2"
integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==

v8-to-istanbul@^7.1.0:
version "7.1.2"
resolved "https://registry.yarnpkg.com/v8-to-istanbul/-/v8-to-istanbul-7.1.2.tgz#30898d1a7fa0c84d225a2c1434fb958f290883c1"
Expand Down

0 comments on commit 1638e3f

Please sign in to comment.