@node-minify/uglify-js
Advanced tools
Comparing version 8.0.6 to 9.0.0
@@ -5,3 +5,3 @@ import { MinifierOptions } from '@node-minify/types'; | ||
* node-minify | ||
* Copyright(c) 2011-2023 Rodolphe Stoclin | ||
* Copyright(c) 2011-2024 Rodolphe Stoclin | ||
* MIT Licensed | ||
@@ -11,3 +11,3 @@ */ | ||
declare const minifyUglifyJS: { | ||
({ settings, content, callback, index }: MinifierOptions): string | void; | ||
({ settings, content, callback, index, }: MinifierOptions): string | void; | ||
default: any; | ||
@@ -14,0 +14,0 @@ }; |
@@ -26,5 +26,10 @@ "use strict"; | ||
// src/index.ts | ||
var import_utils = require("@node-minify/utils"); | ||
var import_uglify_js = __toESM(require("uglify-js")); | ||
var import_utils = require("@node-minify/utils"); | ||
var minifyUglifyJS = ({ settings, content, callback, index }) => { | ||
var minifyUglifyJS = ({ | ||
settings, | ||
content, | ||
callback, | ||
index | ||
}) => { | ||
const contentMinified = import_uglify_js.default.minify(content ?? "", settings?.options); | ||
@@ -36,3 +41,3 @@ if (contentMinified.error) { | ||
} | ||
if (contentMinified.map && typeof settings?.options?.sourceMap === "object") { | ||
if (contentMinified.map && typeof settings?.options?.sourceMap === "object" && "filename" in settings.options.sourceMap) { | ||
import_utils.utils.writeFile({ | ||
@@ -45,3 +50,7 @@ file: typeof settings.options.sourceMap.filename === "string" ? settings.options.sourceMap.filename : "", | ||
if (settings && !settings.content && settings.output) { | ||
import_utils.utils.writeFile({ file: settings.output, content: contentMinified.code, index }); | ||
import_utils.utils.writeFile({ | ||
file: settings.output, | ||
content: contentMinified.code, | ||
index | ||
}); | ||
} | ||
@@ -57,5 +66,5 @@ if (callback) { | ||
* node-minify | ||
* Copyright(c) 2011-2023 Rodolphe Stoclin | ||
* Copyright(c) 2011-2024 Rodolphe Stoclin | ||
* MIT Licensed | ||
*/ | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@node-minify/uglify-js", | ||
"version": "8.0.6", | ||
"version": "9.0.0", | ||
"description": "uglify-js plugin for @node-minify", | ||
@@ -15,3 +15,3 @@ "keywords": [ | ||
"engines": { | ||
"node": ">=16.0.0" | ||
"node": ">=18.0.0" | ||
}, | ||
@@ -26,5 +26,7 @@ "directories": { | ||
"exports": { | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts" | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
} | ||
}, | ||
@@ -44,16 +46,18 @@ "files": [ | ||
}, | ||
"scripts": { | ||
"clean": "pnpm dlx rimraf dist", | ||
"build": "pnpm clean && tsup src/index.ts --format cjs,esm --dts --clean --sourcemap", | ||
"prepublishOnly": "pnpm build" | ||
}, | ||
"dependencies": { | ||
"@node-minify/utils": "8.0.6", | ||
"uglify-js": "3.17.4" | ||
"uglify-js": "3.19.3", | ||
"@node-minify/utils": "9.0.0" | ||
}, | ||
"devDependencies": { | ||
"@node-minify/types": "8.0.6", | ||
"@types/uglify-js": "^3.17.1" | ||
"@types/uglify-js": "^3.17.1", | ||
"@node-minify/types": "9.0.0" | ||
}, | ||
"gitHead": "9fb532af458cb6416ecfb7abfb9cc0a3b9cb42e1" | ||
} | ||
"scripts": { | ||
"clean": "pnpm dlx rimraf dist", | ||
"build": "pnpm clean && tsup src/index.ts --format cjs,esm --dts --clean --sourcemap", | ||
"lint": "biome lint .", | ||
"test": "vitest run", | ||
"test:ci": "vitest run --coverage", | ||
"test:watch": "vitest" | ||
} | ||
} |
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
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
13564
125
2
+ Added@node-minify/utils@9.0.0(transitive)
+ Addeduglify-js@3.19.3(transitive)
- Removed@node-minify/utils@8.0.6(transitive)
- Removeduglify-js@3.17.4(transitive)
Updated@node-minify/utils@9.0.0
Updateduglify-js@3.19.3