mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: bump the babel (#27348)
This commit is contained in:
parent
2892467839
commit
4fd2b4adef
@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import path from 'path';
|
||||
import type { T, BabelAPI } from 'playwright/src/transform/babelBundle';
|
||||
import type { T, BabelAPI, PluginObj } from 'playwright/src/transform/babelBundle';
|
||||
import { types, declare, traverse } from 'playwright/lib/transform/babelBundle';
|
||||
import { resolveImportSpecifierExtension } from 'playwright/lib/util';
|
||||
const t: typeof T = types;
|
||||
@ -27,7 +27,7 @@ let componentIdentifiers: Set<T.Identifier>;
|
||||
export default declare((api: BabelAPI) => {
|
||||
api.assertVersion(7);
|
||||
|
||||
const result: babel.PluginObj = {
|
||||
const result: PluginObj = {
|
||||
name: 'playwright-debug-transform',
|
||||
visitor: {
|
||||
Program(path) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
1614
packages/playwright/bundles/babel/package-lock.json
generated
1614
packages/playwright/bundles/babel/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -9,34 +9,34 @@
|
||||
"generate-license": "node ../../../../utils/generate_third_party_notice.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"@babel/code-frame": "^7.18.6",
|
||||
"@babel/core": "^7.22.8",
|
||||
"@babel/helper-plugin-utils": "^7.20.2",
|
||||
"@babel/parser": "^7.21.3",
|
||||
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
||||
"@babel/plugin-proposal-class-static-block": "^7.21.0",
|
||||
"@babel/plugin-proposal-decorators": "^7.21.0",
|
||||
"@babel/plugin-proposal-dynamic-import": "^7.18.6",
|
||||
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
|
||||
"@babel/plugin-proposal-logical-assignment-operators": "^7.20.7",
|
||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.18.6",
|
||||
"@babel/plugin-proposal-numeric-separator": "^7.18.6",
|
||||
"@babel/plugin-proposal-optional-chaining": "^7.21.0",
|
||||
"@babel/plugin-proposal-private-methods": "^7.18.6",
|
||||
"@babel/plugin-proposal-private-property-in-object": "^7.21.0",
|
||||
"@babel/code-frame": "^7.22.13",
|
||||
"@babel/core": "^7.23.0",
|
||||
"@babel/helper-plugin-utils": "^7.22.5",
|
||||
"@babel/parser": "^7.23.0",
|
||||
"@babel/plugin-proposal-decorators": "^7.23.0",
|
||||
"@babel/plugin-syntax-async-generators": "^7.8.4",
|
||||
"@babel/plugin-syntax-import-assertions": "^7.20.0",
|
||||
"@babel/plugin-syntax-import-assertions": "^7.22.5",
|
||||
"@babel/plugin-syntax-json-strings": "^7.8.3",
|
||||
"@babel/plugin-syntax-object-rest-spread": "^7.8.3",
|
||||
"@babel/plugin-syntax-optional-catch-binding": "^7.8.3",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.21.2",
|
||||
"@babel/plugin-transform-react-jsx": "^7.21.0",
|
||||
"@babel/preset-typescript": "^7.21.0"
|
||||
"@babel/plugin-transform-class-properties": "^7.22.5",
|
||||
"@babel/plugin-transform-class-static-block": "^7.22.11",
|
||||
"@babel/plugin-transform-dynamic-import": "^7.22.11",
|
||||
"@babel/plugin-transform-export-namespace-from": "^7.22.11",
|
||||
"@babel/plugin-transform-logical-assignment-operators": "^7.22.11",
|
||||
"@babel/plugin-transform-modules-commonjs": "^7.23.0",
|
||||
"@babel/plugin-transform-nullish-coalescing-operator": "^7.22.11",
|
||||
"@babel/plugin-transform-numeric-separator": "^7.22.11",
|
||||
"@babel/plugin-transform-optional-chaining": "^7.23.0",
|
||||
"@babel/plugin-transform-private-methods": "^7.22.5",
|
||||
"@babel/plugin-transform-private-property-in-object": "^7.22.11",
|
||||
"@babel/plugin-transform-react-jsx": "^7.22.15",
|
||||
"@babel/preset-typescript": "^7.23.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/babel__code-frame": "^7.0.3",
|
||||
"@types/babel__core": "^7.20.0",
|
||||
"@types/babel__helper-plugin-utils": "^7.10.0",
|
||||
"@types/babel__traverse": "^7.18.3"
|
||||
"@types/babel__traverse": "^7.20.2"
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,19 +31,19 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins
|
||||
|
||||
if (isTypeScript) {
|
||||
plugins.push(
|
||||
[require('@babel/plugin-proposal-decorators'), { version: '2022-03' }],
|
||||
[require('@babel/plugin-proposal-class-properties')],
|
||||
[require('@babel/plugin-proposal-class-static-block')],
|
||||
[require('@babel/plugin-proposal-numeric-separator')],
|
||||
[require('@babel/plugin-proposal-logical-assignment-operators')],
|
||||
[require('@babel/plugin-proposal-nullish-coalescing-operator')],
|
||||
[require('@babel/plugin-proposal-optional-chaining')],
|
||||
[require('@babel/plugin-proposal-private-methods')],
|
||||
[require('@babel/plugin-proposal-decorators'), { version: '2023-05' }],
|
||||
[require('@babel/plugin-transform-class-properties')],
|
||||
[require('@babel/plugin-transform-class-static-block')],
|
||||
[require('@babel/plugin-transform-numeric-separator')],
|
||||
[require('@babel/plugin-transform-logical-assignment-operators')],
|
||||
[require('@babel/plugin-transform-nullish-coalescing-operator')],
|
||||
[require('@babel/plugin-transform-optional-chaining')],
|
||||
[require('@babel/plugin-transform-private-methods')],
|
||||
[require('@babel/plugin-syntax-json-strings')],
|
||||
[require('@babel/plugin-syntax-optional-catch-binding')],
|
||||
[require('@babel/plugin-syntax-async-generators')],
|
||||
[require('@babel/plugin-syntax-object-rest-spread')],
|
||||
[require('@babel/plugin-proposal-export-namespace-from')],
|
||||
[require('@babel/plugin-transform-export-namespace-from')],
|
||||
[
|
||||
// From https://github.com/G-Rath/babel-plugin-replace-ts-export-assignment/blob/8dfdca32c8aa428574b0cae341444fc5822f2dc6/src/index.ts
|
||||
(
|
||||
@ -71,7 +71,7 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins
|
||||
if (!isModule) {
|
||||
plugins.push([require('@babel/plugin-transform-modules-commonjs')]);
|
||||
// This converts async imports to require() calls so that we can intercept them with pirates.
|
||||
plugins.push([require('@babel/plugin-proposal-dynamic-import')]);
|
||||
plugins.push([require('@babel/plugin-transform-dynamic-import')]);
|
||||
plugins.push([
|
||||
(): PluginObj => ({
|
||||
name: 'css-to-identity-obj-proxy',
|
||||
|
||||
@ -19,9 +19,9 @@ export const codeFrameColumns: typeof import('../../bundles/babel/node_modules/@
|
||||
export const declare: typeof import('../../bundles/babel/node_modules/@types/babel__helper-plugin-utils').declare = require('./babelBundleImpl').declare;
|
||||
export const types: typeof import('../../bundles/babel/node_modules/@types/babel__core').types = require('./babelBundleImpl').types;
|
||||
export const parse: typeof import('../../bundles/babel/node_modules/@babel/parser/typings/babel-parser').parse = require('./babelBundleImpl').parse;
|
||||
export const traverse: typeof import('@babel/traverse').default = require('./babelBundleImpl').traverse;
|
||||
export const traverse: typeof import('../../bundles/babel/node_modules/@types/babel__traverse').default = require('./babelBundleImpl').traverse;
|
||||
export type BabelPlugin = [string, any?];
|
||||
export type BabelTransformFunction = (code: string, filename: string, isTypeScript: boolean, isModule: boolean, pluginsPrefix: BabelPlugin[], pluginsSuffix: BabelPlugin[]) => BabelFileResult;
|
||||
export const babelTransform: BabelTransformFunction = require('./babelBundleImpl').babelTransform;
|
||||
export type { NodePath, types as T } from '../../bundles/babel/node_modules/@types/babel__core';
|
||||
export type { NodePath, types as T, PluginObj } from '../../bundles/babel/node_modules/@types/babel__core';
|
||||
export type { BabelAPI } from '../../bundles/babel/node_modules/@types/babel__helper-plugin-utils';
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user