File tree Expand file tree Collapse file tree 5 files changed +7
-25
lines changed
Expand file tree Collapse file tree 5 files changed +7
-25
lines changed Original file line number Diff line number Diff line change 99
1010/* eslint-disable no-console */
1111
12- // use require here due to
13- // https://github.com/evanw/esbuild/issues/587#issuecomment-901397213
14- import puppeteer = require( 'puppeteer-core' ) ;
15-
16- const path = require ( 'path' ) ;
12+ import * as path from 'path' ;
13+ import type * as puppeteer from 'puppeteer-core' ;
1714
1815const ALLOWED_ASSERTION_FAILURES = [
1916 // Failure during shutdown. crbug.com/1145969
Original file line number Diff line number Diff line change 44
55import * as fs from 'fs' ;
66import * as path from 'path' ;
7- // use require here due to
8- // https://github.com/evanw/esbuild/issues/587#issuecomment-901397213
9- import puppeteer = require( 'puppeteer-core' ) ;
7+ import type * as puppeteer from 'puppeteer-core' ;
108
119import { installPageErrorHandlers } from './events.js' ;
1210import { BUILD_ROOT } from './paths.js' ;
Original file line number Diff line number Diff line change 44
55/* eslint-disable no-console */
66
7- // use require here due to
8- // https://github.com/evanw/esbuild/issues/587#issuecomment-901397213
9- import puppeteer = require( 'puppeteer-core' ) ;
7+ import * as puppeteer from 'puppeteer-core' ;
108
119import {
1210 dumpCollectedErrors ,
1311 installPageErrorHandlers ,
1412 setupBrowserProcessIO ,
1513} from './events.js' ;
1614import {
15+ type DevToolsFrontendReloadOptions ,
1716 DevToolsFrontendTab ,
1817 loadEmptyPageAndWaitForContent ,
19- type DevToolsFrontendReloadOptions ,
2018} from './frontend_tab.js' ;
2119import {
2220 clearPuppeteerState ,
@@ -28,13 +26,6 @@ import {
2826import { TargetTab } from './target_tab.js' ;
2927import { TestConfig } from './test_config.js' ;
3028
31- // Workaround for mismatching versions of puppeteer types and puppeteer library.
32- declare module 'puppeteer-core' {
33- interface ConsoleMessage {
34- stackTrace ( ) : ConsoleMessageLocation [ ] ;
35- }
36- }
37-
3829const viewportWidth = 1280 ;
3930const viewportHeight = 720 ;
4031// Adding some offset to the window size used in the headful mode
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- // use require here due to
6- // https://github.com/evanw/esbuild/issues/587#issuecomment-901397213
7- import puppeteer = require( 'puppeteer-core' ) ;
5+ import type * as puppeteer from 'puppeteer-core' ;
86
97import { DevToolsFrontendTab } from './frontend_tab.js' ;
108import { TargetTab } from './target_tab.js' ;
Original file line number Diff line number Diff line change 22// Use of this source code is governed by a BSD-style license that can be
33// found in the LICENSE file.
44
5- // use require here due to
6- // https://github.com/evanw/esbuild/issues/587#issuecomment-901397213
7- import puppeteer = require( 'puppeteer-core' ) ;
5+ import type * as puppeteer from 'puppeteer-core' ;
86
97import { loadEmptyPageAndWaitForContent } from './frontend_tab.js' ;
108
You can’t perform that action at this time.
0 commit comments