🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly

Transform static class fields assignments that are affected by https://crbug.com/v8/12421

7.27.1
latest
Version published
Weekly downloads
18M
11.21%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly?

@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.

What are @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly's main functionalities?

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

Other packages similar to @babel/plugin-bugfix-v8-static-class-fields-redefine-readonly

FAQs

Package last updated on 30 Apr 2025

Did you know?

Socket

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.

Install

Related posts