Skip to content

Commit

Permalink
Remove uuid package
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Feb 2, 2024
1 parent a4d67cd commit 0828850
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions lib/client/oauth.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var url = require('url')
var crypto = require('crypto')
var qs = require('qs')
var uuid = require('uuid').v4
var _oauth = require('oauth-sign')

function buildOauth(options) {
Expand Down Expand Up @@ -69,7 +68,7 @@ function buildParams(oauth, uri, method, query, form) {
oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString()
}
if (!oa.oauth_nonce) {
oa.oauth_nonce = uuid().replace(/-/g, '')
oa.oauth_nonce = crypto.randomUUID().replace(/-/g, '')
}
if (!oa.oauth_signature_method) {
oa.oauth_signature_method = 'HMAC-SHA1'
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"jws": "^4.0.0",
"qs": "^6.11.2",
"request-compose": "^2.1.6",
"uuid": "^8.3.2",
"oauth-sign": "^0.9.0"
},
"devDependencies": {
Expand Down

0 comments on commit 0828850

Please sign in to comment.