babel-plugin-transform-inline-environment-variables
Advanced tools
Comparing version 0.4.3 to 0.4.4
@@ -6,2 +6,6 @@ "use strict"; | ||
}) { | ||
function isLeftSideOfAssignmentExpression(path) { | ||
return t.isAssignmentExpression(path.parent) && path.parent.left === path.node; | ||
} | ||
return { | ||
@@ -19,3 +23,3 @@ name: "transform-inline-environment-variables", | ||
if (t.isStringLiteral(key) && (!include || include.indexOf(key.value) !== -1) && (!exclude || exclude.indexOf(key.value) === -1)) { | ||
if (t.isStringLiteral(key) && !isLeftSideOfAssignmentExpression(path) && (!include || include.indexOf(key.value) !== -1) && (!exclude || exclude.indexOf(key.value) === -1)) { | ||
path.replaceWith(t.valueToNode(process.env[key.value])); | ||
@@ -22,0 +26,0 @@ } |
{ | ||
"name": "babel-plugin-transform-inline-environment-variables", | ||
"version": "0.4.3", | ||
"version": "0.4.4", | ||
"description": "Inline environment variables.", | ||
@@ -13,3 +13,4 @@ "keywords": [ | ||
"main": "lib/index.js", | ||
"repository": "https://github.com/babel/minify/tree/master/packages/babel-plugin-transform-inline-environment-variables" | ||
"repository": "https://github.com/babel/minify/tree/master/packages/babel-plugin-transform-inline-environment-variables", | ||
"gitHead": "8f9c7c0a32103653bd6793d0ce44730f937e1ddf" | ||
} |
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
3408
4
25
1