Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
@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.0 (2024-07-26)
babel-helpers
, babel-plugin-proposal-explicit-resource-management
, babel-runtime-corejs3
babel-plugin-transform-typescript
babel-helper-create-class-features-plugin
, babel-helper-function-name
, babel-helper-plugin-utils
, babel-helper-wrap-function
, babel-plugin-bugfix-safari-class-field-initializer-scope
, babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression
, babel-plugin-transform-classes
, babel-plugin-transform-function-name
, babel-preset-env
, babel-traverse
, babel-types
ensureFunctionName
to NodePath.prototype
(@nicolo-ribaudo)babel-helper-hoist-variables
, babel-helper-plugin-utils
, babel-plugin-proposal-async-do-expressions
, babel-plugin-transform-modules-systemjs
, babel-traverse
hoistVariables
to Scope.prototype
(@nicolo-ribaudo)babel-helper-create-class-features-plugin
, babel-helper-module-transforms
, babel-helper-plugin-utils
, babel-helper-split-export-declaration
, babel-plugin-transform-classes
, babel-traverse
, babel-types
splitExportDeclaration
to NodePath.prototype
(@nicolo-ribaudo)babel-helper-create-class-features-plugin
, babel-helper-environment-visitor
, babel-helper-module-transforms
, babel-helper-plugin-utils
, babel-helper-remap-async-to-generator
, babel-helper-replace-supers
, babel-plugin-bugfix-firefox-class-in-computed-class-key
, babel-plugin-bugfix-v8-static-class-fields-redefine-readonly
, babel-plugin-transform-async-generator-functions
, babel-plugin-transform-classes
, babel-traverse
environment-visitor
helper into @babel/traverse
(@nicolo-ribaudo)babel-core
, babel-parser
.extra.async
(@nicolo-ribaudo)babel-compat-data
, babel-plugin-bugfix-safari-class-field-initializer-scope
, babel-preset-env
bugfix-safari-class-field-initializer-scope
(@davidtaylorhq)babel-plugin-transform-block-scoping
, babel-traverse
, babel-types
babel-helper-import-to-platform-api
, babel-plugin-proposal-json-modules
uncheckedRequire
option for JSON imports to CJS (@nicolo-ribaudo)babel-helper-transform-fixture-test-runner
, babel-node
babel-node --eval
(@slatereax)babel-compat-data
, babel-helper-create-regexp-features-plugin
, babel-plugin-proposal-duplicate-named-capturing-groups-regex
, babel-plugin-transform-duplicate-named-capturing-groups-regex
, babel-preset-env
, babel-standalone
babel-generator
babel-template
, babel-types
babel-generator
(
before ambiguous tokens (@nicolo-ribaudo)babel-helper-function-name
, babel-plugin-transform-arrow-functions
, babel-plugin-transform-function-name
, babel-preset-env
, babel-traverse
helper-function-name
logic (@nicolo-ribaudo)babel-parser
, babel-plugin-proposal-pipeline-operator
babel-plugin-transform-classes
assertThisInitialized
(@liuxingbaoyu)babel-helper-create-class-features-plugin
, babel-helper-replace-supers
, babel-helpers
, babel-plugin-proposal-decorators
, babel-plugin-transform-class-properties
, babel-plugin-transform-classes
, babel-plugin-transform-exponentiation-operator
, babel-plugin-transform-object-super
, babel-plugin-transform-private-methods
, babel-runtime-corejs2
, babel-runtime-corejs3
, babel-runtime
super.x
output (@liuxingbaoyu)babel-plugin-transform-class-properties
, babel-plugin-transform-classes
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 14,207,379 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.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.