@rollup/plugin-replace
Advanced tools
Comparing version 5.0.5 to 5.0.6
@@ -85,5 +85,6 @@ 'use strict'; | ||
var keys = Object.keys(functionValues).sort(longest).map(escape); | ||
var lookahead = preventAssignment ? '(?!\\s*(=[^=]|:[^:]))' : ''; | ||
var lookbehind = preventAssignment ? '(?<!\\b(?:const|let|var)\\s*)' : ''; | ||
var lookahead = preventAssignment ? '(?!\\s*=[^=])' : ''; | ||
var pattern = new RegExp( | ||
((delimiters[0]) + "(" + (keys.join('|')) + ")" + (delimiters[1]) + lookahead), | ||
("" + lookbehind + (delimiters[0]) + "(" + (keys.join('|')) + ")" + (delimiters[1]) + lookahead), | ||
'g' | ||
@@ -90,0 +91,0 @@ ); |
@@ -81,5 +81,6 @@ import MagicString from 'magic-string'; | ||
var keys = Object.keys(functionValues).sort(longest).map(escape); | ||
var lookahead = preventAssignment ? '(?!\\s*(=[^=]|:[^:]))' : ''; | ||
var lookbehind = preventAssignment ? '(?<!\\b(?:const|let|var)\\s*)' : ''; | ||
var lookahead = preventAssignment ? '(?!\\s*=[^=])' : ''; | ||
var pattern = new RegExp( | ||
((delimiters[0]) + "(" + (keys.join('|')) + ")" + (delimiters[1]) + lookahead), | ||
("" + lookbehind + (delimiters[0]) + "(" + (keys.join('|')) + ")" + (delimiters[1]) + lookahead), | ||
'g' | ||
@@ -86,0 +87,0 @@ ); |
{ | ||
"name": "@rollup/plugin-replace", | ||
"version": "5.0.5", | ||
"version": "5.0.6", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -77,5 +77,6 @@ import MagicString from 'magic-string'; | ||
const keys = Object.keys(functionValues).sort(longest).map(escape); | ||
const lookahead = preventAssignment ? '(?!\\s*(=[^=]|:[^:]))' : ''; | ||
const lookbehind = preventAssignment ? '(?<!\\b(?:const|let|var)\\s*)' : ''; | ||
const lookahead = preventAssignment ? '(?!\\s*=[^=])' : ''; | ||
const pattern = new RegExp( | ||
`${delimiters[0]}(${keys.join('|')})${delimiters[1]}${lookahead}`, | ||
`${lookbehind}${delimiters[0]}(${keys.join('|')})${delimiters[1]}${lookahead}`, | ||
'g' | ||
@@ -82,0 +83,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
26196
434