stylehacks 8.0.3 → 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": "stylehacks",
3
- "version": "8.0.3",
3
+ "version": "8.0.4",
4
4
  "description": "Detect/remove browser hacks from CSS files.",
5
5
  "exports": {
6
6
  ".": {
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "repository": {
44
44
  "type": "git",
45
- "url": "cssnano/cssnano"
45
+ "url": "git+https://github.com/cssnano/cssnano.git"
46
46
  },
47
47
  "dependencies": {
48
48
  "browserslist": "^4.28.8",
package/src/index.js CHANGED
@@ -23,6 +23,7 @@ function pluginCreator(opts = {}) {
23
23
  prepare(result) {
24
24
  const { stats, env, from, file } = result.opts || {};
25
25
  const browsers = getBrowsersList(opts, stats, from, file, env);
26
+ const browserSet = new Set(browsers);
26
27
 
27
28
  return /** import('postcss').Plugin */ {
28
29
  /**
@@ -33,7 +34,7 @@ function pluginCreator(opts = {}) {
33
34
  const processors = [];
34
35
  for (const Plugin of plugins) {
35
36
  const hack = new Plugin(result);
36
- if (!browsers.some((browser) => hack.targets.has(browser))) {
37
+ if (browserSet.isDisjointFrom(hack.targets)) {
37
38
  processors.push(hack);
38
39
  }
39
40
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";YAqEiE,CAAC,IAAI,EAAE,OAAO,SAAS,EAAE,IAAI,KAAK,OAAO;;;AAhEvG,OAAQ,KAAA,YAAY,MAAM,cAAc,CACxC;AAAA,YAAwD,mBAAmB,GAAjE;IAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAqB;AAC3E,YAAgE,mBAAmB,GAAzE,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,CAAqB;AACnF,YAAwE,OAAO,GAArE;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAC,GAAG,mBAAmB,GAAG,mBAAmB,CAAS"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.js"],"names":[],"mappings":";YAsEiE,CAAC,IAAI,EAAE,OAAO,SAAS,EAAE,IAAI,KAAK,OAAO;;;AAjEvG,OAAQ,KAAA,YAAY,MAAM,cAAc,CACxC;AAAA,YAAwD,mBAAmB,GAAjE;IAAE,oBAAoB,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;CAAE,CAAqB;AAC3E,YAAgE,mBAAmB,GAAzE,IAAI,CAAC,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC,CAAqB;AACnF,YAAwE,OAAO,GAArE;IAAC,IAAI,CAAC,EAAE,OAAO,CAAA;CAAC,GAAG,mBAAmB,GAAG,mBAAmB,CAAS"}