postcss-minify-params 8.0.3 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -10
- package/src/index.js +9 -10
- package/src/lib/computeBrowsersToSupport.js +10 -12
- package/src/lib/getBrowsersForWebBuild.js +2 -4
- package/types/index.d.ts +28 -2
- package/types/index.d.ts.map +1 -1
- package/types/lib/computeBrowsersToSupport.d.ts +2 -2
- package/types/lib/computeBrowsersToSupport.d.ts.map +1 -1
- package/types/lib/getBrowsersForWebBuild.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-minify-params",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Minify at-rule params with PostCSS",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./types/index.d.ts",
|
|
8
8
|
"default": "./src/index.js"
|
|
9
|
-
}
|
|
10
|
-
"./src": "./src/index.js",
|
|
11
|
-
"./src/index": "./src/index.js",
|
|
12
|
-
"./src/index.js": "./src/index.js",
|
|
13
|
-
"./package.json": "./package.json"
|
|
9
|
+
}
|
|
14
10
|
},
|
|
15
11
|
"imports": {
|
|
16
12
|
"#getBrowsersList": {
|
|
@@ -35,7 +31,7 @@
|
|
|
35
31
|
"license": "MIT",
|
|
36
32
|
"repository": {
|
|
37
33
|
"type": "git",
|
|
38
|
-
"url": "cssnano/cssnano"
|
|
34
|
+
"url": "git+https://github.com/cssnano/cssnano.git"
|
|
39
35
|
},
|
|
40
36
|
"bugs": {
|
|
41
37
|
"url": "https://github.com/cssnano/cssnano/issues"
|
|
@@ -43,11 +39,11 @@
|
|
|
43
39
|
"homepage": "https://github.com/cssnano/cssnano",
|
|
44
40
|
"dependencies": {
|
|
45
41
|
"browserslist": "^4.28.8",
|
|
46
|
-
"
|
|
47
|
-
"
|
|
42
|
+
"cssnano-utils": "^7.0.0",
|
|
43
|
+
"postcss-value-parser": "^4.2.0"
|
|
48
44
|
},
|
|
49
45
|
"engines": {
|
|
50
|
-
"node": "^22.
|
|
46
|
+
"node": "^22.22.3 || ^24.15.0 || >=26.0"
|
|
51
47
|
},
|
|
52
48
|
"devDependencies": {
|
|
53
49
|
"postcss": "^8.5.26"
|
|
@@ -55,6 +51,7 @@
|
|
|
55
51
|
"peerDependencies": {
|
|
56
52
|
"postcss": "^8.5.26"
|
|
57
53
|
},
|
|
54
|
+
"type": "module",
|
|
58
55
|
"scripts": {
|
|
59
56
|
"test": "node --test"
|
|
60
57
|
}
|
package/src/index.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const valueParser = require('postcss-value-parser');
|
|
5
|
-
const { getArguments } = require('cssnano-utils');
|
|
1
|
+
import getBrowsersList from '#getBrowsersList';
|
|
2
|
+
import valueParser from 'postcss-value-parser';
|
|
3
|
+
import cssnanoUtils from 'cssnano-utils';
|
|
6
4
|
|
|
5
|
+
const { getArguments } = cssnanoUtils;
|
|
7
6
|
/** @import browserslist from 'browserslist' */
|
|
8
7
|
|
|
9
8
|
/**
|
|
@@ -157,7 +156,7 @@ function pluginCreator(options = {}) {
|
|
|
157
156
|
const { stats, env, from, file } = result.opts || {};
|
|
158
157
|
const browsers = getBrowsersList(options, stats, from, file, env);
|
|
159
158
|
|
|
160
|
-
const hasAllBug = browsers.
|
|
159
|
+
const hasAllBug = !new Set(browsers).isDisjointFrom(allBugBrowers);
|
|
161
160
|
|
|
162
161
|
return {
|
|
163
162
|
/**
|
|
@@ -170,8 +169,8 @@ function pluginCreator(options = {}) {
|
|
|
170
169
|
},
|
|
171
170
|
};
|
|
172
171
|
}
|
|
173
|
-
|
|
172
|
+
/** @type {true} */
|
|
174
173
|
pluginCreator.postcss = true;
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
174
|
+
const moduleExports = pluginCreator;
|
|
175
|
+
|
|
176
|
+
export { moduleExports as default, moduleExports as 'module.exports' };
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
1
|
+
import { fileURLToPath } from 'node:url';
|
|
2
|
+
import browserslist from 'browserslist';
|
|
3
|
+
import nodepath from 'node:path';
|
|
2
4
|
|
|
3
|
-
const
|
|
4
|
-
const { dirname } = require('node:path');
|
|
5
|
+
const { dirname } = nodepath;
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
*
|
|
@@ -12,16 +13,13 @@ const { dirname } = require('node:path');
|
|
|
12
13
|
* @param {browserslist.Options["env"]} [env]
|
|
13
14
|
* @returns {string[]}
|
|
14
15
|
*/
|
|
15
|
-
|
|
16
|
-
options,
|
|
17
|
-
stats,
|
|
18
|
-
from,
|
|
19
|
-
file,
|
|
20
|
-
env
|
|
21
|
-
) {
|
|
16
|
+
function computeBrowsersToSupport(options, stats, from, file, env) {
|
|
22
17
|
return browserslist(options.overrideBrowserslist, {
|
|
23
18
|
stats: options.stats || stats,
|
|
24
|
-
path:
|
|
19
|
+
path:
|
|
20
|
+
options.path || dirname(from || file || fileURLToPath(import.meta.url)),
|
|
25
21
|
env: options.env || env,
|
|
26
22
|
});
|
|
27
|
-
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default computeBrowsersToSupport;
|
package/types/index.d.ts
CHANGED
|
@@ -1,9 +1,35 @@
|
|
|
1
|
-
declare const _exports: import("postcss").PluginCreator<Options>;
|
|
2
|
-
export = _exports;
|
|
3
1
|
import type browserslist from 'browserslist';
|
|
4
2
|
export type AutoprefixerOptions = {
|
|
5
3
|
overrideBrowserslist?: string | string[];
|
|
6
4
|
};
|
|
7
5
|
export type BrowserslistOptions = Pick<browserslist.Options, 'stats' | 'path' | 'env'>;
|
|
8
6
|
export type Options = AutoprefixerOptions & BrowserslistOptions;
|
|
7
|
+
/**
|
|
8
|
+
* @typedef {{ overrideBrowserslist?: string | string[] }} AutoprefixerOptions
|
|
9
|
+
* @typedef {Pick<browserslist.Options, 'stats' | 'path' | 'env'>} BrowserslistOptions
|
|
10
|
+
* @typedef {AutoprefixerOptions & BrowserslistOptions} Options
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
* @type {import('postcss').PluginCreator<Options>}
|
|
14
|
+
* @param {Options} options
|
|
15
|
+
* @return {import('postcss').Plugin}
|
|
16
|
+
*/
|
|
17
|
+
declare function pluginCreator(options?: {}): {
|
|
18
|
+
postcssPlugin: string;
|
|
19
|
+
/**
|
|
20
|
+
* @param {import('postcss').Result & {opts: BrowserslistOptions & {file?: string}}} result
|
|
21
|
+
*/
|
|
22
|
+
prepare(result: import('postcss').Result & {
|
|
23
|
+
opts: BrowserslistOptions & {
|
|
24
|
+
file?: string;
|
|
25
|
+
};
|
|
26
|
+
}): {
|
|
27
|
+
/**
|
|
28
|
+
* @param {import('postcss').Root} css
|
|
29
|
+
*/
|
|
30
|
+
OnceExit(css: import('postcss').Root): void;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
declare const moduleExports: typeof pluginCreator;
|
|
34
|
+
export { moduleExports as default, moduleExports as 'module.exports' };
|
|
9
35
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":"AAKI,OAAQ,KAAA,YAAY,MAAM,cAAc,CAAA;AAoIzC,YAAwD,mBAAmB,GAAjE;IAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAqB;AAC3E,YAAgE,mBAAmB,GAAzE,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,CAAqB;AACnF,YAAqD,OAAO,GAAlD,mBAAmB,GAAG,mBAAmB,CAAS;AAH/D;;;;GAIG;AAEH;;;;GAIG;AACH,iBAAS,aAAa,CAAC,OAAO,KAAK;IAE/B,aAAa;IAEb;;OAEG;IACH,OAAO,SAFI,OAAO,SAAS,EAAE,MAAM,GAAG;QAAC,IAAI,EAAE,mBAAmB,GAAG;YAAC,IAAI,CAAC,EAAE,MAAM,CAAA;SAAC,CAAA;KAAC;QAS/E;;WAEG;QACH,QAAQ,MAFG,OAAO,SAAS,EAAE,IAAI;;EAQxC;AAGD,QAAA,MAAM,aAAa,sBAAgB,CAAC;AAEpC,OAAO,EAAE,aAAa,IAAI,OAAO,EAAE,aAAa,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import browserslist from 'browserslist';
|
|
2
2
|
/**
|
|
3
3
|
*
|
|
4
4
|
* @param {{overrideBrowserslist?: string | string[] | undefined, stats?: browserslist.Options["stats"], path?: browserslist.Options["path"], env?: browserslist.Options["env"]}} options
|
|
@@ -14,5 +14,5 @@ declare function computeBrowsersToSupport(options: {
|
|
|
14
14
|
path?: browserslist.Options["path"];
|
|
15
15
|
env?: browserslist.Options["env"];
|
|
16
16
|
}, stats: browserslist.Options["stats"], from: string | undefined, file?: string, env?: browserslist.Options["env"]): string[];
|
|
17
|
-
|
|
17
|
+
export default computeBrowsersToSupport;
|
|
18
18
|
//# sourceMappingURL=computeBrowsersToSupport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"computeBrowsersToSupport.d.ts","sourceRoot":"","sources":["../../src/lib/computeBrowsersToSupport.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"computeBrowsersToSupport.d.ts","sourceRoot":"","sources":["../../src/lib/computeBrowsersToSupport.js"],"names":[],"mappings":"AACA,OAAO,YAAY,MAAM,cAAc,CAAC;AAKxC;;;;;;;;GAQG;AACH,iBAAS,wBAAwB,CAAC,OAAO,EAP9B;IAAC,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAAC,IAAI,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAAC,GAAG,CAAC,EAAE,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAA;CAOtI,EAAE,KAAK,EANrC,YAAY,CAAC,OAAO,CAAC,OAAO,CAMS,EAAE,IAAI,EAL3C,MAAM,GAAC,SAKoC,EAAE,IAAI,AAJzD,CACA,EADQ,MAIiD,EAAE,GAAG,AAH9D,CACA,EADQ,YAAY,CAAC,OAAO,CAAC,KAAK,CAG4B,GAFpD,MAAM,EAAE,CASpB;eAEc,wBAAwB"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export
|
|
2
|
-
declare function
|
|
1
|
+
export default _default;
|
|
2
|
+
declare function _default(): string[];
|
|
3
3
|
//# sourceMappingURL=getBrowsersForWebBuild.d.ts.map
|