postcss-minify-gradients 8.0.2 → 8.0.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "postcss-minify-gradients",
3
- "version": "8.0.2",
3
+ "version": "8.0.4",
4
4
  "description": "Minify gradient parameters with PostCSS.",
5
5
  "exports": {
6
6
  ".": {
@@ -31,12 +31,12 @@
31
31
  },
32
32
  "repository": {
33
33
  "type": "git",
34
- "url": "cssnano/cssnano"
34
+ "url": "git+https://github.com/cssnano/cssnano.git"
35
35
  },
36
36
  "dependencies": {
37
37
  "@colordx/core": "^5.5.0",
38
38
  "postcss-value-parser": "^4.2.0",
39
- "cssnano-utils": "^6.0.2"
39
+ "cssnano-utils": "^6.0.4"
40
40
  },
41
41
  "bugs": {
42
42
  "url": "https://github.com/cssnano/cssnano/issues"
@@ -45,9 +45,12 @@
45
45
  "node": "^22.11.0 || ^24.11.0 || >=26.0"
46
46
  },
47
47
  "devDependencies": {
48
- "postcss": "^8.5.25"
48
+ "postcss": "^8.5.26"
49
49
  },
50
50
  "peerDependencies": {
51
- "postcss": "^8.5.25"
51
+ "postcss": "^8.5.26"
52
+ },
53
+ "scripts": {
54
+ "test": "node --test"
52
55
  }
53
56
  }
package/src/index.js CHANGED
@@ -20,7 +20,7 @@ const directionsToAngles = new Map([
20
20
  function isLessThan(a, b) {
21
21
  return (
22
22
  a.unit.toLowerCase() === b.unit.toLowerCase() &&
23
- parseFloat(a.number) >= parseFloat(b.number)
23
+ Number.parseFloat(a.number) >= Number.parseFloat(b.number)
24
24
  );
25
25
  }
26
26
 
@@ -242,6 +242,7 @@ function optimise(decl) {
242
242
  ) {
243
243
  return optimizeWebkitRadialGradient(node);
244
244
  }
245
+ return false;
245
246
  })
246
247
  .toString();
247
248
  }
@@ -4,7 +4,14 @@ const { colordx: colord, extend } = require('@colordx/core');
4
4
  const hwbPlugin = require('@colordx/core/plugins/hwb');
5
5
  const namesPlugin = require('@colordx/core/plugins/names');
6
6
 
7
- extend([/** @type {any} */ (hwbPlugin), /** @type {any} */ (namesPlugin)]);
7
+ extend([
8
+ /** @type {import('@colordx/core').Plugin} */ (
9
+ /** @type {unknown} */ (hwbPlugin)
10
+ ),
11
+ /** @type {import('@colordx/core').Plugin} */ (
12
+ /** @type {unknown} */ (namesPlugin)
13
+ ),
14
+ ]);
8
15
 
9
16
  /* Code derived from https://www.npmjs.com/package/is-color-stop Licensed under MIT license */
10
17
 
@@ -45,7 +52,10 @@ function isStop(str) {
45
52
  const node = unit(str);
46
53
  if (node) {
47
54
  const number = Number(node.number);
48
- if (number === 0 || (!isNaN(number) && isCSSLengthUnit(node.unit))) {
55
+ if (
56
+ number === 0 ||
57
+ (!Number.isNaN(number) && isCSSLengthUnit(node.unit))
58
+ ) {
49
59
  isColorStop = true;
50
60
  }
51
61
  } else {
@@ -1 +1 @@
1
- {"version":3,"file":"isColorStop.d.ts","sourceRoot":"","sources":["../src/isColorStop.js"],"names":[],"mappings":";AAyDA;;;;GAIG;6BACmC,KAAK,EAJhC,MAIgC,EAAE,IAAI,AAH9C,CACA,EADQ,MAGsC,GAFrC,OAAO"}
1
+ {"version":3,"file":"isColorStop.d.ts","sourceRoot":"","sources":["../src/isColorStop.js"],"names":[],"mappings":";AAmEA;;;;GAIG;6BACmC,KAAK,EAJhC,MAIgC,EAAE,IAAI,AAH9C,CACA,EADQ,MAGsC,GAFrC,OAAO"}