@locker/rollup-plugin
Advanced tools
Comparing version 0.12.8 to 0.12.9
24
index.js
@@ -29,12 +29,2 @@ 'use strict'; | ||
// prettier-ignore | ||
const toModuleSourceSandboxMapReplacementRegExp = new RegExp( | ||
`^${ | ||
escapeRegExp('.replace(/\\/\\/# sandbox(.*?)$/,') | ||
}(["'])${ | ||
escapeRegExp('//# source$1') | ||
}\\1\\)`, | ||
'gm' | ||
); | ||
module.exports = function lockerRollupPlugin(providedOptions = {}) { | ||
@@ -64,3 +54,3 @@ const clonedOptions = Object.assign({}, providedOptions); | ||
sandboxSpecifier: mergedOptions.sandboxSpecifier, | ||
sourcemap: false, | ||
sourceMap: mergedOptions.sourcemap, | ||
}); | ||
@@ -71,4 +61,8 @@ return { | ||
if ( | ||
// Skip removing source maps if they where not generated. | ||
compilerOptions.sourceMap !== false && | ||
compilerOptions.sourceMap !== 'hidden' && | ||
// Remove source maps if not specified as a plugin option | ||
// which takes precedence over the bundle option. | ||
!mergedOptions.sourcemap && | ||
(!sourcemap || sourcemap === 'hidden') | ||
@@ -78,8 +72,4 @@ ) { | ||
const info = bundle[key]; | ||
info.code = info.code | ||
// Remove inline sandbox source maps. | ||
.replace(inlineSandboxMapRegExp, '') | ||
// Remove sandbox source map pattern replacement in | ||
// `toModuleSource()` helpers. | ||
.replace(toModuleSourceSandboxMapReplacementRegExp, ''); | ||
// Remove inline sandbox source maps. | ||
info.code = info.code.replace(inlineSandboxMapRegExp, ''); | ||
} | ||
@@ -86,0 +76,0 @@ } |
{ | ||
"name": "@locker/rollup-plugin", | ||
"version": "0.12.8", | ||
"version": "0.12.9", | ||
"license": "Salesforce Developer Agreement", | ||
@@ -12,5 +12,5 @@ "author": "Salesforce UI Security Team", | ||
"dependencies": { | ||
"@locker/compiler": "0.12.8", | ||
"@locker/is-module": "0.12.8", | ||
"@locker/shared": "0.12.8", | ||
"@locker/compiler": "0.12.9", | ||
"@locker/is-module": "0.12.9", | ||
"@locker/shared": "0.12.9", | ||
"@rollup/pluginutils": "4.1.0", | ||
@@ -26,3 +26,3 @@ "merge-options": "3.0.4" | ||
}, | ||
"gitHead": "aa188ceecef63cef9542426482fba0e1cca17b00" | ||
"gitHead": "a16f1bc227ac47597ee583717be889c06bee535d" | ||
} |
7653
101
+ Added@locker/ast-lib-maker@0.12.9(transitive)
+ Added@locker/compiler@0.12.9(transitive)
+ Added@locker/is-module@0.12.9(transitive)
+ Added@locker/shared@0.12.9(transitive)
- Removed@locker/ast-lib-maker@0.12.8(transitive)
- Removed@locker/compiler@0.12.8(transitive)
- Removed@locker/is-module@0.12.8(transitive)
- Removed@locker/shared@0.12.8(transitive)
Updated@locker/compiler@0.12.9
Updated@locker/is-module@0.12.9
Updated@locker/shared@0.12.9