Skip to content

Commit

Permalink
chore: fix build warnings (#31616)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Jul 11, 2024
1 parent 89eef55 commit 77e5063
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/playwright-core/src/server/injected/clock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ export class ClockController {
if (typeof timer.func !== 'function') {
let error: Error | undefined;
try {
(() => { eval(timer.func); })();
// Using global this is not correct here,
// but it is already broken since the eval scope is different from the one
// on the original call site.
// eslint-disable-next-line no-restricted-globals
(() => { globalThis.eval(timer.func); })();
} catch (e) {
error = e;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/playwright/bundles/babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.1",
"private": true,
"scripts": {
"esbuild": "esbuild ./src/babelBundleImpl.ts --bundle --outdir=../../lib/transform --format=cjs --platform=node --target=ES2019",
"esbuild": "esbuild ./src/babelBundleImpl.ts --bundle --outdir=../../lib/transform --format=cjs --platform=node --target=ES2019 --external:playwright",
"build": "npm run esbuild -- --minify",
"watch": "npm run esbuild -- --watch --sourcemap",
"generate-license": "node ../../../../utils/generate_third_party_notice.js"
Expand Down

0 comments on commit 77e5063

Please sign in to comment.