chore: bump the babel (#27348)

This commit is contained in:
Pavel Feldman 2023-09-28 17:12:57 -07:00 committed by GitHub
parent 2892467839
commit 4fd2b4adef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 1328 additions and 1336 deletions

View File

@ -15,7 +15,7 @@
*/ */
import path from 'path'; 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 { types, declare, traverse } from 'playwright/lib/transform/babelBundle';
import { resolveImportSpecifierExtension } from 'playwright/lib/util'; import { resolveImportSpecifierExtension } from 'playwright/lib/util';
const t: typeof T = types; const t: typeof T = types;
@ -27,7 +27,7 @@ let componentIdentifiers: Set<T.Identifier>;
export default declare((api: BabelAPI) => { export default declare((api: BabelAPI) => {
api.assertVersion(7); api.assertVersion(7);
const result: babel.PluginObj = { const result: PluginObj = {
name: 'playwright-debug-transform', name: 'playwright-debug-transform',
visitor: { visitor: {
Program(path) { Program(path) {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -9,34 +9,34 @@
"generate-license": "node ../../../../utils/generate_third_party_notice.js" "generate-license": "node ../../../../utils/generate_third_party_notice.js"
}, },
"dependencies": { "dependencies": {
"@babel/code-frame": "^7.18.6", "@babel/code-frame": "^7.22.13",
"@babel/core": "^7.22.8", "@babel/core": "^7.23.0",
"@babel/helper-plugin-utils": "^7.20.2", "@babel/helper-plugin-utils": "^7.22.5",
"@babel/parser": "^7.21.3", "@babel/parser": "^7.23.0",
"@babel/plugin-proposal-class-properties": "^7.18.6", "@babel/plugin-proposal-decorators": "^7.23.0",
"@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/plugin-syntax-async-generators": "^7.8.4", "@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-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.21.2", "@babel/plugin-transform-class-properties": "^7.22.5",
"@babel/plugin-transform-react-jsx": "^7.21.0", "@babel/plugin-transform-class-static-block": "^7.22.11",
"@babel/preset-typescript": "^7.21.0" "@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": { "devDependencies": {
"@types/babel__code-frame": "^7.0.3", "@types/babel__code-frame": "^7.0.3",
"@types/babel__core": "^7.20.0", "@types/babel__core": "^7.20.0",
"@types/babel__helper-plugin-utils": "^7.10.0", "@types/babel__helper-plugin-utils": "^7.10.0",
"@types/babel__traverse": "^7.18.3" "@types/babel__traverse": "^7.20.2"
} }
} }

View File

@ -31,19 +31,19 @@ function babelTransformOptions(isTypeScript: boolean, isModule: boolean, plugins
if (isTypeScript) { if (isTypeScript) {
plugins.push( plugins.push(
[require('@babel/plugin-proposal-decorators'), { version: '2022-03' }], [require('@babel/plugin-proposal-decorators'), { version: '2023-05' }],
[require('@babel/plugin-proposal-class-properties')], [require('@babel/plugin-transform-class-properties')],
[require('@babel/plugin-proposal-class-static-block')], [require('@babel/plugin-transform-class-static-block')],
[require('@babel/plugin-proposal-numeric-separator')], [require('@babel/plugin-transform-numeric-separator')],
[require('@babel/plugin-proposal-logical-assignment-operators')], [require('@babel/plugin-transform-logical-assignment-operators')],
[require('@babel/plugin-proposal-nullish-coalescing-operator')], [require('@babel/plugin-transform-nullish-coalescing-operator')],
[require('@babel/plugin-proposal-optional-chaining')], [require('@babel/plugin-transform-optional-chaining')],
[require('@babel/plugin-proposal-private-methods')], [require('@babel/plugin-transform-private-methods')],
[require('@babel/plugin-syntax-json-strings')], [require('@babel/plugin-syntax-json-strings')],
[require('@babel/plugin-syntax-optional-catch-binding')], [require('@babel/plugin-syntax-optional-catch-binding')],
[require('@babel/plugin-syntax-async-generators')], [require('@babel/plugin-syntax-async-generators')],
[require('@babel/plugin-syntax-object-rest-spread')], [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 // 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) { if (!isModule) {
plugins.push([require('@babel/plugin-transform-modules-commonjs')]); plugins.push([require('@babel/plugin-transform-modules-commonjs')]);
// This converts async imports to require() calls so that we can intercept them with pirates. // 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([ plugins.push([
(): PluginObj => ({ (): PluginObj => ({
name: 'css-to-identity-obj-proxy', name: 'css-to-identity-obj-proxy',

View File

@ -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 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 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 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 BabelPlugin = [string, any?];
export type BabelTransformFunction = (code: string, filename: string, isTypeScript: boolean, isModule: boolean, pluginsPrefix: BabelPlugin[], pluginsSuffix: BabelPlugin[]) => BabelFileResult; export type BabelTransformFunction = (code: string, filename: string, isTypeScript: boolean, isModule: boolean, pluginsPrefix: BabelPlugin[], pluginsSuffix: BabelPlugin[]) => BabelFileResult;
export const babelTransform: BabelTransformFunction = require('./babelBundleImpl').babelTransform; 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'; export type { BabelAPI } from '../../bundles/babel/node_modules/@types/babel__helper-plugin-utils';