Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix build warnings #31616

Merged
merged 1 commit into from
Jul 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading