Comparing version 0.2.0 to 0.2.1
{ | ||
"name": "code-red", | ||
"description": "code-red", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"repository": "Rich-Harris/code-red", | ||
@@ -6,0 +6,0 @@ "main": "dist/code-red.cjs", |
@@ -177,3 +177,9 @@ import * as acorn from 'acorn'; | ||
re.lastIndex = 0; | ||
node.value = node.value.replace(re, (m, i) => +i in values ? values[+i] : m); | ||
const new_value = node.value.replace(re, (m, i) => +i in values ? values[+i] : m); | ||
const has_changed = new_value !== node.value; | ||
node.value = new_value; | ||
if (has_changed && node.raw) { | ||
// preserve the quotes | ||
node.raw = `${node.raw[0]}${JSON.stringify(node.value).slice(1, -1)}${node.raw[node.raw.length - 1]}`; | ||
} | ||
} | ||
@@ -180,0 +186,0 @@ } |
Sorry, the diff of this file is not supported yet
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
4129
0
136591
14