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

@node-minify/clean-css

Package Overview
Dependencies
Maintainers
0
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@node-minify/clean-css - 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 minifyCleanCSS: {
({ 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_clean_css = __toESM(require("clean-css"));
var import_utils = require("@node-minify/utils");
var minifyCleanCSS = ({ settings, content, callback, index }) => {
var minifyCleanCSS = ({
settings,
content,
callback,
index
}) => {
if (settings?.options?.sourceMap) {

@@ -34,5 +39,7 @@ settings.options._sourceMap = settings.options.sourceMap;

}
const _cleanCSS = new import_clean_css.default(settings && { returnPromise: false, ...settings.options }).minify(content ?? "");
const _cleanCSS = new import_clean_css.default(
settings && { returnPromise: false, ...settings.options }
).minify(content ?? "");
const contentMinified = _cleanCSS.styles;
if (_cleanCSS.sourceMap && typeof settings?.options?._sourceMap === "object") {
if (_cleanCSS.sourceMap && typeof settings?.options?._sourceMap === "object" && "url" in settings.options._sourceMap) {
import_utils.utils.writeFile({

@@ -45,3 +52,7 @@ file: typeof settings.options._sourceMap.url === "string" ? settings.options._sourceMap.url : "",

if (settings && !settings.content && settings.output) {
settings.output && import_utils.utils.writeFile({ file: settings.output, content: contentMinified, index });
settings.output && import_utils.utils.writeFile({
file: settings.output,
content: contentMinified,
index
});
}

@@ -57,5 +68,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/clean-css",
"version": "8.0.6",
"version": "9.0.0",
"description": "clean-css 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",
"clean-css": "5.3.2"
"clean-css": "5.3.3",
"@node-minify/utils": "9.0.0"
},
"devDependencies": {
"@node-minify/types": "8.0.6",
"@types/clean-css": "^4.2.6"
"@types/clean-css": "^4.2.6",
"@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