stylehacks 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.
Files changed (69) hide show
  1. package/package.json +5 -8
  2. package/src/dictionary/browsers.js +1 -3
  3. package/src/dictionary/identifiers.js +1 -3
  4. package/src/dictionary/postcss.js +1 -3
  5. package/src/dictionary/tags.js +1 -3
  6. package/src/exists.js +4 -5
  7. package/src/index.js +8 -6
  8. package/src/isMixin.js +4 -4
  9. package/src/lib/computeBrowsersToSupport.js +10 -12
  10. package/src/lib/getBrowsersForWebBuild.js +2 -4
  11. package/src/plugin.js +17 -16
  12. package/src/plugins/bodyEmpty.js +10 -11
  13. package/src/plugins/htmlCombinatorCommentBody.js +10 -11
  14. package/src/plugins/htmlFirstChild.js +10 -11
  15. package/src/plugins/important.js +5 -6
  16. package/src/plugins/index.js +13 -14
  17. package/src/plugins/leadingStar.js +6 -8
  18. package/src/plugins/leadingUnderscore.js +6 -8
  19. package/src/plugins/mediaSlash0.js +6 -7
  20. package/src/plugins/mediaSlash0Slash9.js +6 -7
  21. package/src/plugins/mediaSlash9.js +6 -7
  22. package/src/plugins/slash9.js +6 -7
  23. package/src/plugins/starHtml.js +10 -11
  24. package/src/plugins/trailingSlashComma.js +7 -8
  25. package/types/dictionary/browsers.d.ts +7 -9
  26. package/types/dictionary/browsers.d.ts.map +1 -1
  27. package/types/dictionary/identifiers.d.ts +5 -7
  28. package/types/dictionary/identifiers.d.ts.map +1 -1
  29. package/types/dictionary/postcss.d.ts +4 -6
  30. package/types/dictionary/postcss.d.ts.map +1 -1
  31. package/types/dictionary/tags.d.ts +3 -5
  32. package/types/dictionary/tags.d.ts.map +1 -1
  33. package/types/exists.d.ts +1 -1
  34. package/types/exists.d.ts.map +1 -1
  35. package/types/index.d.ts +4 -4
  36. package/types/index.d.ts.map +1 -1
  37. package/types/isMixin.d.ts +1 -1
  38. package/types/isMixin.d.ts.map +1 -1
  39. package/types/lib/computeBrowsersToSupport.d.ts +2 -2
  40. package/types/lib/computeBrowsersToSupport.d.ts.map +1 -1
  41. package/types/lib/getBrowsersForWebBuild.d.ts +2 -2
  42. package/types/plugin.d.ts +30 -27
  43. package/types/plugin.d.ts.map +1 -1
  44. package/types/plugins/bodyEmpty.d.ts +3 -3
  45. package/types/plugins/bodyEmpty.d.ts.map +1 -1
  46. package/types/plugins/htmlCombinatorCommentBody.d.ts +3 -3
  47. package/types/plugins/htmlCombinatorCommentBody.d.ts.map +1 -1
  48. package/types/plugins/htmlFirstChild.d.ts +3 -3
  49. package/types/plugins/htmlFirstChild.d.ts.map +1 -1
  50. package/types/plugins/important.d.ts +2 -2
  51. package/types/plugins/important.d.ts.map +1 -1
  52. package/types/plugins/index.d.ts +34 -6
  53. package/types/plugins/index.d.ts.map +1 -1
  54. package/types/plugins/leadingStar.d.ts +3 -3
  55. package/types/plugins/leadingStar.d.ts.map +1 -1
  56. package/types/plugins/leadingUnderscore.d.ts +2 -2
  57. package/types/plugins/leadingUnderscore.d.ts.map +1 -1
  58. package/types/plugins/mediaSlash0.d.ts +2 -2
  59. package/types/plugins/mediaSlash0.d.ts.map +1 -1
  60. package/types/plugins/mediaSlash0Slash9.d.ts +2 -2
  61. package/types/plugins/mediaSlash0Slash9.d.ts.map +1 -1
  62. package/types/plugins/mediaSlash9.d.ts +2 -2
  63. package/types/plugins/mediaSlash9.d.ts.map +1 -1
  64. package/types/plugins/slash9.d.ts +2 -2
  65. package/types/plugins/slash9.d.ts.map +1 -1
  66. package/types/plugins/starHtml.d.ts +3 -3
  67. package/types/plugins/starHtml.d.ts.map +1 -1
  68. package/types/plugins/trailingSlashComma.d.ts +2 -2
  69. package/types/plugins/trailingSlashComma.d.ts.map +1 -1
package/package.json CHANGED
@@ -1,16 +1,12 @@
1
1
  {
2
2
  "name": "stylehacks",
3
- "version": "8.0.3",
3
+ "version": "9.0.0",
4
4
  "description": "Detect/remove browser hacks from CSS files.",
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/*": "./src/*.js",
12
- "./src/*.js": "./src/*.js",
13
- "./package.json": "./package.json"
9
+ }
14
10
  },
15
11
  "imports": {
16
12
  "#getBrowsersList": {
@@ -42,7 +38,7 @@
42
38
  },
43
39
  "repository": {
44
40
  "type": "git",
45
- "url": "cssnano/cssnano"
41
+ "url": "git+https://github.com/cssnano/cssnano.git"
46
42
  },
47
43
  "dependencies": {
48
44
  "browserslist": "^4.28.8",
@@ -52,7 +48,7 @@
52
48
  "url": "https://github.com/cssnano/cssnano/issues"
53
49
  },
54
50
  "engines": {
55
- "node": "^22.11.0 || ^24.11.0 || >=26.0"
51
+ "node": "^22.22.3 || ^24.15.0 || >=26.0"
56
52
  },
57
53
  "devDependencies": {
58
54
  "postcss": "^8.5.26"
@@ -60,6 +56,7 @@
60
56
  "peerDependencies": {
61
57
  "postcss": "^8.5.26"
62
58
  },
59
+ "type": "module",
63
60
  "scripts": {
64
61
  "test": "node --test"
65
62
  }
@@ -1,9 +1,7 @@
1
- 'use strict';
2
1
  const FF_2 = 'firefox 2';
3
2
  const IE_5_5 = 'ie 5.5';
4
3
  const IE_6 = 'ie 6';
5
4
  const IE_7 = 'ie 7';
6
5
  const IE_8 = 'ie 8';
7
6
  const OP_9 = 'opera 9';
8
-
9
- module.exports = { FF_2, IE_5_5, IE_6, IE_7, IE_8, OP_9 };
7
+ export { FF_2, IE_5_5, IE_6, IE_7, IE_8, OP_9 };
@@ -1,7 +1,5 @@
1
- 'use strict';
2
1
  const MEDIA_QUERY = 'media query';
3
2
  const PROPERTY = 'property';
4
3
  const SELECTOR = 'selector';
5
4
  const VALUE = 'value';
6
-
7
- module.exports = { MEDIA_QUERY, PROPERTY, SELECTOR, VALUE };
5
+ export { MEDIA_QUERY, PROPERTY, SELECTOR, VALUE };
@@ -1,6 +1,4 @@
1
- 'use strict';
2
1
  const ATRULE = 'atrule';
3
2
  const DECL = 'decl';
4
3
  const RULE = 'rule';
5
-
6
- module.exports = { ATRULE, DECL, RULE };
4
+ export { ATRULE, DECL, RULE };
@@ -1,5 +1,3 @@
1
- 'use strict';
2
1
  const BODY = 'body';
3
2
  const HTML = 'html';
4
-
5
- module.exports = { BODY, HTML };
3
+ export { BODY, HTML };
package/src/exists.js CHANGED
@@ -1,13 +1,12 @@
1
- 'use strict';
2
-
3
1
  /**
4
2
  * @param {import('postcss-selector-parser').Selector} selector
5
3
  * @param {number} index
6
4
  * @param {string} value
7
5
  * @return {boolean | undefined | ''}
8
6
  */
9
- module.exports = function exists(selector, index, value) {
7
+ function exists(selector, index, value) {
10
8
  const node = selector.at(index);
11
-
12
9
  return node && node.value && node.value.toLowerCase() === value;
13
- };
10
+ }
11
+
12
+ export default exists;
package/src/index.js CHANGED
@@ -1,6 +1,5 @@
1
- 'use strict';
2
- const getBrowsersList = require('#getBrowsersList');
3
- const plugins = require('./plugins');
1
+ import getBrowsersList from '#getBrowsersList';
2
+ import plugins from './plugins/index.js';
4
3
 
5
4
  /**
6
5
  * @import browserslist from 'browserslist'
@@ -23,17 +22,18 @@ function pluginCreator(opts = {}) {
23
22
  prepare(result) {
24
23
  const { stats, env, from, file } = result.opts || {};
25
24
  const browsers = getBrowsersList(opts, stats, from, file, env);
25
+ const browserSet = new Set(browsers);
26
26
 
27
27
  return /** import('postcss').Plugin */ {
28
28
  /**
29
29
  * @param {import('postcss').Root} css
30
30
  */
31
31
  OnceExit(css) {
32
- /** @type {import('./plugin').Plugin[]} */
32
+ /** @type {import('./plugin.js').Plugin[]} */
33
33
  const processors = [];
34
34
  for (const Plugin of plugins) {
35
35
  const hack = new Plugin(result);
36
- if (!browsers.some((browser) => hack.targets.has(browser))) {
36
+ if (browserSet.isDisjointFrom(hack.targets)) {
37
37
  processors.push(hack);
38
38
  }
39
39
  }
@@ -66,7 +66,9 @@ pluginCreator.detect = (node) => {
66
66
  };
67
67
 
68
68
  pluginCreator.postcss = true;
69
- module.exports =
69
+ const moduleExports =
70
70
  /** @type {import('postcss').PluginCreator<Options> & {detect: (node: import('postcss').Node) => boolean}} */ (
71
71
  pluginCreator
72
72
  );
73
+
74
+ export { moduleExports as default, moduleExports as 'module.exports' };
package/src/isMixin.js CHANGED
@@ -1,15 +1,15 @@
1
- 'use strict';
2
1
  /**
3
2
  * @param {import('postcss').Rule} node
4
3
  * @return {boolean}
5
4
  */
6
- module.exports = function isMixin(node) {
5
+ function isMixin(node) {
7
6
  const { selector } = node;
8
7
 
9
8
  // If the selector ends with a ':' it is likely a part of a custom mixin.
10
9
  if (!selector || selector[selector.length - 1] === ':') {
11
10
  return true;
12
11
  }
13
-
14
12
  return false;
15
- };
13
+ }
14
+
15
+ export default isMixin;
@@ -1,7 +1,8 @@
1
- 'use strict';
1
+ import { fileURLToPath } from 'node:url';
2
+ import browserslist from 'browserslist';
3
+ import nodepath from 'node:path';
2
4
 
3
- const browserslist = require('browserslist');
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
- module.exports = function computeBrowsersToSupport(
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: options.path || dirname(from || file || __filename),
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;
@@ -1,6 +1,4 @@
1
- 'use strict';
2
-
3
- module.exports = function () {
1
+ export default (function () {
4
2
  return [
5
3
  'and_chr 150',
6
4
  'and_ff 152',
@@ -32,4 +30,4 @@ module.exports = function () {
32
30
  'samsung 30',
33
31
  'samsung 29',
34
32
  ];
35
- };
33
+ });
package/src/plugin.js CHANGED
@@ -1,21 +1,22 @@
1
- 'use strict';
2
1
  /**
3
- * @typedef {object} Plugin
4
- * @prop {Set<string>} targets
5
- * @prop {Set<string>} nodeTypes
6
- * @prop {(node: import('postcss').Node) => void} detectAndResolve
7
- * @prop {(node: import('postcss').Node) => void} detectAndWarn
2
+ * @typedef {import('postcss').Node & {
3
+ * _stylehacks: {
4
+ * message: string,
5
+ * browsers: Set<string>,
6
+ * identifier: string,
7
+ * hack: string
8
+ * }
9
+ * }} NodeWithInfo
8
10
  */
9
11
 
10
- /**
11
- * @typedef {import('postcss').Node & {_stylehacks: {
12
- message: string,
13
- browsers: Set<string>,
14
- identifier: string,
15
- hack: string }}} NodeWithInfo
16
- */
17
-
18
- module.exports = class BasePlugin {
12
+ export default (class BasePlugin {
13
+ /**
14
+ * @typedef {object} Plugin
15
+ * @prop {Set<string>} targets
16
+ * @prop {Set<string>} nodeTypes
17
+ * @prop {(node: import('postcss').Node) => void} detectAndResolve
18
+ * @prop {(node: import('postcss').Node) => void} detectAndWarn
19
+ */
19
20
  /**
20
21
  * @param {string[]} targets
21
22
  * @param {string[]} nodeTypes
@@ -107,4 +108,4 @@ module.exports = class BasePlugin {
107
108
  );
108
109
  }
109
110
  }
110
- };
111
+ });
@@ -1,14 +1,13 @@
1
- 'use strict';
2
- const parser = require('postcss-selector-parser');
3
- const exists = require('../exists');
4
- const isMixin = require('../isMixin');
5
- const BasePlugin = require('../plugin');
6
- const { FF_2 } = require('../dictionary/browsers');
7
- const { SELECTOR } = require('../dictionary/identifiers');
8
- const { RULE } = require('../dictionary/postcss');
9
- const { BODY } = require('../dictionary/tags');
1
+ import parser from 'postcss-selector-parser';
2
+ import exists from '../exists.js';
3
+ import isMixin from '../isMixin.js';
4
+ import BasePlugin from '../plugin.js';
5
+ import { FF_2 } from '../dictionary/browsers.js';
6
+ import { SELECTOR } from '../dictionary/identifiers.js';
7
+ import { RULE } from '../dictionary/postcss.js';
8
+ import { BODY } from '../dictionary/tags.js';
10
9
 
11
- module.exports = class BodyEmpty extends BasePlugin {
10
+ export default (class BodyEmpty extends BasePlugin {
12
11
  /** @param {import('postcss').Result} result */
13
12
  constructor(result) {
14
13
  super([FF_2], [RULE], result);
@@ -46,4 +45,4 @@ module.exports = class BodyEmpty extends BasePlugin {
46
45
  });
47
46
  };
48
47
  }
49
- };
48
+ });
@@ -1,14 +1,13 @@
1
- 'use strict';
2
- const parser = require('postcss-selector-parser');
3
- const exists = require('../exists');
4
- const isMixin = require('../isMixin');
5
- const BasePlugin = require('../plugin');
6
- const { IE_5_5, IE_6, IE_7 } = require('../dictionary/browsers');
7
- const { SELECTOR } = require('../dictionary/identifiers');
8
- const { RULE } = require('../dictionary/postcss');
9
- const { BODY, HTML } = require('../dictionary/tags');
1
+ import parser from 'postcss-selector-parser';
2
+ import exists from '../exists.js';
3
+ import isMixin from '../isMixin.js';
4
+ import BasePlugin from '../plugin.js';
5
+ import { IE_5_5, IE_6, IE_7 } from '../dictionary/browsers.js';
6
+ import { SELECTOR } from '../dictionary/identifiers.js';
7
+ import { RULE } from '../dictionary/postcss.js';
8
+ import { BODY, HTML } from '../dictionary/tags.js';
10
9
 
11
- module.exports = class HtmlCombinatorCommentBody extends BasePlugin {
10
+ export default (class HtmlCombinatorCommentBody extends BasePlugin {
12
11
  /** @param {import('postcss').Result} result */
13
12
  constructor(result) {
14
13
  super([IE_5_5, IE_6, IE_7], [RULE], result);
@@ -51,4 +50,4 @@ module.exports = class HtmlCombinatorCommentBody extends BasePlugin {
51
50
  });
52
51
  };
53
52
  }
54
- };
53
+ });
@@ -1,14 +1,13 @@
1
- 'use strict';
2
- const parser = require('postcss-selector-parser');
3
- const exists = require('../exists');
4
- const isMixin = require('../isMixin');
5
- const BasePlugin = require('../plugin');
6
- const { OP_9 } = require('../dictionary/browsers');
7
- const { SELECTOR } = require('../dictionary/identifiers');
8
- const { RULE } = require('../dictionary/postcss');
9
- const { HTML } = require('../dictionary/tags');
1
+ import parser from 'postcss-selector-parser';
2
+ import exists from '../exists.js';
3
+ import isMixin from '../isMixin.js';
4
+ import BasePlugin from '../plugin.js';
5
+ import { OP_9 } from '../dictionary/browsers.js';
6
+ import { SELECTOR } from '../dictionary/identifiers.js';
7
+ import { RULE } from '../dictionary/postcss.js';
8
+ import { HTML } from '../dictionary/tags.js';
10
9
 
11
- module.exports = class HtmlFirstChild extends BasePlugin {
10
+ export default (class HtmlFirstChild extends BasePlugin {
12
11
  /** @param {import('postcss').Result} result */
13
12
  constructor(result) {
14
13
  super([OP_9], [RULE], result);
@@ -47,4 +46,4 @@ module.exports = class HtmlFirstChild extends BasePlugin {
47
46
  });
48
47
  };
49
48
  }
50
- };
49
+ });
@@ -1,9 +1,8 @@
1
- 'use strict';
2
- const BasePlugin = require('../plugin');
3
- const { IE_5_5, IE_6, IE_7 } = require('../dictionary/browsers');
4
- const { DECL } = require('../dictionary/postcss');
1
+ import BasePlugin from '../plugin.js';
2
+ import { IE_5_5, IE_6, IE_7 } from '../dictionary/browsers.js';
3
+ import { DECL } from '../dictionary/postcss.js';
5
4
 
6
- module.exports = class Important extends BasePlugin {
5
+ export default (class Important extends BasePlugin {
7
6
  /** @param {import('postcss').Result=} result */
8
7
  constructor(result) {
9
8
  super([IE_5_5, IE_6, IE_7], [DECL], result);
@@ -22,4 +21,4 @@ module.exports = class Important extends BasePlugin {
22
21
  });
23
22
  }
24
23
  }
25
- };
24
+ });
@@ -1,18 +1,17 @@
1
- 'use strict';
2
- const bodyEmpty = require('./bodyEmpty');
3
- const htmlCombinatorCommentBody = require('./htmlCombinatorCommentBody');
4
- const htmlFirstChild = require('./htmlFirstChild');
5
- const important = require('./important');
6
- const leadingStar = require('./leadingStar');
7
- const leadingUnderscore = require('./leadingUnderscore');
8
- const mediaSlash0 = require('./mediaSlash0');
9
- const mediaSlash0Slash9 = require('./mediaSlash0Slash9');
10
- const mediaSlash9 = require('./mediaSlash9');
11
- const slash9 = require('./slash9');
12
- const starHtml = require('./starHtml');
13
- const trailingSlashComma = require('./trailingSlashComma');
1
+ import bodyEmpty from './bodyEmpty.js';
2
+ import htmlCombinatorCommentBody from './htmlCombinatorCommentBody.js';
3
+ import htmlFirstChild from './htmlFirstChild.js';
4
+ import important from './important.js';
5
+ import leadingStar from './leadingStar.js';
6
+ import leadingUnderscore from './leadingUnderscore.js';
7
+ import mediaSlash0 from './mediaSlash0.js';
8
+ import mediaSlash0Slash9 from './mediaSlash0Slash9.js';
9
+ import mediaSlash9 from './mediaSlash9.js';
10
+ import slash9 from './slash9.js';
11
+ import starHtml from './starHtml.js';
12
+ import trailingSlashComma from './trailingSlashComma.js';
14
13
 
15
- module.exports = [
14
+ export default [
16
15
  bodyEmpty,
17
16
  htmlCombinatorCommentBody,
18
17
  htmlFirstChild,
@@ -1,14 +1,12 @@
1
- 'use strict';
2
- const BasePlugin = require('../plugin');
3
- const { IE_5_5, IE_6, IE_7 } = require('../dictionary/browsers');
4
- const { PROPERTY } = require('../dictionary/identifiers');
5
- const { ATRULE, DECL } = require('../dictionary/postcss');
1
+ import BasePlugin from '../plugin.js';
2
+ import { IE_5_5, IE_6, IE_7 } from '../dictionary/browsers.js';
3
+ import { PROPERTY } from '../dictionary/identifiers.js';
4
+ import { ATRULE, DECL } from '../dictionary/postcss.js';
6
5
 
7
6
  /** @import {Declaration, AtRule} from 'postcss'; */
8
7
 
9
8
  const hacks = '!_$_&_*_)_=_%_+_,_._/_`_]_#_~_?_:_|'.split('_');
10
-
11
- module.exports = class LeadingStar extends BasePlugin {
9
+ export default (class LeadingStar extends BasePlugin {
12
10
  /** @param {import('postcss').Result=} result */
13
11
  constructor(result) {
14
12
  super([IE_5_5, IE_6, IE_7], [ATRULE, DECL], result);
@@ -54,4 +52,4 @@ module.exports = class LeadingStar extends BasePlugin {
54
52
  }
55
53
  }
56
54
  }
57
- };
55
+ });
@@ -1,8 +1,7 @@
1
- 'use strict';
2
- const BasePlugin = require('../plugin');
3
- const { IE_6 } = require('../dictionary/browsers');
4
- const { PROPERTY } = require('../dictionary/identifiers');
5
- const { DECL } = require('../dictionary/postcss');
1
+ import BasePlugin from '../plugin.js';
2
+ import { IE_6 } from '../dictionary/browsers.js';
3
+ import { PROPERTY } from '../dictionary/identifiers.js';
4
+ import { DECL } from '../dictionary/postcss.js';
6
5
 
7
6
  const vendorPrefixRegex = /^(-\w+-)/;
8
7
  /**
@@ -17,8 +16,7 @@ function vendorPrefix(prop) {
17
16
 
18
17
  return '';
19
18
  }
20
-
21
- module.exports = class LeadingUnderscore extends BasePlugin {
19
+ export default (class LeadingUnderscore extends BasePlugin {
22
20
  /** @param {import('postcss').Result=} result */
23
21
  constructor(result) {
24
22
  super([IE_6], [DECL], result);
@@ -49,4 +47,4 @@ module.exports = class LeadingUnderscore extends BasePlugin {
49
47
  });
50
48
  }
51
49
  }
52
- };
50
+ });
@@ -1,10 +1,9 @@
1
- 'use strict';
2
- const BasePlugin = require('../plugin');
3
- const { IE_8 } = require('../dictionary/browsers');
4
- const { MEDIA_QUERY } = require('../dictionary/identifiers');
5
- const { ATRULE } = require('../dictionary/postcss');
1
+ import BasePlugin from '../plugin.js';
2
+ import { IE_8 } from '../dictionary/browsers.js';
3
+ import { MEDIA_QUERY } from '../dictionary/identifiers.js';
4
+ import { ATRULE } from '../dictionary/postcss.js';
6
5
 
7
- module.exports = class MediaSlash0 extends BasePlugin {
6
+ export default (class MediaSlash0 extends BasePlugin {
8
7
  /** @param {import('postcss').Result} result */
9
8
  constructor(result) {
10
9
  super([IE_8], [ATRULE], result);
@@ -23,4 +22,4 @@ module.exports = class MediaSlash0 extends BasePlugin {
23
22
  });
24
23
  }
25
24
  }
26
- };
25
+ });
@@ -1,10 +1,9 @@
1
- 'use strict';
2
- const BasePlugin = require('../plugin');
3
- const { IE_5_5, IE_6, IE_7, IE_8 } = require('../dictionary/browsers');
4
- const { MEDIA_QUERY } = require('../dictionary/identifiers');
5
- const { ATRULE } = require('../dictionary/postcss');
1
+ import BasePlugin from '../plugin.js';
2
+ import { IE_5_5, IE_6, IE_7, IE_8 } from '../dictionary/browsers.js';
3
+ import { MEDIA_QUERY } from '../dictionary/identifiers.js';
4
+ import { ATRULE } from '../dictionary/postcss.js';
6
5
 
7
- module.exports = class MediaSlash0Slash9 extends BasePlugin {
6
+ export default (class MediaSlash0Slash9 extends BasePlugin {
8
7
  /** @param {import('postcss').Result} result */
9
8
  constructor(result) {
10
9
  super([IE_5_5, IE_6, IE_7, IE_8], [ATRULE], result);
@@ -24,4 +23,4 @@ module.exports = class MediaSlash0Slash9 extends BasePlugin {
24
23
  });
25
24
  }
26
25
  }
27
- };
26
+ });
@@ -1,10 +1,9 @@
1
- 'use strict';
2
- const BasePlugin = require('../plugin');
3
- const { IE_5_5, IE_6, IE_7 } = require('../dictionary/browsers');
4
- const { MEDIA_QUERY } = require('../dictionary/identifiers');
5
- const { ATRULE } = require('../dictionary/postcss');
1
+ import BasePlugin from '../plugin.js';
2
+ import { IE_5_5, IE_6, IE_7 } from '../dictionary/browsers.js';
3
+ import { MEDIA_QUERY } from '../dictionary/identifiers.js';
4
+ import { ATRULE } from '../dictionary/postcss.js';
6
5
 
7
- module.exports = class MediaSlash9 extends BasePlugin {
6
+ export default (class MediaSlash9 extends BasePlugin {
8
7
  /** @param {import('postcss').Result=} result */
9
8
  constructor(result) {
10
9
  super([IE_5_5, IE_6, IE_7], [ATRULE], result);
@@ -24,4 +23,4 @@ module.exports = class MediaSlash9 extends BasePlugin {
24
23
  });
25
24
  }
26
25
  }
27
- };
26
+ });
@@ -1,10 +1,9 @@
1
- 'use strict';
2
- const BasePlugin = require('../plugin.js');
3
- const { IE_6, IE_7, IE_8 } = require('../dictionary/browsers');
4
- const { VALUE } = require('../dictionary/identifiers');
5
- const { DECL } = require('../dictionary/postcss');
1
+ import BasePlugin from '../plugin.js';
2
+ import { IE_6, IE_7, IE_8 } from '../dictionary/browsers.js';
3
+ import { VALUE } from '../dictionary/identifiers.js';
4
+ import { DECL } from '../dictionary/postcss.js';
6
5
 
7
- module.exports = class Slash9 extends BasePlugin {
6
+ export default (class Slash9 extends BasePlugin {
8
7
  /** @param {import('postcss').Result=} result */
9
8
  constructor(result) {
10
9
  super([IE_6, IE_7, IE_8], [DECL], result);
@@ -23,4 +22,4 @@ module.exports = class Slash9 extends BasePlugin {
23
22
  });
24
23
  }
25
24
  }
26
- };
25
+ });
@@ -1,14 +1,13 @@
1
- 'use strict';
2
- const parser = require('postcss-selector-parser');
3
- const exists = require('../exists');
4
- const isMixin = require('../isMixin');
5
- const BasePlugin = require('../plugin');
6
- const { IE_5_5, IE_6 } = require('../dictionary/browsers');
7
- const { SELECTOR } = require('../dictionary/identifiers');
8
- const { RULE } = require('../dictionary/postcss');
9
- const { HTML } = require('../dictionary/tags');
1
+ import parser from 'postcss-selector-parser';
2
+ import exists from '../exists.js';
3
+ import isMixin from '../isMixin.js';
4
+ import BasePlugin from '../plugin.js';
5
+ import { IE_5_5, IE_6 } from '../dictionary/browsers.js';
6
+ import { SELECTOR } from '../dictionary/identifiers.js';
7
+ import { RULE } from '../dictionary/postcss.js';
8
+ import { HTML } from '../dictionary/tags.js';
10
9
 
11
- module.exports = class StarHtml extends BasePlugin {
10
+ export default (class StarHtml extends BasePlugin {
12
11
  /** @param {import('postcss').Result=} result */
13
12
  constructor(result) {
14
13
  super([IE_5_5, IE_6], [RULE], result);
@@ -47,4 +46,4 @@ module.exports = class StarHtml extends BasePlugin {
47
46
  });
48
47
  };
49
48
  }
50
- };
49
+ });
@@ -1,11 +1,10 @@
1
- 'use strict';
2
- const BasePlugin = require('../plugin');
3
- const isMixin = require('../isMixin');
4
- const { IE_5_5, IE_6, IE_7 } = require('../dictionary/browsers');
5
- const { SELECTOR } = require('../dictionary/identifiers');
6
- const { RULE } = require('../dictionary/postcss');
1
+ import BasePlugin from '../plugin.js';
2
+ import isMixin from '../isMixin.js';
3
+ import { IE_5_5, IE_6, IE_7 } from '../dictionary/browsers.js';
4
+ import { SELECTOR } from '../dictionary/identifiers.js';
5
+ import { RULE } from '../dictionary/postcss.js';
7
6
 
8
- module.exports = class TrailingSlashComma extends BasePlugin {
7
+ export default (class TrailingSlashComma extends BasePlugin {
9
8
  /** @param {import('postcss').Result=} result */
10
9
  constructor(result) {
11
10
  super([IE_5_5, IE_6, IE_7], [RULE], result);
@@ -33,4 +32,4 @@ module.exports = class TrailingSlashComma extends BasePlugin {
33
32
  });
34
33
  }
35
34
  }
36
- };
35
+ });
@@ -1,10 +1,8 @@
1
- declare const _exports: {
2
- FF_2: string;
3
- IE_5_5: string;
4
- IE_6: string;
5
- IE_7: string;
6
- IE_8: string;
7
- OP_9: string;
8
- };
9
- export = _exports;
1
+ declare const FF_2 = "firefox 2";
2
+ declare const IE_5_5 = "ie 5.5";
3
+ declare const IE_6 = "ie 6";
4
+ declare const IE_7 = "ie 7";
5
+ declare const IE_8 = "ie 8";
6
+ declare const OP_9 = "opera 9";
7
+ export { FF_2, IE_5_5, IE_6, IE_7, IE_8, OP_9 };
10
8
  //# sourceMappingURL=browsers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browsers.d.ts","sourceRoot":"","sources":["../../src/dictionary/browsers.js"],"names":[],"mappings":""}
1
+ {"version":3,"file":"browsers.d.ts","sourceRoot":"","sources":["../../src/dictionary/browsers.js"],"names":[],"mappings":"AAAA,QAAA,MAAM,IAAI,cAAc,CAAC;AACzB,QAAA,MAAM,MAAM,WAAW,CAAC;AACxB,QAAA,MAAM,IAAI,SAAS,CAAC;AACpB,QAAA,MAAM,IAAI,SAAS,CAAC;AACpB,QAAA,MAAM,IAAI,SAAS,CAAC;AACpB,QAAA,MAAM,IAAI,YAAY,CAAC;AACvB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC"}