Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@node-minify/uglify-js

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-minify/uglify-js - npm Package Compare versions

Comparing version 8.0.6 to 9.0.0

dist/index.d.mts

4

dist/index.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc