Skip to content

Commit e8d82f4

Browse files
Copilotbmiddha
andauthored
Replace uuid package dependency with Node.js built-in crypto.randomUUID (#5364)
* Initial plan * Replace uuid package with Node.js built-in crypto.randomUUID Co-authored-by: bmiddha <5100938+bmiddha@users.noreply.github.com> * Add rush change file for uuid package replacement Co-authored-by: bmiddha <5100938+bmiddha@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: bmiddha <5100938+bmiddha@users.noreply.github.com>
1 parent f017e4b commit e8d82f4

6 files changed

Lines changed: 16 additions & 17 deletions

File tree

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"comment": "Replace uuid package dependency with Node.js built-in crypto.randomUUID",
5+
"type": "none",
6+
"packageName": "@microsoft/rush"
7+
}
8+
],
9+
"packageName": "@microsoft/rush",
10+
"email": "198982749+Copilot@users.noreply.github.com"
11+
}

common/config/subspaces/build-tests-subspace/repo-state.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
{
33
"pnpmShrinkwrapHash": "f89693a88037554bf0c35db4f2295ef771cd2a71",
44
"preferredVersionsHash": "550b4cee0bef4e97db6c6aad726df5149d20e7d9",
5-
"packageJsonInjectedDependenciesHash": "364e001eac655a92be31ddb4bbf0d8b291d1e9cc"
5+
"packageJsonInjectedDependenciesHash": "2fad9cbc4726f383da294e793c5b891d8775fca6"
66
}

common/config/subspaces/default/pnpm-lock.yaml

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush.
22
{
3-
"pnpmShrinkwrapHash": "43e8674ca74b9c3f20cf12f03de5ce2968017331",
3+
"pnpmShrinkwrapHash": "3749a69d1b0594a63c7a5ad6628f2897dbc3247c",
44
"preferredVersionsHash": "61cd419c533464b580f653eb5f5a7e27fe7055ca"
55
}

libraries/rush-lib/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,7 @@
6565
"strict-uri-encode": "~2.0.0",
6666
"tapable": "2.2.1",
6767
"tar": "~6.2.1",
68-
"true-case-path": "~2.2.1",
69-
"uuid": "~8.3.2"
68+
"true-case-path": "~2.2.1"
7069
},
7170
"devDependencies": {
7271
"@pnpm/lockfile.types": "~1.0.3",
@@ -87,7 +86,6 @@
8786
"@types/ssri": "~7.1.0",
8887
"@types/strict-uri-encode": "2.0.0",
8988
"@types/tar": "6.1.6",
90-
"@types/uuid": "~8.3.4",
9189
"@types/webpack-env": "1.18.8",
9290
"webpack": "~5.98.0"
9391
},

libraries/rush-lib/src/api/CobuildConfiguration.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import { FileSystem, JsonFile, JsonSchema } from '@rushstack/node-core-library';
55
import type { ITerminal } from '@rushstack/terminal';
6-
import { v4 as uuidv4 } from 'uuid';
6+
import { randomUUID } from 'node:crypto';
77

88
import { EnvironmentConfiguration } from './EnvironmentConfiguration';
99
import type { CobuildLockProviderFactory, RushSession } from '../pluginFramework/RushSession';
@@ -84,7 +84,7 @@ export class CobuildConfiguration {
8484

8585
this.cobuildContextId = EnvironmentConfiguration.cobuildContextId;
8686
this.cobuildFeatureEnabled = this.cobuildContextId ? cobuildJson.cobuildFeatureEnabled : false;
87-
this.cobuildRunnerId = EnvironmentConfiguration.cobuildRunnerId || uuidv4();
87+
this.cobuildRunnerId = EnvironmentConfiguration.cobuildRunnerId || randomUUID();
8888
this.cobuildLeafProjectLogOnlyAllowed =
8989
EnvironmentConfiguration.cobuildLeafProjectLogOnlyAllowed ?? false;
9090
this.cobuildWithoutCacheAllowed =

0 commit comments

Comments
 (0)