Skip to content

Problem with null coalescing operator in 2.6.5 release #396

Closed
@herndlm

Description

@herndlm

API Platform version(s) affected: 2.6.5

Description
After upgrading from 2.6.4 to 2.6.5 babel in our API Platform app complained about an unexpected token in node_modules. I think this is because the null coalescing operator from 0084ae3#diff-a510ff3025a65f9208998b879111392bde385c82d36cc828b71881751f5ca191R247 is not correctly transpiled in the latest release.

How to reproduce
Currently only can reproduce it locally by upgrading. Before I create a dedicated repo and so I want to rule out that this is just a very simple mistake in the admin build.

Possible Solution
I don't know enough about babel, but is there more config needed for that? Something related to ES2020 or so maybe?

Additional Context
The exact error is

./node_modules/@api-platform/admin/lib/hydra/dataProvider.js 243:138
Module parse failed: Unexpected token (243:138)
File was processed with these loaders:
 * ./node_modules/react-scripts/node_modules/babel-loader/lib/index.js
You may need an additional loader to handle the result of these loaders.
|     }
| 
>     const extraInformation = ((_params$data = params.data) === null || _params$data === void 0 ? void 0 : _params$data.extraInformation) ?? {};
|     (_params$data2 = params.data) === null || _params$data2 === void 0 ? true : delete _params$data2.extraInformation;
|

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions