@babel/preset-env 7.21.4 introduces several updates and refinements compared to version 7.20.2, primarily focusing on targeted JavaScript transformations for modern environments. A key difference lies in the updated dependencies: notably, @babel/types, @babel/compat-data, @babel/helper-compilation-targets, @babel/plugin-transform-parameters, @babel/plugin-transform-block-scoping, @babel/plugin-proposal-optional-chaining,@babel/plugin-proposal-class-static-block , and @babel/plugin-proposal-private-property-in-object are bumped to newer versions. These updates ensure better compatibility with the latest JavaScript features and improved accuracy in determining necessary polyfills and transformations based on the target environment specified.
Furthermore, some bug fixes and refinements have been incorporated, for example in @babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining. Developers will appreciate the refinements around accurate target environment detection that enhances the efficiency of the generated code, reducing bundle sizes and improving runtime performance. By staying current with the latest ECMAScript standards and browser capabilities, @babel/preset-env 7.21.4 helps developers write modern JavaScript without worrying about compatibility issues, ensuring their code runs smoothly across a wide range of browsers and environments. The newer version also includes some upgrades in the bundled dev dependencies, for example babel-core and babel-traverse.
The are not vulnerabilities for the version 7.21.4 of the package @babel/preset-env