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-class-properties
Advanced tools
The @babel/plugin-syntax-class-properties npm package allows Babel to parse class properties, enabling developers to use class properties syntax in JavaScript. This plugin is purely syntactical and does not apply any transformations. It is often used in conjunction with transformation plugins to compile class properties to a format compatible with older JavaScript engines.
Class Properties Syntax
Enables the use of static and instance class properties directly within class declarations. This syntax is part of the ECMAScript proposal and allows for clearer and more concise class definitions.
class MyClass {
static myStaticProp = 42;
myInstanceProp = 'hello';
}
This package not only allows Babel to parse class properties but also transforms them so they can run in environments that do not support this feature natively. It is more comprehensive compared to @babel/plugin-syntax-class-properties, which only enables parsing.
While not exclusively focused on class properties, this Babel preset includes capabilities to transform class properties based on the target environment. It is a broader tool that configures Babel plugins and polyfills according to the target browsers or runtime environments.
Allow parsing of class properties.
npm install --save-dev @babel/plugin-syntax-class-properties
.babelrc
(Recommended).babelrc
{
"plugins": ["@babel/plugin-syntax-class-properties"]
}
babel --plugins @babel/plugin-syntax-class-properties script.js
require("@babel/core").transform("code", {
plugins: ["@babel/plugin-syntax-class-properties"]
});
FAQs
Allow parsing of class properties
The npm package @babel/plugin-syntax-class-properties receives a total of 9,991,883 weekly downloads. As such, @babel/plugin-syntax-class-properties popularity was classified as popular.
We found that @babel/plugin-syntax-class-properties 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.