Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: csstools/postcss-plugins
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 086a511f013525e499fe27f34b55cdff115071d1
Choose a base ref
...
head repository: csstools/postcss-plugins
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2f0ad9c194b14b5737bdf3e4a42625ee48568942
Choose a head ref
  • 15 commits
  • 95 files changed
  • 3 contributors

Commits on May 13, 2024

  1. Copy the full SHA
    bc0313e View commit details
  2. @csstools/csstools-cli v3.0.22

    romainmenke committed May 13, 2024
    Copy the full SHA
    08dfb92 View commit details
  3. silence npm warning when publishing

    romainmenke committed May 13, 2024
    Copy the full SHA
    5176cee View commit details

Commits on May 14, 2024

  1. increase test coverage

    romainmenke committed May 14, 2024
    Copy the full SHA
    7c38f7d View commit details

Commits on May 16, 2024

  1. cleanup some regexes (#1397)

    romainmenke authored May 16, 2024
    Copy the full SHA
    b6825ae View commit details
  2. fix CI

    romainmenke committed May 16, 2024
    Copy the full SHA
    3c10a3a View commit details
  3. attribution

    romainmenke committed May 16, 2024
    Copy the full SHA
    bb14f5a View commit details
  4. cleanup

    romainmenke committed May 16, 2024
    Copy the full SHA
    ba43a26 View commit details

Commits on May 18, 2024

  1. increase test coverage

    romainmenke committed May 18, 2024
    Copy the full SHA
    bbd7482 View commit details

Commits on May 23, 2024

  1. Bump the all-dependencies group across 2 directories with 2 updates (#…

    …1399)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Romain Menke <romainmenke@gmail.com>
    dependabot[bot] and romainmenke authored May 23, 2024
    Copy the full SHA
    45d4366 View commit details
  2. postcss-nesting : fix @scope (#1400)

    romainmenke authored May 23, 2024
    Copy the full SHA
    980c1ce View commit details
  3. Bump the development-dependencies group with 9 updates (#1398)

    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Romain Menke <romainmenke@gmail.com>
    dependabot[bot] and romainmenke authored May 23, 2024
    Copy the full SHA
    fabcfe3 View commit details
  4. postcss-nesting v12.1.5

    romainmenke committed May 23, 2024
    Copy the full SHA
    f8703cf View commit details
  5. Copy the full SHA
    9659c3d View commit details
  6. Copy the full SHA
    2f0ad9c View commit details
Showing with 966 additions and 697 deletions.
  1. +3 −1 .github/bin/release-plan/minify-changelog-and-package-json.mjs
  2. +7 −0 cli/csstools-cli/CHANGELOG.md
  3. +3 −3 cli/csstools-cli/package.json
  4. +1 −1 e2e-package-managers/yarn/package.json
  5. +41 −41 e2e/package-lock.json
  6. +1 −1 experimental/postcss-gradient-stop-increments/dist/index.cjs
  7. +1 −1 experimental/postcss-gradient-stop-increments/dist/index.mjs
  8. +3 −3 experimental/postcss-gradient-stop-increments/src/index.ts
  9. +1 −1 experimental/postcss-nesting/package.json
  10. +343 −351 package-lock.json
  11. +5 −5 package.json
  12. +1 −1 packages/generate-test-cases/package.json
  13. +8 −8 packages/postcss-tape/test-self/test.sh
  14. +33 −0 packages/postcss-tape/test/_dot-reporter.cjs
  15. +2 −2 packages/selector-resolve-nested/package.json
  16. +12 −0 packages/selector-resolve-nested/test/flatten-nested-selector/partial.mjs
  17. +3 −3 packages/selector-resolve-nested/test/flatten-nested-selector/source-indices.mjs
  18. +2 −0 packages/selector-resolve-nested/test/index.mjs
  19. +12 −0 packages/selector-resolve-nested/test/resolve-nested-selector/partial.mjs
  20. +3 −3 packages/selector-resolve-nested/test/resolve-nested-selector/source-indices.mjs
  21. +2 −2 packages/selector-specificity/package.json
  22. +5 −0 packages/selector-specificity/test/test.mjs
  23. +1 −1 plugin-packs/postcss-bundler/dist/index.cjs
  24. +1 −1 plugin-packs/postcss-bundler/dist/index.mjs
  25. +6 −6 plugin-packs/postcss-bundler/src/postcss-import/lib/data-url.ts
  26. +6 −0 plugin-packs/postcss-preset-env/CHANGELOG.md
  27. +3 −3 plugin-packs/postcss-preset-env/package.json
  28. +17 −0 plugin-packs/postcss-preset-env/test/basic.vendors-3.expect.css
  29. +2 −2 plugins/css-blank-pseudo/package.json
  30. +2 −2 plugins/css-has-pseudo/package.json
  31. +1 −1 plugins/css-prefers-color-scheme/package.json
  32. +1 −1 plugins/postcss-attribute-case-insensitive/dist/index.cjs
  33. +1 −1 plugins/postcss-attribute-case-insensitive/dist/index.mjs
  34. +1 −1 plugins/postcss-attribute-case-insensitive/package.json
  35. +1 −1 plugins/postcss-attribute-case-insensitive/src/index.ts
  36. +1 −1 plugins/postcss-browser-comments/dist/index.cjs
  37. +1 −1 plugins/postcss-browser-comments/dist/index.mjs
  38. +3 −3 plugins/postcss-browser-comments/src/index.ts
  39. +2 −2 plugins/postcss-cascade-layers/package.json
  40. +1 −1 plugins/postcss-color-function/dist/index.cjs
  41. +1 −1 plugins/postcss-color-function/dist/index.mjs
  42. +2 −2 plugins/postcss-color-function/src/index.ts
  43. +1 −1 plugins/postcss-color-hex-alpha/dist/index.cjs
  44. +1 −1 plugins/postcss-color-hex-alpha/dist/index.mjs
  45. +2 −2 plugins/postcss-color-hex-alpha/src/index.ts
  46. +1 −1 plugins/postcss-color-mix-function/dist/index.cjs
  47. +1 −1 plugins/postcss-color-mix-function/dist/index.mjs
  48. +2 −2 plugins/postcss-color-mix-function/src/index.ts
  49. +1 −1 plugins/postcss-custom-properties/dist/index.cjs
  50. +1 −1 plugins/postcss-custom-properties/dist/index.mjs
  51. +1 −1 plugins/postcss-custom-properties/src/index.ts
  52. +2 −2 plugins/postcss-custom-properties/src/is-ignored.ts
  53. +1 −1 plugins/postcss-custom-selectors/package.json
  54. +1 −1 plugins/postcss-dir-pseudo-class/package.json
  55. +1 −1 plugins/postcss-extract/package.json
  56. +2 −2 plugins/postcss-focus-visible/package.json
  57. +2 −2 plugins/postcss-focus-within/package.json
  58. +1 −1 plugins/postcss-gradients-interpolation-method/dist/index.cjs
  59. +1 −1 plugins/postcss-gradients-interpolation-method/dist/index.mjs
  60. +1 −1 plugins/postcss-gradients-interpolation-method/src/is-gradient.ts
  61. +3 −3 plugins/postcss-gradients-interpolation-method/src/modify-gradient-component-values.ts
  62. +1 −1 plugins/postcss-image-set-function/dist/index.cjs
  63. +1 −1 plugins/postcss-image-set-function/dist/index.mjs
  64. +2 −2 plugins/postcss-image-set-function/src/index.ts
  65. +1 −1 plugins/postcss-image-set-function/src/lib/get-image.ts
  66. +2 −2 plugins/postcss-is-pseudo-class/package.json
  67. +1 −1 plugins/postcss-light-dark-function/package.json
  68. +1 −1 plugins/postcss-media-minmax/package.json
  69. +1 −1 plugins/postcss-minify/dist/index.cjs
  70. +1 −1 plugins/postcss-minify/dist/index.mjs
  71. +2 −2 plugins/postcss-minify/src/index.ts
  72. +1 −1 plugins/postcss-nested-calc/dist/index.cjs
  73. +1 −1 plugins/postcss-nested-calc/dist/index.mjs
  74. +2 −3 plugins/postcss-nested-calc/src/occurrences.ts
  75. +6 −0 plugins/postcss-nesting/CHANGELOG.md
  76. +1 −1 plugins/postcss-nesting/dist/index.cjs
  77. +1 −1 plugins/postcss-nesting/dist/index.mjs
  78. +3 −3 plugins/postcss-nesting/package.json
  79. +7 −0 plugins/postcss-nesting/src/editions/2021/lib/ampersand-to-scope.ts
  80. +36 −22 plugins/postcss-nesting/src/editions/2024-02/lib/ampersand-to-scope.ts
  81. +3 −3 plugins/postcss-nesting/test/ampersand-everywhere.edition-2024-02.expect.css
  82. +28 −0 plugins/postcss-nesting/test/basic.css
  83. +28 −0 plugins/postcss-nesting/test/basic.edition-2024-02.expect.css
  84. +28 −0 plugins/postcss-nesting/test/basic.expect.css
  85. +28 −0 plugins/postcss-nesting/test/basic.no-is-pseudo-selector.expect.css
  86. +38 −0 plugins/postcss-nesting/test/wpt/nesting-basics.html
  87. +1 −1 plugins/postcss-pseudo-class-any-link/package.json
  88. +1 −1 plugins/postcss-relative-color-syntax/dist/index.cjs
  89. +1 −1 plugins/postcss-relative-color-syntax/dist/index.mjs
  90. +1 −1 plugins/postcss-relative-color-syntax/src/index.ts
  91. +1 −1 plugins/postcss-scope-pseudo-class/package.json
  92. +1 −1 plugins/postcss-selector-not/package.json
  93. +2 −2 plugins/postcss-trigonometric-functions/src/index.ts
  94. +161 −156 sites/package-lock.json
  95. +1 −1 sites/postcss-preset-env/package.json
Original file line number Diff line number Diff line change
@@ -12,10 +12,12 @@ export async function minifyChangelogAndPackageJSON(workspace) {
// - remove some fields that are not useful for end users
{
delete minifiedPackageInfo.devDependencies;
delete minifiedPackageInfo.scripts;
delete minifiedPackageInfo.csstools;
delete minifiedPackageInfo.volta;
delete minifiedPackageInfo.eslintConfig;

// NPM prefers an empty scripts object over a missing one.
minifiedPackageInfo.scripts = {};
}

// CHANGELOG.md
7 changes: 7 additions & 0 deletions cli/csstools-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -2,10 +2,17 @@

### Unreleased (patch)

- Updated [`postcss-nesting`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) to [`12.1.5`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting/CHANGELOG.md#1215) (patch)

### 3.0.22

_May 13, 2024_

- Updated [`@csstools/postcss-cascade-layers`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-cascade-layers) to [`4.0.6`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-cascade-layers/CHANGELOG.md#406) (patch)
- Updated [`@csstools/postcss-is-pseudo-class`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-is-pseudo-class) to [`4.0.8`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-is-pseudo-class/CHANGELOG.md#408) (patch)
- Updated [`css-has-pseudo`](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-has-pseudo) to [`6.0.5`](https://github.com/csstools/postcss-plugins/tree/main/plugins/css-has-pseudo/CHANGELOG.md#605) (patch)
- Updated [`postcss-nesting`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting) to [`12.1.4`](https://github.com/csstools/postcss-plugins/tree/main/plugins/postcss-nesting/CHANGELOG.md#1214) (patch)
- Updated [`postcss-preset-env`](https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env) to [`9.5.13`](https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env/CHANGELOG.md#9513) (patch)

### 3.0.21

6 changes: 3 additions & 3 deletions cli/csstools-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@csstools/csstools-cli",
"description": "Transform CSS with any plugin from csstools/postcss-plugins",
"version": "3.0.21",
"version": "3.0.22",
"contributors": [
{
"name": "Antonio Laguna",
@@ -81,10 +81,10 @@
"postcss-image-set-function": "^6.0.3",
"postcss-lab-function": "^6.0.16",
"postcss-logical": "^7.0.1",
"postcss-nesting": "^12.1.4",
"postcss-nesting": "^12.1.5",
"postcss-overflow-shorthand": "^5.0.1",
"postcss-place": "^9.0.1",
"postcss-preset-env": "^9.5.12",
"postcss-preset-env": "^9.5.13",
"postcss-pseudo-class-any-link": "^9.0.2",
"postcss-selector-not": "^7.0.2"
},
2 changes: 1 addition & 1 deletion e2e-package-managers/yarn/package.json
Original file line number Diff line number Diff line change
@@ -5,7 +5,7 @@
"description": "Can you use yarn with our plugins?",
"devDependencies": {
"postcss": "^8.4.38",
"postcss-preset-env": "^9.5.11"
"postcss-preset-env": "^9.5.13"
},
"volta": {
"extends": "../../package.json",
82 changes: 41 additions & 41 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-calc"),o=require("@csstools/css-tokenizer");const t=/(repeating-)?(linear|radial|conic)-gradient\(/i,i=/^(repeating-)?(linear|radial|conic)-gradient$/i,s=/^(abs|acos|asin|atan|atan2|calc|clamp|cos|exp|hypot|log|max|min|mod|pow|rem|round|sign|sin|sqrt|tan)$/i,creator=n=>{const a=Object.assign({preserve:!1},n);return{postcssPlugin:"postcss-gradient-stop-increments",Declaration(n){if(!t.test(n.value))return;const r=o.tokenize({css:n.value});if(!r.find((e=>o.isTokenDelim(e)&&"+"===e[4].value)))return;const c=e.stringify(e.replaceComponentValues(e.parseCommaSeparatedListOfComponentValues(r),(n=>{if(!e.isFunctionNode(n))return;const t=n.getName();if(!i.test(t))return;let a=null;for(let t=0;t<n.value.length;t++){const i=n.value[t];if(e.isTokenNode(i)&&o.isTokenDelim(i.value)&&"+"===i.value[4].value){const s=i,r=t;for(;e.isCommentNode(n.value[t+1]);)t++;if(t++,isZeroOrNegative(n.value[t])){const i=new e.TokenNode([o.TokenType.Number,"0",-1,-1,{value:0,type:o.NumberType.Integer}]);n.value.splice(r,t-r+1,i),t=n.value.indexOf(i);continue}const c=incrementLengthNode(a,s,n.value[t]);n.value.splice(r,t-r+1,c),a=c,t=n.value.indexOf(c)}else(isNumericLargerThanZero(i)||e.isFunctionNode(i)&&s.test(i.getName()))&&(a=maxOfLastAndCurrentLengthNode(a,i))}})));c!==n.value&&(n.cloneBefore({value:c}),a?.preserve||n.remove())}}};function isNumericLargerThanZero(n){return!!(e.isTokenNode(n)&&o.isTokenNumeric(n.value)&&n.value[4].value>0)}function isZeroOrNegative(n){return!!(e.isTokenNode(n)&&o.isTokenNumeric(n.value)&&n.value[4].value<=0)}function incrementLengthNode(t,i,s){if(!t)return s;const a=new e.FunctionNode([o.TokenType.Function,"calc(",-1,-1,{value:"calc"}],[o.TokenType.CloseParen,")",-1,-1,void 0],[t,new e.WhitespaceNode([[o.TokenType.Whitespace," ",-1,-1,void 0]]),i,new e.WhitespaceNode([[o.TokenType.Whitespace," ",-1,-1,void 0]]),s]),[[r]]=n.calcFromComponentValues([[a]]);return r}function maxOfLastAndCurrentLengthNode(t,i){if(!t)return i;const s=new e.FunctionNode([o.TokenType.Function,"max(",-1,-1,{value:"max"}],[o.TokenType.CloseParen,")",-1,-1,void 0],[t,new e.TokenNode([o.TokenType.Comma,",",-1,-1,void 0]),new e.WhitespaceNode([[o.TokenType.Whitespace," ",-1,-1,void 0]]),i]),[[a]]=n.calcFromComponentValues([[s]]);return a}creator.postcss=!0,module.exports=creator;
"use strict";var e=require("@csstools/css-parser-algorithms"),n=require("@csstools/css-calc"),o=require("@csstools/css-tokenizer");const t=/(?:repeating-)?(?:linear|radial|conic)-gradient\(/i,i=/^(?:repeating-)?(?:linear|radial|conic)-gradient$/i,s=/^(?:abs|acos|asin|atan|atan2|calc|clamp|cos|exp|hypot|log|max|min|mod|pow|rem|round|sign|sin|sqrt|tan)$/i,creator=n=>{const a=Object.assign({preserve:!1},n);return{postcssPlugin:"postcss-gradient-stop-increments",Declaration(n){if(!t.test(n.value))return;const r=o.tokenize({css:n.value});if(!r.find((e=>o.isTokenDelim(e)&&"+"===e[4].value)))return;const c=e.stringify(e.replaceComponentValues(e.parseCommaSeparatedListOfComponentValues(r),(n=>{if(!e.isFunctionNode(n))return;const t=n.getName();if(!i.test(t))return;let a=null;for(let t=0;t<n.value.length;t++){const i=n.value[t];if(e.isTokenNode(i)&&o.isTokenDelim(i.value)&&"+"===i.value[4].value){const s=i,r=t;for(;e.isCommentNode(n.value[t+1]);)t++;if(t++,isZeroOrNegative(n.value[t])){const i=new e.TokenNode([o.TokenType.Number,"0",-1,-1,{value:0,type:o.NumberType.Integer}]);n.value.splice(r,t-r+1,i),t=n.value.indexOf(i);continue}const c=incrementLengthNode(a,s,n.value[t]);n.value.splice(r,t-r+1,c),a=c,t=n.value.indexOf(c)}else(isNumericLargerThanZero(i)||e.isFunctionNode(i)&&s.test(i.getName()))&&(a=maxOfLastAndCurrentLengthNode(a,i))}})));c!==n.value&&(n.cloneBefore({value:c}),a?.preserve||n.remove())}}};function isNumericLargerThanZero(n){return!!(e.isTokenNode(n)&&o.isTokenNumeric(n.value)&&n.value[4].value>0)}function isZeroOrNegative(n){return!!(e.isTokenNode(n)&&o.isTokenNumeric(n.value)&&n.value[4].value<=0)}function incrementLengthNode(t,i,s){if(!t)return s;const a=new e.FunctionNode([o.TokenType.Function,"calc(",-1,-1,{value:"calc"}],[o.TokenType.CloseParen,")",-1,-1,void 0],[t,new e.WhitespaceNode([[o.TokenType.Whitespace," ",-1,-1,void 0]]),i,new e.WhitespaceNode([[o.TokenType.Whitespace," ",-1,-1,void 0]]),s]),[[r]]=n.calcFromComponentValues([[a]]);return r}function maxOfLastAndCurrentLengthNode(t,i){if(!t)return i;const s=new e.FunctionNode([o.TokenType.Function,"max(",-1,-1,{value:"max"}],[o.TokenType.CloseParen,")",-1,-1,void 0],[t,new e.TokenNode([o.TokenType.Comma,",",-1,-1,void 0]),new e.WhitespaceNode([[o.TokenType.Whitespace," ",-1,-1,void 0]]),i]),[[a]]=n.calcFromComponentValues([[s]]);return a}creator.postcss=!0,module.exports=creator;
Loading