From cb45da14edf8ffcb40d4fcba04ac2c06b082e595 Mon Sep 17 00:00:00 2001 From: v1rtl Date: Thu, 15 Aug 2024 12:49:33 +0300 Subject: [PATCH] fix incompat issue with node 18.x --- src/playwright.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/playwright.ts b/src/playwright.ts index d04147c..87806aa 100644 --- a/src/playwright.ts +++ b/src/playwright.ts @@ -1,5 +1,5 @@ +import { randomUUID } from 'node:crypto' import type { Page } from '@playwright/test' - import { EventEmitter } from './EventEmitter.js' import type { Web3ProviderConfig } from './backend.js' import { createHeadlessWeb3Provider } from './factory.js' @@ -43,7 +43,7 @@ export async function injectHeadlessWeb3Provider({ content: `window.EventEmitter = ${EventEmitter.toString()}`, }) - const uuid = crypto.randomUUID() + const uuid = randomUUID() await page.addInitScript( ([uuid]) => {