mirror of
https://github.com/microsoft/playwright.git
synced 2024-09-11 12:36:22 +03:00
chore(typescript): update to 4.3 (#7809)
This commit is contained in:
parent
08a447e90f
commit
a2cbba9c1c
4
.babelrc
4
.babelrc
@ -2,10 +2,8 @@
|
|||||||
"assumptions": {
|
"assumptions": {
|
||||||
"setPublicClassFields": true
|
"setPublicClassFields": true
|
||||||
},
|
},
|
||||||
"presets": [
|
|
||||||
"@babel/preset-typescript"
|
|
||||||
],
|
|
||||||
"plugins": [
|
"plugins": [
|
||||||
|
["@babel/plugin-transform-typescript", { "allowDeclareFields": true } ],
|
||||||
"@babel/plugin-proposal-export-namespace-from",
|
"@babel/plugin-proposal-export-namespace-from",
|
||||||
"@babel/plugin-proposal-class-properties",
|
"@babel/plugin-proposal-class-properties",
|
||||||
"@babel/plugin-proposal-optional-chaining",
|
"@babel/plugin-proposal-optional-chaining",
|
||||||
|
1810
package-lock.json
generated
1810
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
41
package.json
41
package.json
@ -40,23 +40,23 @@
|
|||||||
},
|
},
|
||||||
"DEPS-NOTE": "Any non-test dependency must be added to the build_package.js script as well",
|
"DEPS-NOTE": "Any non-test dependency must be added to the build_package.js script as well",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/code-frame": "^7.12.13",
|
"@babel/code-frame": "^7.14.5",
|
||||||
"@babel/core": "^7.14.0",
|
"@babel/core": "^7.14.8",
|
||||||
"@babel/plugin-proposal-class-properties": "^7.13.0",
|
"@babel/plugin-proposal-class-properties": "^7.14.5",
|
||||||
"@babel/plugin-proposal-dynamic-import": "^7.13.8",
|
"@babel/plugin-proposal-dynamic-import": "^7.14.5",
|
||||||
"@babel/plugin-proposal-export-namespace-from": "^7.12.13",
|
"@babel/plugin-proposal-export-namespace-from": "^7.14.5",
|
||||||
"@babel/plugin-proposal-logical-assignment-operators": "^7.13.8",
|
"@babel/plugin-proposal-logical-assignment-operators": "^7.14.5",
|
||||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8",
|
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5",
|
||||||
"@babel/plugin-proposal-numeric-separator": "^7.12.13",
|
"@babel/plugin-proposal-numeric-separator": "^7.14.5",
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.13.12",
|
"@babel/plugin-proposal-optional-chaining": "^7.14.5",
|
||||||
"@babel/plugin-proposal-private-methods": "^7.13.0",
|
"@babel/plugin-proposal-private-methods": "^7.14.5",
|
||||||
"@babel/plugin-proposal-private-property-in-object": "^7.14.0",
|
"@babel/plugin-proposal-private-property-in-object": "^7.14.5",
|
||||||
"@babel/plugin-syntax-async-generators": "^7.8.4",
|
"@babel/plugin-syntax-async-generators": "^7.8.4",
|
||||||
"@babel/plugin-syntax-json-strings": "^7.8.3",
|
"@babel/plugin-syntax-json-strings": "^7.8.3",
|
||||||
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
|
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
|
||||||
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
|
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
|
||||||
"@babel/plugin-transform-modules-commonjs": "^7.14.0",
|
"@babel/plugin-transform-modules-commonjs": "^7.14.5",
|
||||||
"@babel/preset-typescript": "^7.13.0",
|
"@babel/preset-typescript": "^7.14.5",
|
||||||
"colors": "^1.4.0",
|
"colors": "^1.4.0",
|
||||||
"commander": "^6.1.0",
|
"commander": "^6.1.0",
|
||||||
"debug": "^4.1.1",
|
"debug": "^4.1.1",
|
||||||
@ -80,10 +80,11 @@
|
|||||||
"yazl": "^2.5.1"
|
"yazl": "^2.5.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/cli": "^7.14.3",
|
"@babel/cli": "^7.14.8",
|
||||||
|
"@babel/plugin-transform-typescript": "^7.14.6",
|
||||||
"@babel/preset-react": "^7.14.5",
|
"@babel/preset-react": "^7.14.5",
|
||||||
"@types/babel__code-frame": "^7.0.2",
|
"@types/babel__code-frame": "^7.0.3",
|
||||||
"@types/babel__core": "^7.1.14",
|
"@types/babel__core": "^7.1.15",
|
||||||
"@types/debug": "^4.1.5",
|
"@types/debug": "^4.1.5",
|
||||||
"@types/extract-zip": "^1.6.2",
|
"@types/extract-zip": "^1.6.2",
|
||||||
"@types/mime": "^2.0.3",
|
"@types/mime": "^2.0.3",
|
||||||
@ -103,15 +104,15 @@
|
|||||||
"@types/ws": "7.2.6",
|
"@types/ws": "7.2.6",
|
||||||
"@types/xml2js": "^0.4.5",
|
"@types/xml2js": "^0.4.5",
|
||||||
"@types/yazl": "^2.4.2",
|
"@types/yazl": "^2.4.2",
|
||||||
"@typescript-eslint/eslint-plugin": "^4.25.0",
|
"@typescript-eslint/eslint-plugin": "^4.28.4",
|
||||||
"@typescript-eslint/parser": "^4.25.0",
|
"@typescript-eslint/parser": "^4.28.4",
|
||||||
"babel-loader": "^8.2.2",
|
"babel-loader": "^8.2.2",
|
||||||
"chokidar": "^3.5.0",
|
"chokidar": "^3.5.0",
|
||||||
"commonmark": "^0.29.1",
|
"commonmark": "^0.29.1",
|
||||||
"cross-env": "^7.0.2",
|
"cross-env": "^7.0.2",
|
||||||
"css-loader": "^5.2.6",
|
"css-loader": "^5.2.6",
|
||||||
"electron": "^11.1.1",
|
"electron": "^11.1.1",
|
||||||
"eslint": "^7.7.0",
|
"eslint": "^7.31.0",
|
||||||
"eslint-plugin-notice": "^0.9.10",
|
"eslint-plugin-notice": "^0.9.10",
|
||||||
"eslint-plugin-react-hooks": "^4.2.0",
|
"eslint-plugin-react-hooks": "^4.2.0",
|
||||||
"file-loader": "^6.1.0",
|
"file-loader": "^6.1.0",
|
||||||
@ -123,7 +124,7 @@
|
|||||||
"react-dom": "^17.0.1",
|
"react-dom": "^17.0.1",
|
||||||
"socksv5": "0.0.6",
|
"socksv5": "0.0.6",
|
||||||
"style-loader": "^1.2.1",
|
"style-loader": "^1.2.1",
|
||||||
"typescript": "=4.2.4",
|
"typescript": "^4.3.5",
|
||||||
"webpack": "^4.44.2",
|
"webpack": "^4.44.2",
|
||||||
"webpack-cli": "^3.3.12",
|
"webpack-cli": "^3.3.12",
|
||||||
"xml2js": "^0.4.23",
|
"xml2js": "^0.4.23",
|
||||||
|
@ -298,12 +298,11 @@ export class CRBrowserContext extends BrowserContext {
|
|||||||
ServiceWorker: 'serviceworker',
|
ServiceWorker: 'serviceworker',
|
||||||
};
|
};
|
||||||
|
|
||||||
readonly _browser: CRBrowser;
|
declare readonly _browser: CRBrowser;
|
||||||
readonly _evaluateOnNewDocumentSources: string[];
|
readonly _evaluateOnNewDocumentSources: string[];
|
||||||
|
|
||||||
constructor(browser: CRBrowser, browserContextId: string | undefined, options: types.BrowserContextOptions) {
|
constructor(browser: CRBrowser, browserContextId: string | undefined, options: types.BrowserContextOptions) {
|
||||||
super(browser, options, browserContextId);
|
super(browser, options, browserContextId);
|
||||||
this._browser = browser;
|
|
||||||
this._evaluateOnNewDocumentSources = [];
|
this._evaluateOnNewDocumentSources = [];
|
||||||
this._authenticateProxyViaCredentials();
|
this._authenticateProxyViaCredentials();
|
||||||
}
|
}
|
||||||
|
@ -112,14 +112,12 @@ export class FrameExecutionContext extends js.ExecutionContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {
|
export class ElementHandle<T extends Node = Node> extends js.JSHandle<T> {
|
||||||
readonly _context: FrameExecutionContext;
|
declare readonly _context: FrameExecutionContext;
|
||||||
readonly _page: Page;
|
readonly _page: Page;
|
||||||
readonly _objectId: string;
|
declare readonly _objectId: string;
|
||||||
|
|
||||||
constructor(context: FrameExecutionContext, objectId: string) {
|
constructor(context: FrameExecutionContext, objectId: string) {
|
||||||
super(context, 'node', objectId);
|
super(context, 'node', objectId);
|
||||||
this._objectId = objectId;
|
|
||||||
this._context = context;
|
|
||||||
this._page = context.frame._page;
|
this._page = context.frame._page;
|
||||||
this._initializePreview().catch(e => {});
|
this._initializePreview().catch(e => {});
|
||||||
}
|
}
|
||||||
|
@ -147,11 +147,10 @@ export class FFBrowser extends Browser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class FFBrowserContext extends BrowserContext {
|
export class FFBrowserContext extends BrowserContext {
|
||||||
readonly _browser: FFBrowser;
|
declare readonly _browser: FFBrowser;
|
||||||
|
|
||||||
constructor(browser: FFBrowser, browserContextId: string | undefined, options: types.BrowserContextOptions) {
|
constructor(browser: FFBrowser, browserContextId: string | undefined, options: types.BrowserContextOptions) {
|
||||||
super(browser, options, browserContextId);
|
super(browser, options, browserContextId);
|
||||||
this._browser = browser;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async _initialize() {
|
async _initialize() {
|
||||||
|
@ -198,12 +198,11 @@ export class WKBrowser extends Browser {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class WKBrowserContext extends BrowserContext {
|
export class WKBrowserContext extends BrowserContext {
|
||||||
readonly _browser: WKBrowser;
|
declare readonly _browser: WKBrowser;
|
||||||
readonly _evaluateOnNewDocumentSources: string[];
|
readonly _evaluateOnNewDocumentSources: string[];
|
||||||
|
|
||||||
constructor(browser: WKBrowser, browserContextId: string | undefined, options: types.BrowserContextOptions) {
|
constructor(browser: WKBrowser, browserContextId: string | undefined, options: types.BrowserContextOptions) {
|
||||||
super(browser, options, browserContextId);
|
super(browser, options, browserContextId);
|
||||||
this._browser = browser;
|
|
||||||
this._evaluateOnNewDocumentSources = [];
|
this._evaluateOnNewDocumentSources = [];
|
||||||
this._authenticateProxyViaHeader();
|
this._authenticateProxyViaHeader();
|
||||||
}
|
}
|
||||||
|
@ -572,15 +572,6 @@ playwright.chromium.launch().then(async browser => {
|
|||||||
await browser.close();
|
await browser.close();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
(async () => {
|
|
||||||
const browser = await playwright.firefox.launch();
|
|
||||||
const page = await browser.newPage();
|
|
||||||
const context = page.context();
|
|
||||||
const oneTwoThree = ('pageTarget' in context) ? context['pageTarget'] : 123;
|
|
||||||
const assertion: AssertType<123, typeof oneTwoThree> = true;
|
|
||||||
await browser.close();
|
|
||||||
})();
|
|
||||||
|
|
||||||
// $eval
|
// $eval
|
||||||
|
|
||||||
(async () => {
|
(async () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user