@csstools/postcss-ic-unit 4.0.3 → 5.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/CHANGELOG.md CHANGED
@@ -1,9 +1,12 @@
1
1
  # Changes to PostCSS IC Unit
2
2
 
3
- ### 4.0.3
3
+ ### 5.0.0
4
4
 
5
- _August 22, 2025_
5
+ _January 14, 2026_
6
6
 
7
- - Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`4.2.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#420) (minor)
7
+ - Updated: Support for Node `20.19.0` or later (major).
8
+ - Removed: `commonjs` API. In supported Node versions `require(esm)` will work without needing to make code changes.
9
+ - Updated [`@csstools/utilities`](https://github.com/csstools/postcss-plugins/tree/main/packages/utilities) to [`3.0.0`](https://github.com/csstools/postcss-plugins/tree/main/packages/utilities/CHANGELOG.md#300) (major)
10
+ - Updated [`@csstools/postcss-progressive-custom-properties`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties) to [`5.0.0`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-progressive-custom-properties/CHANGELOG.md#500) (major)
8
11
 
9
12
  [Full CHANGELOG](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-ic-unit/CHANGELOG.md)
package/dist/index.d.ts CHANGED
@@ -10,5 +10,6 @@ export declare type pluginOptions = {
10
10
 
11
11
  declare const postcssPlugin: PluginCreator<pluginOptions>;
12
12
  export default postcssPlugin;
13
+ export { postcssPlugin as 'module.exports' }
13
14
 
14
15
  export { }
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import s from"@csstools/postcss-progressive-custom-properties";import e from"postcss-value-parser";import{hasFallback as t,hasSupportsAtRuleAncestor as r}from"@csstools/utilities";const o=/ic\b/i,i=/\(font-size: \d+ic\)/i,basePlugin=s=>({postcssPlugin:"postcss-ic-unit",Declaration(n){if(!o.test(n.value))return;if(t(n))return;if(r(n,i))return;const c=e(n.value);c.walk(s=>{if(!s.type||"word"!==s.type)return;const t=e.unit(s.value);t&&"ic"===t.unit.toLowerCase()&&(s.value=`${t.number}em`)});const u=String(c);u!==n.value&&(n.cloneBefore({value:u}),s?.preserve||n.remove())}});basePlugin.postcss=!0;const postcssPlugin=e=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},e);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[s(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0;export{postcssPlugin as default};
1
+ import s from"@csstools/postcss-progressive-custom-properties";import e from"postcss-value-parser";import{hasFallback as t,hasSupportsAtRuleAncestor as r}from"@csstools/utilities";const o=/ic\b/i,i=/\(font-size: \d+ic\)/i,basePlugin=s=>({postcssPlugin:"postcss-ic-unit",Declaration(n){if(!o.test(n.value))return;if(t(n))return;if(r(n,i))return;const u=e(n.value);u.walk(s=>{if(!s.type||"word"!==s.type)return;const t=e.unit(s.value);t&&"ic"===t.unit.toLowerCase()&&(s.value=`${t.number}em`)});const c=String(u);c!==n.value&&(n.cloneBefore({value:c}),s?.preserve||n.remove())}});basePlugin.postcss=!0;const postcssPlugin=e=>{const t=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},e);return t.enableProgressiveCustomProperties&&t.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[s(),basePlugin(t)]}:basePlugin(t)};postcssPlugin.postcss=!0;export{postcssPlugin as default,postcssPlugin as"module.exports"};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@csstools/postcss-ic-unit",
3
3
  "description": "Use the ic length unit",
4
- "version": "4.0.3",
4
+ "version": "5.0.0",
5
5
  "author": "Jonathan Neal <jonathantneal@hotmail.com>",
6
6
  "license": "MIT-0",
7
7
  "funding": [
@@ -15,20 +15,13 @@
15
15
  }
16
16
  ],
17
17
  "engines": {
18
- "node": ">=18"
18
+ "node": ">=20.19.0"
19
19
  },
20
20
  "type": "module",
21
- "main": "dist/index.cjs",
22
- "module": "dist/index.mjs",
23
21
  "exports": {
24
22
  ".": {
25
- "import": {
26
- "types": "./dist/index.d.ts",
27
- "default": "./dist/index.mjs"
28
- },
29
- "require": {
30
- "default": "./dist/index.cjs"
31
- }
23
+ "types": "./dist/index.d.ts",
24
+ "default": "./dist/index.mjs"
32
25
  }
33
26
  },
34
27
  "files": [
@@ -38,8 +31,8 @@
38
31
  "dist"
39
32
  ],
40
33
  "dependencies": {
41
- "@csstools/postcss-progressive-custom-properties": "^4.2.0",
42
- "@csstools/utilities": "^2.0.0",
34
+ "@csstools/postcss-progressive-custom-properties": "^5.0.0",
35
+ "@csstools/utilities": "^3.0.0",
43
36
  "postcss-value-parser": "^4.2.0"
44
37
  },
45
38
  "peerDependencies": {
package/dist/index.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";var s=require("@csstools/postcss-progressive-custom-properties"),e=require("postcss-value-parser"),r=require("@csstools/utilities");const t=/ic\b/i,o=/\(font-size: \d+ic\)/i,basePlugin=s=>({postcssPlugin:"postcss-ic-unit",Declaration(i){if(!t.test(i.value))return;if(r.hasFallback(i))return;if(r.hasSupportsAtRuleAncestor(i,o))return;const u=e(i.value);u.walk(s=>{if(!s.type||"word"!==s.type)return;const r=e.unit(s.value);r&&"ic"===r.unit.toLowerCase()&&(s.value=`${r.number}em`)});const c=String(u);c!==i.value&&(i.cloneBefore({value:c}),s?.preserve||i.remove())}});basePlugin.postcss=!0;const postcssPlugin=e=>{const r=Object.assign({preserve:!1,enableProgressiveCustomProperties:!0},e);return r.enableProgressiveCustomProperties&&r.preserve?{postcssPlugin:"postcss-ic-unit",plugins:[s(),basePlugin(r)]}:basePlugin(r)};postcssPlugin.postcss=!0,module.exports=postcssPlugin;