stylehacks 5.1.0 → 5.1.1

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/LICENSE-MIT CHANGED
File without changes
package/README.md CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stylehacks",
3
- "version": "5.1.0",
3
+ "version": "5.1.1",
4
4
  "description": "Detect/remove browser hacks from CSS files.",
5
5
  "main": "src/index.js",
6
6
  "types": "types/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "repository": "cssnano/cssnano",
30
30
  "dependencies": {
31
- "browserslist": "^4.16.6",
31
+ "browserslist": "^4.21.4",
32
32
  "postcss-selector-parser": "^6.0.4"
33
33
  },
34
34
  "bugs": {
@@ -42,6 +42,5 @@
42
42
  },
43
43
  "peerDependencies": {
44
44
  "postcss": "^8.2.15"
45
- },
46
- "readme": "# stylehacks\n\n> Detect/remove browser hacks from CSS files.\n\n\n## Install\n\nWith [npm](https://npmjs.org/package/stylehacks) do:\n\n```\nnpm install stylehacks --save\n```\n\n\n## Example\n\nIn its default mode, stylehacks will remove hacks from your CSS file, based on\nthe browsers that you wish to support.\n\n### Input\n\n```css\nh1 {\n _color: white;\n color: rgba(255, 255, 255, 0.5);\n}\n```\n\n### Output\n\n```css\nh1 {\n color: rgba(255, 255, 255, 0.5);\n}\n```\n\n\n## API\n\n### `stylehacks.detect(node)`\n\nType: `function` \nReturns: `boolean`\n\nThis method will take any PostCSS *node*, run applicable plugins depending on\nits type, then will return a boolean depending on whether it found any of\nthe supported hacks. For example, if the `decl` node found below is passed to\nthe `detect` function, it will return `true`. But if the `rule` node is passed,\nit will return `false` instead.\n\n```css\nh1 { _color: red }\n```\n\n### `postcss([ stylehacks(opts) ])`\n\nstylehacks can also be consumed as a PostCSS plugin. See the\n[documentation](https://github.com/postcss/postcss#usage) for examples for\nyour environment.\n\n#### options\n\n##### lint\n\nType: `boolean` \nDefault: `false`\n\nIf lint mode is enabled, stylehacks will not remove hacks from the CSS; instead,\nit will add warnings to `Result#messages`.\n\n\n## Related\n\nstylehacks works well with your existing PostCSS setup:\n\n* [stylelint] - Comprehensive & modern CSS linter, to ensure that your code\n style rules are respected.\n\n\n## Contributing\n\nPull requests are welcome. If you add functionality, then please add unit tests\nto cover it.\n\n\n## License\n\nMIT © [Ben Briggs](http://beneb.info)\n\n\n[stylelint]: https://github.com/stylelint/stylelint\n"
45
+ }
47
46
  }
package/src/index.js CHANGED
File without changes
package/src/plugin.js CHANGED
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,365 +1,6 @@
1
- declare const _exports: {
2
- [n: number]: {
3
- new (result?: import("postcss").Result | undefined): important;
4
- } | {
5
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
6
- };
7
- length: number;
8
- toString(): string;
9
- toLocaleString(): string;
10
- pop(): {
11
- new (result?: import("postcss").Result | undefined): important;
12
- } | {
13
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
14
- } | undefined;
15
- push(...items: ({
16
- new (result?: import("postcss").Result | undefined): important;
17
- } | {
18
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
19
- })[]): number;
20
- concat(...items: ConcatArray<{
21
- new (result?: import("postcss").Result | undefined): important;
22
- } | {
23
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
24
- }>[]): ({
25
- new (result?: import("postcss").Result | undefined): important;
26
- } | {
27
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
28
- })[];
29
- concat(...items: ({
30
- new (result?: import("postcss").Result | undefined): important;
31
- } | {
32
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
33
- } | ConcatArray<{
34
- new (result?: import("postcss").Result | undefined): important;
35
- } | {
36
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
37
- }>)[]): ({
38
- new (result?: import("postcss").Result | undefined): important;
39
- } | {
40
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
41
- })[];
42
- join(separator?: string | undefined): string;
43
- reverse(): ({
44
- new (result?: import("postcss").Result | undefined): important;
45
- } | {
46
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
47
- })[];
48
- shift(): {
49
- new (result?: import("postcss").Result | undefined): important;
50
- } | {
51
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
52
- } | undefined;
53
- slice(start?: number | undefined, end?: number | undefined): ({
54
- new (result?: import("postcss").Result | undefined): important;
55
- } | {
56
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
57
- })[];
58
- sort(compareFn?: ((a: {
59
- new (result?: import("postcss").Result | undefined): important;
60
- } | {
61
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
62
- }, b: {
63
- new (result?: import("postcss").Result | undefined): important;
64
- } | {
65
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
66
- }) => number) | undefined): ({
67
- new (result?: import("postcss").Result | undefined): important;
68
- } | {
69
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
70
- })[];
71
- splice(start: number, deleteCount?: number | undefined): ({
72
- new (result?: import("postcss").Result | undefined): important;
73
- } | {
74
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
75
- })[];
76
- splice(start: number, deleteCount: number, ...items: ({
77
- new (result?: import("postcss").Result | undefined): important;
78
- } | {
79
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
80
- })[]): ({
81
- new (result?: import("postcss").Result | undefined): important;
82
- } | {
83
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
84
- })[];
85
- unshift(...items: ({
86
- new (result?: import("postcss").Result | undefined): important;
87
- } | {
88
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
89
- })[]): number;
90
- indexOf(searchElement: {
91
- new (result?: import("postcss").Result | undefined): important;
92
- } | {
93
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
94
- }, fromIndex?: number | undefined): number;
95
- lastIndexOf(searchElement: {
96
- new (result?: import("postcss").Result | undefined): important;
97
- } | {
98
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
99
- }, fromIndex?: number | undefined): number;
100
- every<S extends {
101
- new (result?: import("postcss").Result | undefined): important;
102
- } | {
103
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
104
- }>(predicate: (value: {
105
- new (result?: import("postcss").Result | undefined): important;
106
- } | {
107
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
108
- }, index: number, array: ({
109
- new (result?: import("postcss").Result | undefined): important;
110
- } | {
111
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
112
- })[]) => value is S, thisArg?: any): this is S[];
113
- every(predicate: (value: {
114
- new (result?: import("postcss").Result | undefined): important;
115
- } | {
116
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
117
- }, index: number, array: ({
118
- new (result?: import("postcss").Result | undefined): important;
119
- } | {
120
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
121
- })[]) => unknown, thisArg?: any): boolean;
122
- some(predicate: (value: {
123
- new (result?: import("postcss").Result | undefined): important;
124
- } | {
125
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
126
- }, index: number, array: ({
127
- new (result?: import("postcss").Result | undefined): important;
128
- } | {
129
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
130
- })[]) => unknown, thisArg?: any): boolean;
131
- forEach(callbackfn: (value: {
132
- new (result?: import("postcss").Result | undefined): important;
133
- } | {
134
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
135
- }, index: number, array: ({
136
- new (result?: import("postcss").Result | undefined): important;
137
- } | {
138
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
139
- })[]) => void, thisArg?: any): void;
140
- map<U>(callbackfn: (value: {
141
- new (result?: import("postcss").Result | undefined): important;
142
- } | {
143
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
144
- }, index: number, array: ({
145
- new (result?: import("postcss").Result | undefined): important;
146
- } | {
147
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
148
- })[]) => U, thisArg?: any): U[];
149
- filter<S_1 extends {
150
- new (result?: import("postcss").Result | undefined): important;
151
- } | {
152
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
153
- }>(predicate: (value: {
154
- new (result?: import("postcss").Result | undefined): important;
155
- } | {
156
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
157
- }, index: number, array: ({
158
- new (result?: import("postcss").Result | undefined): important;
159
- } | {
160
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
161
- })[]) => value is S_1, thisArg?: any): S_1[];
162
- filter(predicate: (value: {
163
- new (result?: import("postcss").Result | undefined): important;
164
- } | {
165
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
166
- }, index: number, array: ({
167
- new (result?: import("postcss").Result | undefined): important;
168
- } | {
169
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
170
- })[]) => unknown, thisArg?: any): ({
171
- new (result?: import("postcss").Result | undefined): important;
172
- } | {
173
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
174
- })[];
175
- reduce(callbackfn: (previousValue: {
176
- new (result?: import("postcss").Result | undefined): important;
177
- } | {
178
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
179
- }, currentValue: {
180
- new (result?: import("postcss").Result | undefined): important;
181
- } | {
182
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
183
- }, currentIndex: number, array: ({
184
- new (result?: import("postcss").Result | undefined): important;
185
- } | {
186
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
187
- })[]) => {
188
- new (result?: import("postcss").Result | undefined): important;
189
- } | {
190
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
191
- }): {
192
- new (result?: import("postcss").Result | undefined): important;
193
- } | {
194
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
195
- };
196
- reduce(callbackfn: (previousValue: {
197
- new (result?: import("postcss").Result | undefined): important;
198
- } | {
199
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
200
- }, currentValue: {
201
- new (result?: import("postcss").Result | undefined): important;
202
- } | {
203
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
204
- }, currentIndex: number, array: ({
205
- new (result?: import("postcss").Result | undefined): important;
206
- } | {
207
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
208
- })[]) => {
209
- new (result?: import("postcss").Result | undefined): important;
210
- } | {
211
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
212
- }, initialValue: {
213
- new (result?: import("postcss").Result | undefined): important;
214
- } | {
215
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
216
- }): {
217
- new (result?: import("postcss").Result | undefined): important;
218
- } | {
219
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
220
- };
221
- reduce<U_1>(callbackfn: (previousValue: U_1, currentValue: {
222
- new (result?: import("postcss").Result | undefined): important;
223
- } | {
224
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
225
- }, currentIndex: number, array: ({
226
- new (result?: import("postcss").Result | undefined): important;
227
- } | {
228
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
229
- })[]) => U_1, initialValue: U_1): U_1;
230
- reduceRight(callbackfn: (previousValue: {
231
- new (result?: import("postcss").Result | undefined): important;
232
- } | {
233
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
234
- }, currentValue: {
235
- new (result?: import("postcss").Result | undefined): important;
236
- } | {
237
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
238
- }, currentIndex: number, array: ({
239
- new (result?: import("postcss").Result | undefined): important;
240
- } | {
241
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
242
- })[]) => {
243
- new (result?: import("postcss").Result | undefined): important;
244
- } | {
245
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
246
- }): {
247
- new (result?: import("postcss").Result | undefined): important;
248
- } | {
249
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
250
- };
251
- reduceRight(callbackfn: (previousValue: {
252
- new (result?: import("postcss").Result | undefined): important;
253
- } | {
254
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
255
- }, currentValue: {
256
- new (result?: import("postcss").Result | undefined): important;
257
- } | {
258
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
259
- }, currentIndex: number, array: ({
260
- new (result?: import("postcss").Result | undefined): important;
261
- } | {
262
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
263
- })[]) => {
264
- new (result?: import("postcss").Result | undefined): important;
265
- } | {
266
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
267
- }, initialValue: {
268
- new (result?: import("postcss").Result | undefined): important;
269
- } | {
270
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
271
- }): {
272
- new (result?: import("postcss").Result | undefined): important;
273
- } | {
274
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
275
- };
276
- reduceRight<U_2>(callbackfn: (previousValue: U_2, currentValue: {
277
- new (result?: import("postcss").Result | undefined): important;
278
- } | {
279
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
280
- }, currentIndex: number, array: ({
281
- new (result?: import("postcss").Result | undefined): important;
282
- } | {
283
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
284
- })[]) => U_2, initialValue: U_2): U_2;
285
- find<S_2 extends {
286
- new (result?: import("postcss").Result | undefined): important;
287
- } | {
288
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
289
- }>(predicate: (this: void, value: {
290
- new (result?: import("postcss").Result | undefined): important;
291
- } | {
292
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
293
- }, index: number, obj: ({
294
- new (result?: import("postcss").Result | undefined): important;
295
- } | {
296
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
297
- })[]) => value is S_2, thisArg?: any): S_2 | undefined;
298
- find(predicate: (value: {
299
- new (result?: import("postcss").Result | undefined): important;
300
- } | {
301
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
302
- }, index: number, obj: ({
303
- new (result?: import("postcss").Result | undefined): important;
304
- } | {
305
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
306
- })[]) => unknown, thisArg?: any): {
307
- new (result?: import("postcss").Result | undefined): important;
308
- } | {
309
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
310
- } | undefined;
311
- findIndex(predicate: (value: {
312
- new (result?: import("postcss").Result | undefined): important;
313
- } | {
314
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
315
- }, index: number, obj: ({
316
- new (result?: import("postcss").Result | undefined): important;
317
- } | {
318
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
319
- })[]) => unknown, thisArg?: any): number;
320
- fill(value: {
321
- new (result?: import("postcss").Result | undefined): important;
322
- } | {
323
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
324
- }, start?: number | undefined, end?: number | undefined): ({
325
- new (result?: import("postcss").Result | undefined): important;
326
- } | {
327
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
328
- })[];
329
- copyWithin(target: number, start: number, end?: number | undefined): ({
330
- new (result?: import("postcss").Result | undefined): important;
331
- } | {
332
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
333
- })[];
334
- entries(): IterableIterator<[number, {
335
- new (result?: import("postcss").Result | undefined): important;
336
- } | {
337
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
338
- }]>;
339
- keys(): IterableIterator<number>;
340
- values(): IterableIterator<{
341
- new (result?: import("postcss").Result | undefined): important;
342
- } | {
343
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
344
- }>;
345
- includes(searchElement: {
346
- new (result?: import("postcss").Result | undefined): important;
347
- } | {
348
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
349
- }, fromIndex?: number | undefined): boolean;
350
- [Symbol.iterator](): IterableIterator<{
351
- new (result?: import("postcss").Result | undefined): important;
352
- } | {
353
- new (result?: import("postcss").Result | undefined): trailingSlashComma;
354
- }>;
355
- [Symbol.unscopables](): {
356
- copyWithin: boolean;
357
- entries: boolean;
358
- fill: boolean;
359
- find: boolean;
360
- findIndex: boolean;
361
- keys: boolean;
362
- values: boolean;
363
- };
364
- };
1
+ declare const _exports: ({
2
+ new (result?: import("postcss").Result | undefined): important;
3
+ } | {
4
+ new (result?: import("postcss").Result | undefined): trailingSlashComma;
5
+ })[];
365
6
  export = _exports;