postcss-sort-media-queries 6.0.0 → 6.1.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/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # PostCSS Sort Media Queries
2
2
 
3
3
  [PostCSS]: https://github.com/postcss/postcss
4
- [MIT]: https://github.com/yunusga/postcss-sort-media-queries/blob/master/LICENSE
5
4
  [official docs]: https://github.com/postcss/postcss#usage
5
+ [Online Demo]: https://yunusga.uz/postcss-sort-media-queries/
6
+ [MIT]: https://github.com/yunusga/postcss-sort-media-queries/blob/master/LICENSE
6
7
  [Releases history]: https://github.com/yunusga/postcss-sort-media-queries/blob/master/CHANGELOG.md
7
8
 
8
9
  [![npm](https://img.shields.io/npm/v/postcss-sort-media-queries.svg)](https://www.npmjs.com/package/postcss-sort-media-queries) [![Node.js CI](https://github.com/yunusga/postcss-sort-media-queries/actions/workflows/test.yml/badge.svg?branch=main&event=status)](https://github.com/yunusga/postcss-sort-media-queries/actions/workflows/test.yml)
@@ -37,7 +38,7 @@
37
38
 
38
39
  ## Online demo
39
40
 
40
- And here is the [online demo](https://postcss-sort-media-queries.github.io)
41
+ And here is the [Online Demo]
41
42
 
42
43
  ## Examples
43
44
 
package/build/index.cjs CHANGED
@@ -252,6 +252,7 @@ function plugin(options = {}) {
252
252
  const sortCSSmq = createSort(options.configuration);
253
253
  return {
254
254
  postcssPlugin: "postcss-sort-media-queries",
255
+ // Execute once after the entire tree has been parsed
255
256
  OnceExit(root, { AtRule }) {
256
257
  let parents = {
257
258
  root: [],
@@ -293,7 +294,7 @@ function plugin(options = {}) {
293
294
  });
294
295
  }
295
296
  atRule.nodes.forEach((node) => {
296
- atRules[query].append(node.clone());
297
+ atRules[query].append(node);
297
298
  });
298
299
  atRule.remove();
299
300
  });
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ const mod = require('./index.cjs');
4
+
5
+ const plugin = mod.default;
6
+
7
+ plugin.postcss = mod.postcss;
8
+
9
+ module.exports = plugin;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "postcss-sort-media-queries",
3
3
  "description": "PostCSS plugin for sorting and combining CSS media queries with mobile first / **desktop first methodologies",
4
- "version": "6.0.0",
4
+ "version": "6.1.0",
5
5
  "engines": {
6
6
  "node": ">=22.0.0"
7
7
  },
@@ -37,7 +37,7 @@
37
37
  "module": "src/index.js",
38
38
  "exports": {
39
39
  ".": {
40
- "require": "./src/index.cjs",
40
+ "require": "./build/wrapper.cjs",
41
41
  "import": "./src/index.js",
42
42
  "default": "./src/index.js"
43
43
  }
package/src/index.js CHANGED
@@ -97,7 +97,7 @@ function plugin(options = {}) {
97
97
  }
98
98
 
99
99
  atRule.nodes.forEach((node) => {
100
- atRules[query].append(node.clone());
100
+ atRules[query].append(node);
101
101
  });
102
102
 
103
103
  // Remove the original at-rule since its contents have been