@babel/plugin-transform-template-literals
Advanced tools
Comparing version 7.12.13 to 7.13.0
@@ -13,8 +13,9 @@ "use strict"; | ||
var _default = (0, _helperPluginUtils.declare)((api, options) => { | ||
var _api$assumption, _api$assumption2; | ||
api.assertVersion(7); | ||
const { | ||
loose | ||
} = options; | ||
const ignoreToPrimitiveHint = (_api$assumption = api.assumption("ignoreToPrimitiveHint")) != null ? _api$assumption : options.loose; | ||
const mutableTemplateObject = (_api$assumption2 = api.assumption("mutableTemplateObject")) != null ? _api$assumption2 : options.loose; | ||
let helperName = "taggedTemplateLiteral"; | ||
if (loose) helperName += "Loose"; | ||
if (mutableTemplateObject) helperName += "Loose"; | ||
@@ -107,5 +108,3 @@ function buildConcatCallExpressions(items) { | ||
const considerSecondNode = !loose || !_core.types.isStringLiteral(nodes[1]); | ||
if (!_core.types.isStringLiteral(nodes[0]) && considerSecondNode) { | ||
if (!_core.types.isStringLiteral(nodes[0]) && !(ignoreToPrimitiveHint && _core.types.isStringLiteral(nodes[1]))) { | ||
nodes.unshift(_core.types.stringLiteral("")); | ||
@@ -116,3 +115,3 @@ } | ||
if (loose) { | ||
if (ignoreToPrimitiveHint) { | ||
for (let i = 1; i < nodes.length; i++) { | ||
@@ -119,0 +118,0 @@ root = _core.types.binaryExpression("+", root, nodes[i]); |
{ | ||
"name": "@babel/plugin-transform-template-literals", | ||
"version": "7.12.13", | ||
"version": "7.13.0", | ||
"description": "Compile ES2015 template literals to ES5", | ||
@@ -16,3 +16,3 @@ "repository": { | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.12.13" | ||
"@babel/helper-plugin-utils": "^7.13.0" | ||
}, | ||
@@ -26,3 +26,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"@babel/core": "7.12.13", | ||
"@babel/core": "7.13.0", | ||
"@babel/helper-plugin-test-runner": "7.12.13" | ||
@@ -29,0 +29,0 @@ }, |
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
6036
102