Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-define

Package Overview
Dependencies
Maintainers
21
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-define - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

6

CHANGELOG.md
# Changelog
## 2.1.3
### Patch Changes
- Addresses #85, avoids replacing object keys. ([#86](https://github.com/FormidableLabs/babel-plugin-transform-define/pull/86))
## 2.1.2

@@ -4,0 +10,0 @@

11

lib/index.js

@@ -95,5 +95,10 @@ "use strict";

// Don't transform import idenifiers. This is meant to mimic webpack's
// DefinePlugin behavior.
if (binding || isImportIdentifier(nodePath)) {
if (
binding
// Don't transform import identifiers. This is meant to mimic webpack's
// DefinePlugin behavior.
|| isImportIdentifier(nodePath)
// Do not transform Object keys unless they are computed like {[key]: value}
|| nodePath.key === "key" && nodePath.parent.computed === false
) {
return;

@@ -100,0 +105,0 @@ }

{
"name": "babel-plugin-transform-define",
"description": "Babel plugin that replaces member expressions and typeof statements with strings",
"version": "2.1.2",
"version": "2.1.3",
"contributors": [

@@ -6,0 +6,0 @@ "Eric Baer <me@ericbaer.com> (https://github.com/baer)",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc