Deprecated babel plugins

npm install @web3auth/react-native-sdk

npm WARN deprecated @babel/plugin-proposal-optional-catch-binding@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.

npm WARN deprecated @babel/plugin-proposal-nullish-coalescing-operator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.

npm WARN deprecated @babel/plugin-proposal-numeric-separator@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.

npm WARN deprecated @babel/plugin-proposal-class-properties@7.18.6: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.

npm WARN deprecated @babel/plugin-proposal-optional-chaining@7.21.0: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.

npm WARN deprecated @babel/plugin-proposal-async-generator-functions@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.

npm WARN deprecated @babel/plugin-proposal-object-rest-spread@7.20.7: This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.

What to do in regards to the above?

@Trueman Thanks for your feedback.

Your request is under review by our team and will get back with an update.

Hello @Trueman ,

It’s important to note that the warnings you’re seeing are just that—warnings. They can safely be ignored without hindering the usual behavior of your application. These warnings indicate that certain Babel plugins are deprecated because their functionalities have been adopted into the official ECMAScript standard.

However, if you prefer to resolve these warnings, you can do so by updating or replacing the deprecated plugins with their recommended alternatives. For example:

  • To address the warning for @babel/plugin-proposal-optional-catch-binding, replace it with @babel/plugin-transform-optional-catch-binding by running:

    npm uninstall @babel/plugin-proposal-optional-catch-binding
    npm install @babel/plugin-transform-optional-catch-binding
    
  • Similarly, for @babel/plugin-proposal-nullish-coalescing-operator, switch to @babel/plugin-transform-nullish-coalescing-operator.

After updating the plugins, ensure to adjust your .babelrc or babel.config.js configuration to reflect these changes. For instance:

{
  "plugins": [
    "@babel/plugin-transform-optional-catch-binding",
    "@babel/plugin-transform-nullish-coalescing-operator"
    // Add other updated plugins here
  ]
}

If some of these deprecated plugins are being pulled in as indirect dependencies from other packages, the resolution might involve waiting for those packages to update their dependencies.

In summary, while you can ignore these warnings without affecting your application, following the steps above for each deprecated plugin will help keep your project up to date.

1 Like