babel-plugin-transform-define
Advanced tools
Comparing version 2.1.2 to 2.1.3
# 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 @@ |
@@ -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)", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
13603
112
0