Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@babel/plugin-syntax-optional-catch-binding
Advanced tools
The @babel/plugin-syntax-optional-catch-binding package allows Babel to parse JavaScript code that uses optional catch binding syntax. This syntax feature enables developers to use try/catch blocks without the need to specify an error variable in the catch clause if they don't need access to the error. This can make the code cleaner and more concise in situations where the error is irrelevant.
Optional Catch Binding Syntax
This feature allows developers to use try/catch blocks without having to bind the error object to a variable in the catch block. It's particularly useful when the error object is not used in the catch block.
try {
// code that might throw an error
} catch {
// handle the error without needing to bind it to a variable
}
While not a direct alternative, @babel/preset-env includes support for transforming modern JavaScript syntax, including optional catch binding, to be compatible with older environments. It's a more comprehensive solution that includes the functionality of @babel/plugin-syntax-optional-catch-binding as part of its broader feature set.
TypeScript, a superset of JavaScript, supports optional catch binding syntax natively from version 2.5. While it's a different tool (a language that compiles to JavaScript rather than a Babel plugin), it offers a similar capability in terms of language syntax.
Allow parsing of optional catch bindings
See our website @babel/plugin-syntax-optional-catch-binding for more information.
Using npm:
npm install --save-dev @babel/plugin-syntax-optional-catch-binding
or using yarn:
yarn add @babel/plugin-syntax-optional-catch-binding --dev
FAQs
Allow parsing of optional catch bindings
We found that @babel/plugin-syntax-optional-catch-binding demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.