Skip to content

Commit

Permalink
fix: use built-in crypto.randomUUID (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored Jun 15, 2024
1 parent 29bf4dc commit b8b1715
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 13 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
"source-map": "^0.7.4",
"stacktrace-parser": "^0.1.10",
"table": "^6.8.2",
"temp-dir": "^3.0.0",
"uuid": "^10.0.0"
"temp-dir": "^3.0.0"
},
"devDependencies": {
"@rollup/plugin-replace": "^5.0.7",
Expand Down
9 changes: 0 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/metrics/domNodesAndListeners/eventListeners.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { v4 as uuidV4 } from 'uuid'
import { randomUUID } from 'node:crypto'
import { omit, pick } from '../../util.js'
import { getDescriptors } from '../../getDescriptors.js'
import { getAllDomNodes } from '../../browser/getAllDomNodes.js'

// via https://stackoverflow.com/a/67030384
export async function getDomNodesAndListeners (page, cdpSession) {
const objectGroup = uuidV4()
const objectGroup = randomUUID()
const { result: { objectId } } = await cdpSession.send('Runtime.evaluate', {
expression: `
(function () {
Expand Down

0 comments on commit b8b1715

Please sign in to comment.