Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: tsSatisfiesExpression check with different duplicated @babel/types versions #15121

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/babel-plugin-transform-typescript/src/index.ts
@@ -1,6 +1,6 @@
import { declare } from "@babel/helper-plugin-utils";
import syntaxTypeScript from "@babel/plugin-syntax-typescript";
import { types as t, template } from "@babel/core";
import type { types as t } from "@babel/core";
import { injectInitialization } from "@babel/helper-create-class-features-plugin";
import type { Binding, NodePath, Scope } from "@babel/traverse";
import type { Options as SyntaxOptions } from "@babel/plugin-syntax-typescript";
Expand Down Expand Up @@ -96,6 +96,10 @@ type ExtraNodeProps = {
};

export default declare((api, opts: Options) => {
// Some downstream bundled `@babel/core` and `@babel/types`.
liuxingbaoyu marked this conversation as resolved.
Show resolved Hide resolved
// Ref: https://github.com/babel/babel/issues/15089
const { types: t, template } = api;

api.assertVersion(7);

const JSX_PRAGMA_REGEX = /\*?\s*@jsx((?:Frag)?)\s+([^\s]+)/;
Expand Down