File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 88} from 'node:fs'
99import path from 'node:path'
1010import { spawnSync } from 'node:child_process'
11+ import { randomUUID } from 'node:crypto'
1112
1213import { globSync as tinyGlobSync } from 'tinyglobby'
1314
@@ -139,9 +140,7 @@ function versionBanner(_chunk) {
139140 // Make each build generate a unique version id, regardless
140141 // Mostly for development: confirms the build refreshed. For prod
141142 // builds the git hash should suffice to identify the build.
142- // Note: It's okay that Math.random() is not "secure".
143- // Drop the `0.`, force to 16 digits.
144- const rng = String ( Math . random ( ) ) . slice ( 2 ) . padStart ( 16 , '0' ) ;
143+ const rng = randomUUID ( ) . split ( '-' ) [ 0 ] ;
145144
146145 return `
147146 var SOCKET_CLI_PKG_JSON_VERSION = "${ pkgJsonVersion } "
You can’t perform that action at this time.
0 commit comments