Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
chore: delete unused source-map-support code (#33306)
Yury Semikhatsky88c42f788769
diff --git a/packages/playwright/bundles/utils/build.js b/packages/playwright/bundles/utils/build.jsindex 8c6bd89cf2..6fca8d3e0a 100644--- a/packages/playwright/bundles/utils/build.js+++ b/packages/playwright/bundles/utils/build.js@@ -16,35 +16,14 @@// @ts-checkconst path = require('path');-const fs = require('fs');const esbuild = require('esbuild');-// Can be removed once source-map-support was is fixed.-/** @type{import('esbuild').Plugin} */-let patchSource = {- name: 'patch-source-map-support-deprecation',- setup(build) {- build.onResolve({ filter: /^source-map-support$/ }, () => {- const originalPath = require.resolve('source-map-support');- const patchedPath = path.join(path.dirname(originalPath), path.basename(originalPath, '.js') + '.pw-patched.js');- let sourceFileContent = fs.readFileSync(originalPath, 'utf8');- // source-map-support is overwriting __PW_ZONE__ with func in core if source maps are present.- const original = `return state.nextPosition.name || originalFunctionName();`;- const insertedLine = `if (state.nextPosition.name === 'func') return originalFunctionName() || 'func';`;- sourceFileContent = sourceFileContent.replace(original, insertedLine + original);- fs.writeFileSync(patchedPath, sourceFileContent);- return { path: patchedPath }- });- },-};-(async () => {const ctx = await esbuild.context({entryPoints: [path.join(__dirname, 'src/utilsBundleImpl.ts')],external: ['fsevents'],bundle: true,outdir: path.join(__dirname, '../../lib'),- plugins: [patchSource],format: 'cjs',platform: 'node',target: 'ES2019',