@contrast/rewriter
Advanced tools
Comparing version 1.7.1 to 1.7.2
@@ -21,11 +21,3 @@ /* | ||
const { Cache } = require('./cache'); | ||
const INJECTION_FIXES = [ | ||
// assigning to global breaks things like `"string".constructor === global.String` | ||
{ search: 'global.Function = global.ContrastMethods.Function', replace: 'var Function = global.ContrastMethods?.Function' }, | ||
{ search: 'global.Number = global.ContrastMethods.Number', replace: 'var Number = global.ContrastMethods?.Number' }, | ||
{ search: 'global.Object = global.ContrastMethods.Object', replace: 'var Object = global.ContrastMethods?.Object' }, | ||
{ search: 'global.String = global.ContrastMethods.String', replace: 'var String = global.ContrastMethods?.String' }, | ||
]; | ||
/** | ||
@@ -177,8 +169,2 @@ * @typedef {Object} Core | ||
for (const { search, replace } of INJECTION_FIXES) { | ||
if (result.code.indexOf(search) >= 0) { | ||
result.code = result.code.replace(search, replace); | ||
} | ||
} | ||
return result; | ||
@@ -207,8 +193,2 @@ } | ||
for (const { search, replace } of INJECTION_FIXES) { | ||
if (result.code.indexOf(search) >= 0) { | ||
result.code = result.code.replace(search, replace); | ||
} | ||
} | ||
return result; | ||
@@ -215,0 +195,0 @@ } |
{ | ||
"name": "@contrast/rewriter", | ||
"version": "1.7.1", | ||
"version": "1.7.2", | ||
"description": "A transpilation tool mainly used for instrumentation", | ||
@@ -17,4 +17,4 @@ "license": "SEE LICENSE IN LICENSE", | ||
"dependencies": { | ||
"@contrast/agent-swc-plugin": "1.3.0", | ||
"@contrast/agent-swc-plugin-unwrite": "1.3.0", | ||
"@contrast/agent-swc-plugin": "1.5.0", | ||
"@contrast/agent-swc-plugin-unwrite": "1.5.0", | ||
"@contrast/common": "1.20.1", | ||
@@ -21,0 +21,0 @@ "@contrast/synchronous-source-maps": "^1.1.3", |
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
17355
473
+ Added@contrast/agent-swc-plugin@1.5.0(transitive)
+ Added@contrast/agent-swc-plugin-unwrite@1.5.0(transitive)
- Removed@contrast/agent-swc-plugin@1.3.0(transitive)
- Removed@contrast/agent-swc-plugin-unwrite@1.3.0(transitive)