Remove no longer needed #__PURE__ annotations for taggedTemplateLiteral helper (#7914)
* Remove pure comment annotation * Update outputs
This commit is contained in:
parent
b87c43d894
commit
040ba2bf53
@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|||||||
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
||||||
|
|
||||||
function _templateObject() {
|
function _templateObject() {
|
||||||
const data = /*#__PURE__*/ (0, _taggedTemplateLiteral2.default)(["foo"]);
|
const data = (0, _taggedTemplateLiteral2.default)(["foo"]);
|
||||||
|
|
||||||
_templateObject = function () {
|
_templateObject = function () {
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@ -5,7 +5,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|||||||
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
||||||
|
|
||||||
function _templateObject() {
|
function _templateObject() {
|
||||||
const data = /*#__PURE__*/ (0, _taggedTemplateLiteral2.default)(["foo"]);
|
const data = (0, _taggedTemplateLiteral2.default)(["foo"]);
|
||||||
|
|
||||||
_templateObject = function () {
|
_templateObject = function () {
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@ -1,5 +1,4 @@
|
|||||||
import { declare } from "@babel/helper-plugin-utils";
|
import { declare } from "@babel/helper-plugin-utils";
|
||||||
import annotateAsPure from "@babel/helper-annotate-as-pure";
|
|
||||||
import { template, types as t } from "@babel/core";
|
import { template, types as t } from "@babel/core";
|
||||||
|
|
||||||
export default declare((api, options) => {
|
export default declare((api, options) => {
|
||||||
@ -83,13 +82,9 @@ export default declare((api, options) => {
|
|||||||
callExpressionInput.push(t.arrayExpression(raws));
|
callExpressionInput.push(t.arrayExpression(raws));
|
||||||
}
|
}
|
||||||
|
|
||||||
const callExpression = t.callExpression(helperId, callExpressionInput);
|
|
||||||
annotateAsPure(callExpression);
|
|
||||||
callExpression._compact = true;
|
|
||||||
|
|
||||||
const lazyLoad = template.ast`
|
const lazyLoad = template.ast`
|
||||||
function ${templateObject}() {
|
function ${templateObject}() {
|
||||||
const data = ${callExpression};
|
const data = ${t.callExpression(helperId, callExpressionInput)};
|
||||||
${templateObject} = function() { return data };
|
${templateObject} = function() { return data };
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
function _templateObject2() {
|
function _templateObject2() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["some template"]);
|
const data = _taggedTemplateLiteral(["some template"]);
|
||||||
|
|
||||||
_templateObject2 = function () {
|
_templateObject2 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -9,7 +9,7 @@ function _templateObject2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject() {
|
function _templateObject() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["some template"]);
|
const data = _taggedTemplateLiteral(["some template"]);
|
||||||
|
|
||||||
_templateObject = function () {
|
_templateObject = function () {
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
function _templateObject2() {
|
function _templateObject2() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["first", "second"]);
|
const data = _taggedTemplateLiteral(["first", "second"]);
|
||||||
|
|
||||||
_templateObject2 = function () {
|
_templateObject2 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -9,7 +9,7 @@ function _templateObject2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject() {
|
function _templateObject() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["wow"]);
|
const data = _taggedTemplateLiteral(["wow"]);
|
||||||
|
|
||||||
_templateObject = function () {
|
_templateObject = function () {
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
function _templateObject3() {
|
function _templateObject3() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["wow\naB", " ", ""], ["wow\\naB", " ", ""]);
|
const data = _taggedTemplateLiteral(["wow\naB", " ", ""], ["wow\\naB", " ", ""]);
|
||||||
|
|
||||||
_templateObject3 = function () {
|
_templateObject3 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -9,7 +9,7 @@ function _templateObject3() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject2() {
|
function _templateObject2() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["wow\nab", " ", ""], ["wow\\nab", " ", ""]);
|
const data = _taggedTemplateLiteral(["wow\nab", " ", ""], ["wow\\nab", " ", ""]);
|
||||||
|
|
||||||
_templateObject2 = function () {
|
_templateObject2 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -19,7 +19,7 @@ function _templateObject2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject() {
|
function _templateObject() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["wow\na", "b ", ""], ["wow\\na", "b ", ""]);
|
const data = _taggedTemplateLiteral(["wow\na", "b ", ""], ["wow\\na", "b ", ""]);
|
||||||
|
|
||||||
_templateObject = function () {
|
_templateObject = function () {
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
function _templateObject8() {
|
function _templateObject8() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral([void 0], ["\\01"]);
|
const data = _taggedTemplateLiteral([void 0], ["\\01"]);
|
||||||
|
|
||||||
_templateObject8 = function () {
|
_templateObject8 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -9,7 +9,7 @@ function _templateObject8() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject7() {
|
function _templateObject7() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["left", void 0, "right"], ["left", "\\u{-0}", "right"]);
|
const data = _taggedTemplateLiteral(["left", void 0, "right"], ["left", "\\u{-0}", "right"]);
|
||||||
|
|
||||||
_templateObject7 = function () {
|
_templateObject7 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -19,7 +19,7 @@ function _templateObject7() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject6() {
|
function _templateObject6() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["left", void 0, "right"], ["left", "\\u000g", "right"]);
|
const data = _taggedTemplateLiteral(["left", void 0, "right"], ["left", "\\u000g", "right"]);
|
||||||
|
|
||||||
_templateObject6 = function () {
|
_templateObject6 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -29,7 +29,7 @@ function _templateObject6() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject5() {
|
function _templateObject5() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["left", void 0, "right"], ["left", "\\xg", "right"]);
|
const data = _taggedTemplateLiteral(["left", void 0, "right"], ["left", "\\xg", "right"]);
|
||||||
|
|
||||||
_templateObject5 = function () {
|
_templateObject5 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -39,7 +39,7 @@ function _templateObject5() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject4() {
|
function _templateObject4() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral(["left", void 0], ["left", "\\xg"]);
|
const data = _taggedTemplateLiteral(["left", void 0], ["left", "\\xg"]);
|
||||||
|
|
||||||
_templateObject4 = function () {
|
_templateObject4 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -49,7 +49,7 @@ function _templateObject4() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject3() {
|
function _templateObject3() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral([void 0, "right"], ["\\xg", "right"]);
|
const data = _taggedTemplateLiteral([void 0, "right"], ["\\xg", "right"]);
|
||||||
|
|
||||||
_templateObject3 = function () {
|
_templateObject3 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -59,7 +59,7 @@ function _templateObject3() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject2() {
|
function _templateObject2() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral([void 0], ["\\01"]);
|
const data = _taggedTemplateLiteral([void 0], ["\\01"]);
|
||||||
|
|
||||||
_templateObject2 = function () {
|
_templateObject2 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -69,7 +69,7 @@ function _templateObject2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject() {
|
function _templateObject() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteral([void 0], ["\\unicode and \\u{55}"]);
|
const data = _taggedTemplateLiteral([void 0], ["\\unicode and \\u{55}"]);
|
||||||
|
|
||||||
_templateObject = function () {
|
_templateObject = function () {
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
function _templateObject3() {
|
function _templateObject3() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose(["wow\naB", " ", ""], ["wow\\naB", " ", ""]);
|
const data = _taggedTemplateLiteralLoose(["wow\naB", " ", ""], ["wow\\naB", " ", ""]);
|
||||||
|
|
||||||
_templateObject3 = function () {
|
_templateObject3 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -9,7 +9,7 @@ function _templateObject3() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject2() {
|
function _templateObject2() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose(["wow\nab", " ", ""], ["wow\\nab", " ", ""]);
|
const data = _taggedTemplateLiteralLoose(["wow\nab", " ", ""], ["wow\\nab", " ", ""]);
|
||||||
|
|
||||||
_templateObject2 = function () {
|
_templateObject2 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -19,7 +19,7 @@ function _templateObject2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject() {
|
function _templateObject() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose(["wow\na", "b ", ""], ["wow\\na", "b ", ""]);
|
const data = _taggedTemplateLiteralLoose(["wow\na", "b ", ""], ["wow\\na", "b ", ""]);
|
||||||
|
|
||||||
_templateObject = function () {
|
_templateObject = function () {
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
function _templateObject8() {
|
function _templateObject8() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose([void 0], ["\\01"]);
|
const data = _taggedTemplateLiteralLoose([void 0], ["\\01"]);
|
||||||
|
|
||||||
_templateObject8 = function () {
|
_templateObject8 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -9,7 +9,7 @@ function _templateObject8() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject7() {
|
function _templateObject7() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose(["left", void 0, "right"], ["left", "\\u{-0}", "right"]);
|
const data = _taggedTemplateLiteralLoose(["left", void 0, "right"], ["left", "\\u{-0}", "right"]);
|
||||||
|
|
||||||
_templateObject7 = function () {
|
_templateObject7 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -19,7 +19,7 @@ function _templateObject7() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject6() {
|
function _templateObject6() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose(["left", void 0, "right"], ["left", "\\u000g", "right"]);
|
const data = _taggedTemplateLiteralLoose(["left", void 0, "right"], ["left", "\\u000g", "right"]);
|
||||||
|
|
||||||
_templateObject6 = function () {
|
_templateObject6 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -29,7 +29,7 @@ function _templateObject6() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject5() {
|
function _templateObject5() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose(["left", void 0, "right"], ["left", "\\xg", "right"]);
|
const data = _taggedTemplateLiteralLoose(["left", void 0, "right"], ["left", "\\xg", "right"]);
|
||||||
|
|
||||||
_templateObject5 = function () {
|
_templateObject5 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -39,7 +39,7 @@ function _templateObject5() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject4() {
|
function _templateObject4() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose(["left", void 0], ["left", "\\xg"]);
|
const data = _taggedTemplateLiteralLoose(["left", void 0], ["left", "\\xg"]);
|
||||||
|
|
||||||
_templateObject4 = function () {
|
_templateObject4 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -49,7 +49,7 @@ function _templateObject4() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject3() {
|
function _templateObject3() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose([void 0, "right"], ["\\xg", "right"]);
|
const data = _taggedTemplateLiteralLoose([void 0, "right"], ["\\xg", "right"]);
|
||||||
|
|
||||||
_templateObject3 = function () {
|
_templateObject3 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -59,7 +59,7 @@ function _templateObject3() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject2() {
|
function _templateObject2() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose([void 0], ["\\01"]);
|
const data = _taggedTemplateLiteralLoose([void 0], ["\\01"]);
|
||||||
|
|
||||||
_templateObject2 = function () {
|
_templateObject2 = function () {
|
||||||
return data;
|
return data;
|
||||||
@ -69,7 +69,7 @@ function _templateObject2() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function _templateObject() {
|
function _templateObject() {
|
||||||
const data = /*#__PURE__*/ _taggedTemplateLiteralLoose([void 0], ["\\unicode and \\u{55}"]);
|
const data = _taggedTemplateLiteralLoose([void 0], ["\\unicode and \\u{55}"]);
|
||||||
|
|
||||||
_templateObject = function () {
|
_templateObject = function () {
|
||||||
return data;
|
return data;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user