Research
Recent Trends in Malicious Packages Targeting Discord
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression
Advanced tools
Package description
The @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression package is designed to address a specific bug in Safari related to the collision of variable names in destructuring assignments within function expressions. This plugin works as part of the Babel toolchain to transform affected code into a format that avoids the bug, ensuring compatibility and preventing runtime errors in Safari.
Bug Fix for Safari Destructuring Collision
This code sample demonstrates a scenario where the plugin would transform the function expression to avoid a naming collision that Safari cannot handle. Without the plugin, this code might cause a runtime error in Safari due to the destructuring assignment.
const example = ({ a }) => { const { a: b } = someObject; return a + b; };
Similar in its focus on destructuring assignments, this plugin transforms destructuring patterns to be compatible with older JavaScript engines. While it doesn't target the specific Safari bug, it enhances compatibility of destructuring syntax overall.
Though not a direct counterpart, @babel/preset-env includes various plugins and configurations to ensure code runs smoothly across different environments, potentially including fixes for browser-specific issues like the one @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression addresses.
Changelog
v7.22.15 (2023-09-04)
babel-core
babel-cli
, babel-core
, babel-generator
, babel-helper-builder-binary-assignment-operator-visitor
, babel-helper-compilation-targets
, babel-helper-create-class-features-plugin
, babel-helper-create-regexp-features-plugin
, babel-helper-member-expression-to-functions
, babel-helper-module-imports
, babel-helper-module-transforms
, babel-helper-transform-fixture-test-runner
, babel-helper-validator-identifier
, babel-helper-validator-option
, babel-helpers
, babel-node
, babel-parser
, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression
, babel-plugin-bugfix-v8-spread-parameters-in-optional-chaining
, babel-plugin-proposal-decorators
, babel-plugin-proposal-destructuring-private
, babel-plugin-proposal-pipeline-operator
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-block-scoping
, babel-plugin-transform-classes
, babel-plugin-transform-destructuring
, babel-plugin-transform-for-of
, babel-plugin-transform-modules-commonjs
, babel-plugin-transform-object-rest-spread
, babel-plugin-transform-optional-chaining
, babel-plugin-transform-parameters
, babel-plugin-transform-property-mutators
, babel-plugin-transform-react-jsx
, babel-plugin-transform-runtime
, babel-plugin-transform-typescript
, babel-preset-env
, babel-preset-flow
, babel-preset-react
, babel-preset-typescript
, babel-register
, babel-standalone
, babel-template
, babel-traverse
, babel-types
.ts
/.js
extension to all imports in src
(@nicolo-ribaudo)Readme
Rename destructuring parameter to workaround https://bugs.webkit.org/show_bug.cgi?id=220517
See our website @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression for more information.
Using npm:
npm install --save-dev @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression
or using yarn:
yarn add @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression --dev
FAQs
Rename destructuring parameter to workaround https://bugs.webkit.org/show_bug.cgi?id=220517
We found that @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
The Socket research team breaks down a sampling of malicious packages that download and execute files, among other suspicious behaviors, targeting the popular Discord platform.
Security News
Socket CEO Feross Aboukhadijeh joins a16z partners to discuss how modern, sophisticated supply chain attacks require AI-driven defenses and explore the challenges and solutions in leveraging AI for threat detection early in the development life cycle.
Security News
NIST's new AI Risk Management Framework aims to enhance the security and reliability of generative AI systems and address the unique challenges of malicious AI exploits.