Skip to content

[Bug]: @babel/types TypeScript error after v7.24.8 publication #16637

@biffgaut

Description

@biffgaut

💻

  • Would you like to work on a fix?

How are you using Babel?

Other (Next.js, Gatsby, vue-cli, ...)

Input code

// I don't have code to replicate the issue extracted from our app yet, but was asked to go ahead and open this anyway. I'm
// working on isolating the issue and will update this when I have something.

// The issue is that all our builds (local and CI/CD) started failing upon the publication of the new version with:

our-stuff/core: ../../../node_modules/@babel/types/lib/index.d.ts:971:16 - error TS1005: ']' expected.
our-stuff/core: 971     [N in Node as N["type"]]?: (keyof N)[];
our-stuff/core:                    ~~
our-stuff/core: ../../../node_modules/@babel/types/lib/index.d.ts:971:19 - error TS1005: ';' expected.
our-stuff/core: 971     [N in Node as N["type"]]?: (keyof N)[];
our-stuff/core:                       ~
our-stuff/core: ../../../node_modules/@babel/types/lib/index.d.ts:971:28 - error TS1005: ';' expected.
our-stuff/core: 971     [N in Node as N["type"]]?: (keyof N)[];
our-stuff/core:                                ~
our-stuff/core: ../../../node_modules/@babel/types/lib/index.d.ts:971:29 - error TS1128: Declaration or statement expected.
our-stuff/core: 971     [N in Node as N["type"]]?: (keyof N)[];
our-stuff/core:                                 ~
our-stuff/core: ../../../node_modules/@babel/types/lib/index.d.ts:971:30 - error TS1128: Declaration or statement expected.
our-stuff/core: 971     [N in Node as N["type"]]?: (keyof N)[];
our-stuff/core:                                  ~
our-stuff/core: ../../../node_modules/@babel/types/lib/index.d.ts:971:39 - error TS1005: ')' expected.
our-stuff/core: 971     [N in Node as N["type"]]?: (keyof N)[];
our-stuff/core:                                           ~
our-stuff/core: ../../../node_modules/@babel/types/lib/index.d.ts:971:40 - error TS1005: ';' expected.
our-stuff/core: 971     [N in Node as N["type"]]?: (keyof N)[];
our-stuff/core:                                            ~
our-stuff/core: ../../../node_modules/@babel/types/lib/index.d.ts:972:1 - error TS1128: Declaration or statement expected.
our-stuff/core: 972 };

@babel is included in our app through a dependency of jest v27.5.1

Configuration file name

package.json

Configuration

No response

Current and expected behavior

Same build process and codebase that built the morning of 7/11 started failing after the new release.

Environment

Jest v27.5.1 includes @babel

Possible solution

No response

Additional context

I realize this is premature and incomplete, but was asked to open it here. I'm still working on further clarification.

Metadata

Metadata

Assignees

No one assigned

    Labels

    i: regressionoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions