1+ import crypto from 'crypto'
12import { createWriteStream } from 'fs'
23import { readFile } from 'fs/promises'
34import { join } from 'path'
@@ -10,7 +11,6 @@ import process from 'process'
1011import { getURL as getBootstrapURL } from '@netlify/edge-functions-bootstrap/version'
1112import getPort from 'get-port'
1213import tmp from 'tmp-promise'
13- import { v4 as uuidv4 } from 'uuid'
1414import { test , expect } from 'vitest'
1515
1616import { fixturesDir } from '../../test/util.js'
@@ -73,7 +73,7 @@ test('Starts a server and serves requests for edge functions', async () => {
7373 headers : {
7474 'x-nf-edge-functions' : 'echo_env' ,
7575 'x-ef-passthrough' : 'passthrough' ,
76- 'X-NF-Request-ID' : uuidv4 ( ) ,
76+ 'X-NF-Request-ID' : crypto . randomUUID ( ) ,
7777 } ,
7878 } )
7979 expect ( response1 . status ) . toBe ( 200 )
@@ -83,7 +83,7 @@ test('Starts a server and serves requests for edge functions', async () => {
8383 headers : {
8484 'x-nf-edge-functions' : 'greet' ,
8585 'x-ef-passthrough' : 'passthrough' ,
86- 'X-NF-Request-ID' : uuidv4 ( ) ,
86+ 'X-NF-Request-ID' : crypto . randomUUID ( ) ,
8787 } ,
8888 } )
8989 expect ( response2 . status ) . toBe ( 200 )
@@ -93,7 +93,7 @@ test('Starts a server and serves requests for edge functions', async () => {
9393 headers : {
9494 'x-nf-edge-functions' : 'global_netlify' ,
9595 'x-ef-passthrough' : 'passthrough' ,
96- 'X-NF-Request-ID' : uuidv4 ( ) ,
96+ 'X-NF-Request-ID' : crypto . randomUUID ( ) ,
9797 } ,
9898 } )
9999 expect ( await response3 . json ( ) ) . toEqual ( {
@@ -166,7 +166,7 @@ test('Serves edge functions in a monorepo setup', async () => {
166166 headers : {
167167 'x-nf-edge-functions' : 'func1' ,
168168 'x-ef-passthrough' : 'passthrough' ,
169- 'X-NF-Request-ID' : uuidv4 ( ) ,
169+ 'X-NF-Request-ID' : crypto . randomUUID ( ) ,
170170 } ,
171171 } )
172172
0 commit comments