@node-minify/uglify-js
Advanced tools
Comparing version 8.0.5 to 8.0.6
@@ -29,3 +29,3 @@ "use strict"; | ||
var minifyUglifyJS = ({ settings, content, callback, index }) => { | ||
const contentMinified = import_uglify_js.default.minify(typeof content === "string" ? content : "", settings && settings.options); | ||
const contentMinified = import_uglify_js.default.minify(content ?? "", settings?.options); | ||
if (contentMinified.error) { | ||
@@ -36,4 +36,8 @@ if (callback) { | ||
} | ||
if (contentMinified.map && settings && typeof settings.options.sourceMap === "object") { | ||
import_utils.utils.writeFile({ file: settings.options.sourceMap.filename, content: contentMinified.map, index }); | ||
if (contentMinified.map && typeof settings?.options?.sourceMap === "object") { | ||
import_utils.utils.writeFile({ | ||
file: typeof settings.options.sourceMap.filename === "string" ? settings.options.sourceMap.filename : "", | ||
content: contentMinified.map, | ||
index | ||
}); | ||
} | ||
@@ -40,0 +44,0 @@ if (settings && !settings.content && settings.output) { |
@@ -1,2 +0,2 @@ | ||
import { MinifierOptions, Settings, Options } from '@node-minify/types'; | ||
import { MinifierOptions } from '@node-minify/types'; | ||
@@ -9,15 +9,4 @@ /*! | ||
interface OptionsUglifyJS extends Omit<Options, 'sourceMap'> { | ||
sourceMap?: { | ||
filename: string; | ||
}; | ||
} | ||
interface SettingsUglifyJS extends Omit<Settings, 'options'> { | ||
options: OptionsUglifyJS; | ||
} | ||
interface MinifierOptionsUglifyJS extends Omit<MinifierOptions, 'settings'> { | ||
settings: SettingsUglifyJS; | ||
} | ||
declare const minifyUglifyJS: { | ||
({ settings, content, callback, index }: MinifierOptionsUglifyJS): string | void; | ||
({ settings, content, callback, index }: MinifierOptions): string | void; | ||
default: any; | ||
@@ -24,0 +13,0 @@ }; |
@@ -29,3 +29,3 @@ "use strict"; | ||
var minifyUglifyJS = ({ settings, content, callback, index }) => { | ||
const contentMinified = import_uglify_js.default.minify(typeof content === "string" ? content : "", settings && settings.options); | ||
const contentMinified = import_uglify_js.default.minify(content ?? "", settings?.options); | ||
if (contentMinified.error) { | ||
@@ -36,4 +36,8 @@ if (callback) { | ||
} | ||
if (contentMinified.map && settings && typeof settings.options.sourceMap === "object") { | ||
import_utils.utils.writeFile({ file: settings.options.sourceMap.filename, content: contentMinified.map, index }); | ||
if (contentMinified.map && typeof settings?.options?.sourceMap === "object") { | ||
import_utils.utils.writeFile({ | ||
file: typeof settings.options.sourceMap.filename === "string" ? settings.options.sourceMap.filename : "", | ||
content: contentMinified.map, | ||
index | ||
}); | ||
} | ||
@@ -40,0 +44,0 @@ if (settings && !settings.content && settings.output) { |
{ | ||
"name": "@node-minify/uglify-js", | ||
"version": "8.0.5", | ||
"version": "8.0.6", | ||
"description": "uglify-js plugin for @node-minify", | ||
@@ -48,10 +48,10 @@ "keywords": [ | ||
"dependencies": { | ||
"@node-minify/utils": "8.0.5", | ||
"@node-minify/utils": "8.0.6", | ||
"uglify-js": "3.17.4" | ||
}, | ||
"devDependencies": { | ||
"@node-minify/types": "8.0.5", | ||
"@node-minify/types": "8.0.6", | ||
"@types/uglify-js": "^3.17.1" | ||
}, | ||
"gitHead": "920590d417916e54464d9967e0dceb8b6bb9a784" | ||
"gitHead": "9fb532af458cb6416ecfb7abfb9cc0a3b9cb42e1" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
162
14470
+ Added@node-minify/utils@8.0.6(transitive)
- Removed@node-minify/utils@8.0.5(transitive)
Updated@node-minify/utils@8.0.6