Skip to content

Commit

Permalink
random id update - 1.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arietrouw committed Aug 14, 2024
1 parent 37f3ff5 commit 8deed89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
"bowser": "^2.11.0",
"js-cookie": "^3.0.5",
"lodash-es": "^4.17.21",
"md5": "^2.3.0",
"randombytes": "^2.1.0"
"md5": "^2.3.0"
},
"peerDependencies": {
"axios": "^1.2"
Expand Down Expand Up @@ -89,7 +88,7 @@
"url": "https://github.com/xylabs/sdk-pixel-js.git"
},
"sideEffects": false,
"version": "1.6.0",
"version": "1.7.0",
"packageManager": "[email protected]",
"type": "module"
}
}
4 changes: 1 addition & 3 deletions src/UniqueUserId.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import randomBytes from 'randombytes'

export class UniqueUserId {
private static localStorageId = '_coin_cid'
id: string
Expand All @@ -14,6 +12,6 @@ export class UniqueUserId {
}

private generateId() {
return randomBytes(16).toString('base64')
return crypto.randomUUID()
}
}
12 changes: 1 addition & 11 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,6 @@ __metadata:
lodash-es: "npm:^4.17.21"
md5: "npm:^2.3.0"
npm-package-json-lint: "npm:^8.0.0"
randombytes: "npm:^2.1.0"
reflect-metadata: "npm:^0.2.2"
ts-jest: "npm:^29.2.2"
ts-node: "npm:^10.9.2"
Expand Down Expand Up @@ -10020,15 +10019,6 @@ __metadata:
languageName: node
linkType: hard

"randombytes@npm:^2.1.0":
version: 2.1.0
resolution: "randombytes@npm:2.1.0"
dependencies:
safe-buffer: "npm:^5.1.0"
checksum: 10/4efd1ad3d88db77c2d16588dc54c2b52fd2461e70fe5724611f38d283857094fe09040fa2c9776366803c3152cf133171b452ef717592b65631ce5dc3a2bdafc
languageName: node
linkType: hard

"rc-config-loader@npm:^4.1.3":
version: 4.1.3
resolution: "rc-config-loader@npm:4.1.3"
Expand Down Expand Up @@ -11884,7 +11874,7 @@ __metadata:
languageName: node
linkType: hard

"safe-buffer@npm:^5.1.0, safe-buffer@npm:~5.2.0":
"safe-buffer@npm:~5.2.0":
version: 5.2.1
resolution: "safe-buffer@npm:5.2.1"
checksum: 10/32872cd0ff68a3ddade7a7617b8f4c2ae8764d8b7d884c651b74457967a9e0e886267d3ecc781220629c44a865167b61c375d2da6c720c840ecd73f45d5d9451
Expand Down

0 comments on commit 8deed89

Please sign in to comment.