@node-minify/clean-css
Advanced tools
Comparing version 9.0.1 to 10.0.0-next.0
@@ -15,1 +15,2 @@ import { MinifierOptions } from '@node-minify/types'; | ||
export { minifyCleanCSS as default }; | ||
export = minifyCleanCSS |
@@ -1,28 +0,4 @@ | ||
"use strict"; | ||
var __create = Object.create; | ||
var __defProp = Object.defineProperty; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
var __getProtoOf = Object.getPrototypeOf; | ||
var __hasOwnProp = Object.prototype.hasOwnProperty; | ||
var __copyProps = (to, from, except, desc) => { | ||
if (from && typeof from === "object" || typeof from === "function") { | ||
for (let key of __getOwnPropNames(from)) | ||
if (!__hasOwnProp.call(to, key) && key !== except) | ||
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); | ||
} | ||
return to; | ||
}; | ||
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( | ||
// If the importer is in node compatibility mode or this is not an ESM | ||
// file that has been converted to a CommonJS file using a Babel- | ||
// compatible transform (i.e. "__esModule" has not been set), then set | ||
// "default" to the CommonJS "module.exports" for node compatibility. | ||
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, | ||
mod | ||
)); | ||
// src/index.ts | ||
var import_utils = require("@node-minify/utils"); | ||
var import_clean_css = __toESM(require("clean-css")); | ||
import { utils } from "@node-minify/utils"; | ||
import CleanCSS from "clean-css"; | ||
var minifyCleanCSS = ({ | ||
@@ -38,3 +14,3 @@ settings, | ||
} | ||
const _cleanCSS = new import_clean_css.default( | ||
const _cleanCSS = new CleanCSS( | ||
settings && { returnPromise: false, ...settings.options } | ||
@@ -44,3 +20,3 @@ ).minify(content ?? ""); | ||
if (_cleanCSS.sourceMap && typeof settings?.options?._sourceMap === "object" && "url" in settings.options._sourceMap) { | ||
import_utils.utils.writeFile({ | ||
utils.writeFile({ | ||
file: typeof settings.options._sourceMap.url === "string" ? settings.options._sourceMap.url : "", | ||
@@ -52,3 +28,3 @@ content: _cleanCSS.sourceMap.toString(), | ||
if (settings && !settings.content && settings.output) { | ||
settings.output && import_utils.utils.writeFile({ | ||
settings.output && utils.writeFile({ | ||
file: settings.output, | ||
@@ -65,3 +41,6 @@ content: contentMinified, | ||
minifyCleanCSS.default = minifyCleanCSS; | ||
module.exports = minifyCleanCSS; | ||
var src_default = minifyCleanCSS; | ||
export { | ||
src_default as default | ||
}; | ||
/*! | ||
@@ -72,2 +51,1 @@ * node-minify | ||
*/ | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@node-minify/clean-css", | ||
"version": "9.0.1", | ||
"version": "10.0.0-next.0", | ||
"description": "clean-css plugin for @node-minify", | ||
@@ -12,6 +12,7 @@ "keywords": [ | ||
"author": "Rodolphe Stoclin <srodolphe@gmail.com>", | ||
"homepage": "https://github.com/srod/node-minify/tree/master/packages/clean-css#readme", | ||
"homepage": "https://github.com/srod/node-minify/tree/main/packages/clean-css#readme", | ||
"license": "MIT", | ||
"type": "module", | ||
"engines": { | ||
"node": ">=18.0.0" | ||
"node": ">=22.0.0" | ||
}, | ||
@@ -22,10 +23,9 @@ "directories": { | ||
}, | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"main": "./dist/index.cjs", | ||
"module": "./dist/index.js", | ||
"exports": { | ||
"./package.json": "./package.json", | ||
".": { | ||
"types": "./dist/index.d.ts", | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.js" | ||
"import": "./dist/index.js", | ||
"require": "./dist/index.cjs" | ||
} | ||
@@ -46,18 +46,20 @@ }, | ||
}, | ||
"dependencies": { | ||
"clean-css": "5.3.3", | ||
"@node-minify/utils": "9.0.1" | ||
}, | ||
"devDependencies": { | ||
"@types/clean-css": "^4.2.6", | ||
"@node-minify/types": "9.0.0" | ||
}, | ||
"scripts": { | ||
"clean": "pnpm dlx rimraf dist", | ||
"build": "pnpm clean && tsup src/index.ts --format cjs,esm --dts --clean --sourcemap", | ||
"build": "tsup src/index.ts --format cjs,esm --dts --clean && bunx fix-tsup-cjs", | ||
"check-exports": "attw --pack .", | ||
"format:check": "biome check .", | ||
"lint": "biome lint .", | ||
"prepublishOnly": "bun run build", | ||
"test": "vitest run", | ||
"test:ci": "vitest run --coverage", | ||
"test:watch": "vitest" | ||
}, | ||
"dependencies": { | ||
"@node-minify/utils": "workspace:*", | ||
"clean-css": "5.3.3" | ||
}, | ||
"devDependencies": { | ||
"@node-minify/types": "workspace:*", | ||
"@types/clean-css": "^4.2.11" | ||
} | ||
} | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
139
Yes
8960
7
1
1
- Removed@node-minify/utils@9.0.1(transitive)
- Removedduplexer@0.1.2(transitive)
- Removedgzip-size@6.0.0(transitive)