Skip to content

Commit

Permalink
chore(deps): use randomUUID from Node.js runtime, not from uuid
Browse files Browse the repository at this point in the history
  • Loading branch information
akirafujiu committed Feb 22, 2024
1 parent dd0cdfe commit 0727efa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,14 @@
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.0",
"node-fetch": "^2.6.9",
"stream-events": "^1.0.5",
"uuid": "^9.0.0"
"stream-events": "^1.0.5"
},
"devDependencies": {
"@babel/plugin-proposal-private-methods": "^7.18.6",
"@compodoc/compodoc": "^1.1.9",
"@types/mocha": "^10.0.0",
"@types/node-fetch": "^2.5.7",
"@types/sinon": "^17.0.0",
"@types/uuid": "^9.0.0",
"c8": "^9.0.0",
"codecov": "^3.1.0",
"gts": "^5.0.0",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {Agent, AgentOptions as HttpsAgentOptions} from 'https';
import {AgentOptions as HttpAgentOptions} from 'http';
import fetch, * as f from 'node-fetch';
import {PassThrough, Readable, pipeline} from 'stream';
import * as uuid from 'uuid';
import {randomUUID} from 'crypto'
import {getAgent} from './agents';
import {TeenyStatistics} from './TeenyStatistics';
// eslint-disable-next-line @typescript-eslint/no-var-requires
Expand Down Expand Up @@ -208,7 +208,7 @@ function teenyRequest(
// TODO: add support for multipart uploads through streaming
throw new Error('Multipart without callback is not implemented.');
}
const boundary: string = uuid.v4();
const boundary: string = randomUUID();
(options.headers as Headers)[
'Content-Type'
] = `multipart/related; boundary=${boundary}`;
Expand Down

0 comments on commit 0727efa

Please sign in to comment.