Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly
Advanced tools
Transform static class fields assignments that are affected by https://crbug.com/v8/12421
@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly is a Babel plugin designed to address a specific bug in V8 (the JavaScript engine used in Chrome and Node.js) related to static class fields. This plugin ensures that static class fields are correctly redefined as readonly, preventing unexpected behavior in JavaScript code.
Fix V8 static class fields bug
This feature ensures that static class fields in JavaScript are correctly treated as readonly, preventing them from being reassigned. The plugin modifies the behavior of static class fields to align with the expected behavior in V8.
class MyClass {
static myField = 42;
}
MyClass.myField = 100; // This will not change the value of myField due to the plugin
This Babel plugin allows you to use class properties in your JavaScript code. While it does not specifically address the V8 bug related to static class fields, it provides a broader set of features for working with class properties, both static and instance.
This plugin transforms ES6 classes to ES5, ensuring compatibility with older JavaScript environments. It does not specifically address the V8 static class fields bug but provides a comprehensive solution for transforming modern class syntax.
Transform static class fields assignments that are affected by https://crbug.com/v8/12421
See our website @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly for more information.
Using npm:
npm install --save-dev @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly
or using yarn:
yarn add @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly --dev
v7.25.9 (2024-10-22)
babel-parser
, babel-template
, babel-types
syntacticPlaceholders
mode (@liuxingbaoyu)babel-helper-compilation-targets
, babel-preset-env
ClassAccessorProperty
to prevent the no-undef
rule (@victorenator)babel-parser
, babel-types
VISITOR_KEYS
etc. faster to access (@liuxingbaoyu)FAQs
Transform static class fields assignments that are affected by https://crbug.com/v8/12421
The npm package @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly receives a total of 9,367,976 weekly downloads. As such, @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly popularity was classified as popular.
We found that @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly 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.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.