Skip to content

Commit aa58932

Browse files
Client-side media: Use crypto.randomUUID() instead of ESM-only uuid in e2e
The uuid package is ESM-only and breaks require() call sites (see #77960). Use the built-in crypto.randomUUID() to fix the Lint JavaScript CI failure.
1 parent a4f3b6e commit aa58932

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎test/e2e/specs/editor/various/video-transcoding.spec.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
const path = require( 'path' );
55
const fs = require( 'fs/promises' );
66
const os = require( 'os' );
7-
const { v4: uuid } = require( 'uuid' );
7+
const { randomUUID } = require( 'crypto' );
88

99
/**
1010
* WordPress dependencies
@@ -53,7 +53,7 @@ class VideoTranscodingUtils {
5353
const tmpDirectory = await fs.mkdtemp(
5454
path.join( os.tmpdir(), 'gutenberg-test-video-' )
5555
);
56-
const uniqueName = uuid();
56+
const uniqueName = randomUUID();
5757
const extension = path.extname( fileName );
5858
const tmpFileName = path.join( tmpDirectory, uniqueName + extension );
5959
await fs.copyFile( path.join( ASSETS_DIR, fileName ), tmpFileName );

0 commit comments

Comments
 (0)