postcss-preset-env 7.0.0 → 7.2.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/CHANGELOG.md ADDED
@@ -0,0 +1,413 @@
1
+ # Changes to PostCSS Preset Env
2
+
3
+ ### 7.2.0 (January 2, 2022)
4
+
5
+ - Added warnings and useful messages when a feature that doesn't exist is configured. [156](https://github.com/csstools/postcss-preset-env/issues/156).
6
+
7
+ When configured with these options for example:
8
+
9
+ ```js
10
+ options: {
11
+ features: {
12
+ "custom-media": true,
13
+ "postcss-logical": true,
14
+ "postcss-logica": true,
15
+ }
16
+ }
17
+ ```
18
+
19
+ It will yield the following warnings:
20
+
21
+ ```bash
22
+ Unknown feature: "custom-media" did you mean: "custom-media-queries"
23
+ Unknown feature: "postcss-logical" did you mean: "logical-properties-and-values"
24
+ Unknown feature: "postcss-logica" did you mean: "logical-properties-and-values"
25
+ ```
26
+
27
+ - Removed Sourcemaps from package tarball.
28
+ - Moved CLI to CLI Package. See [announcement](https://github.com/csstools/postcss-plugins/discussions/121).
29
+ - Updated `postcss` to 8.4 (minor)
30
+ - Updated `autoprefixer` to 10.4.1 (patch)
31
+ - Updated `caniuse-lite` to 1.0.30001295 (patch)
32
+ - Updated `css-blank-pseudo` to 3.0.1 (patch)
33
+ - Updated `css-has-pseudo` to 3.0.2 (patch)
34
+ - Updated `css-prefers-color-scheme` to 6.0.2 (patch)
35
+ - Updated `postcss-color-functional-notation` to 4.2.1 (minor)
36
+ - Updated `postcss-color-hex-alpha` to 8.0.2 (patch)
37
+ - Updated `postcss-custom-properties` to 12.0.2 (patch)
38
+ - Updated `postcss-dir-pseudo-class` to 6.0.2 (patch)
39
+ - Updated `postcss-double-position-gradients` to 3.0.4 (patch)
40
+ - Updated `postcss-env-function` to 4.0.4 (patch)
41
+ - Updated `postcss-focus-visible` to 6.0.3 (patch)
42
+ - Updated `postcss-focus-within` to 5.0.3 (patch)
43
+ - Updated `postcss-gap-properties` to 3.0.2 (patch)
44
+ - Updated `postcss-image-set-function` to 4.0.4 (patch)
45
+ - Updated `postcss-lab-function` to 4.0.3 (patch)
46
+ - Updated `postcss-logical` to 5.0.2 (patch)
47
+ - Updated `postcss-nesting` to 10.1.1 (minor)
48
+ - Updated `postcss-overflow-shorthand` to 3.0.2 (patch)
49
+ - Updated `postcss-place` to 7.0.3 (patch)
50
+ - Updated `postcss-pseudo-class-any-link` to 7.0.2 (patch)
51
+
52
+ ### 7.1.0 (December 22, 2021)
53
+
54
+ - Updated [`postcss-nesting` to `10.1.0` (minor)](https://github.com/csstools/postcss-plugins/blob/main/plugins/postcss-nesting/CHANGELOG.md#changes-to-postcss-nesting)
55
+
56
+ ### 7.0.2 (December 16, 2021)
57
+
58
+ - Fixed unexpected behaviours when using different versions of `postcss-values-parser` across the plugins [228](https://github.com/csstools/postcss-preset-env/issues/228)
59
+ - Updated `browserlist` to 4.19.1 (minor)
60
+ - Updated `caniuse-lite` to `1.0.30001287` (minor)
61
+ - Updated `css-blank-pseudo` to `3.0.0` (major)
62
+ - Updated `css-has-pseudo` to `3.0.0` (major)
63
+ - Updated `css-prefers-color-scheme` to `6.0.0` (major)
64
+ - Updated `postcss-color-functional-notation` to `4.1.0` (minor)
65
+ - Updated `postcss-color-hex-alpha` to `8.0.1` (patch)
66
+ - Updated `postcss-color-rebeccapurple` to `7.0.1` (patch)
67
+ - Updated `postcss-custom-properties` to `12.0.1` (patch)
68
+ - Updated `postcss-dir-pseudo-class` to `6.0.1` (patch)
69
+ - Updated `postcss-double-position-gradients` to `3.0.3` (patch)
70
+ - Updated `postcss-env-function` to `4.0.3` (patch)
71
+ - Updated `postcss-focus-visible` to `6.0.2` (patch)
72
+ - Updated `postcss-focus-within` to `5.0.2` (patch)
73
+ - Updated `postcss-gap-properties` to `3.0.1` (patch)
74
+ - Updated `postcss-image-set-function` to `4.0.3` (patch)
75
+ - Updated `postcss-lab-function` to `4.0.2` (patch)
76
+ - Updated `postcss-logical` to `5.0.1` (patch)
77
+ - Updated `postcss-nesting` to `10.0.3` (patch)
78
+ - Updated `postcss-overflow-shorthand` to `3.0.1` (patch)
79
+ - Updated `postcss-place` to `7.0.2` (patch)
80
+ - Updated `postcss-pseudo-class-any-link` to `7.0.1` (patch)
81
+ - Updated documentation
82
+ - Updated `postcss` to be a peer dependency.
83
+
84
+ ### 7.0.1 (November 19, 2021)
85
+
86
+ - Fixed infinite loop in double-position-gradients [223](https://github.com/csstools/postcss-preset-env/issues/223)
87
+ - Fixed "Unknown word" errors in when parsing CSS values [224](https://github.com/csstools/postcss-preset-env/issues/224)
88
+ - Fixed "undefined" CSS values after transforms with postcss-place [225](https://github.com/csstools/postcss-preset-env/issues/225)
89
+ - Updated `postcss-color-functional-notation` to 4.0.1 (patch)
90
+ - Updated `postcss-double-position-gradients` to 3.0.1 (patch)
91
+ - Updated `postcss-env-function` to 4.0.2 (patch)
92
+ - Updated `postcss-image-set-function` to 4.0.2 (patch)
93
+ - Updated `postcss-lab-function` to 4.0.1 (patch)
94
+ - Updated `postcss-nesting` to 10.0.2 (patch)
95
+ - Updated `postcss-place` to 7.0.1 (patch)
96
+
97
+ ### 7.0.0 (November 16, 2021)
98
+
99
+ - Updated `autoprefixer` to 10.4.0 (major)
100
+ - Updated `browserslist` to 4.17.5 (minor)
101
+ - Updated `caniuse-lite` to 1.0.30001272 (patch)
102
+ - Updated `css-blank-pseudo` to 2.0.0 (major)
103
+ - Updated `css-has-pseudo` to 2.0.0 (major)
104
+ - Updated `css-prefers-color-scheme` to 5.0.0 (major)
105
+ - Updated `cssdb` to 5.0.0 (major)
106
+ - Updated `postcss` to 8.3.0 (major)
107
+ - Updated `postcss-attribute-case-insensitive` to 5.0.0 (major)
108
+ - Updated `postcss-color-functional-notation` to 4.0.0 (major)
109
+ - Updated `postcss-color-hex-alpha` to 8.0.0 (major)
110
+ - Updated `postcss-color-rebeccapurple` to 7.0.0 (major)
111
+ - Updated `postcss-custom-media` to 8.0.0 (major)
112
+ - Updated `postcss-custom-properties` to 12.0.0 (major)
113
+ - Updated `postcss-custom-selectors` to 6.0.0 (major)
114
+ - Updated `postcss-dir-pseudo-class` to 6.0.0 (major)
115
+ - Updated `postcss-double-position-gradients` to 3.0.0 (major)
116
+ - Updated `postcss-env-function` to 4.0.1 (major)
117
+ - Updated `postcss-focus-visible` to 6.0.1 (major)
118
+ - Updated `postcss-focus-within` to 5.0.1 (major)
119
+ - Updated `postcss-font-variant` to 5.0.0 (major)
120
+ - Updated `postcss-gap-properties` to 3.0.0 (major)
121
+ - Updated `postcss-image-set-function` to 4.0.0 (major)
122
+ - Updated `postcss-initial` to 3.0.4 (patch)
123
+ - Updated `postcss-lab-function` to 4.0.0 (major)
124
+ - Updated `postcss-logical` to 5.0.0 (major)
125
+ - Updated `postcss-media-minmax` to 5.0.0 (major)
126
+ - Updated `postcss-nesting` to 10.0.0 (major)
127
+ - Updated `postcss-overflow-shorthand` to 3.0.0 (major)
128
+ - Updated `postcss-page-break` to 3.0.4 (major)
129
+ - Updated `postcss-place` to 7.0.0 (major)
130
+ - Updated `postcss-pseudo-class-any-link` to 7.0.0 (major)
131
+ - Updated `postcss-replace-overflow-wrap` to 4.0.0 (major)
132
+ - Removed `postcss-selector-matches`
133
+ - Removed `postcss-color-gray`
134
+ - Updated support for Node 12+ (major)
135
+
136
+ ### 6.7.0 (July 8, 2019)
137
+
138
+ - Fixed the issue of autoprefixer alerting an upcoming change to the API
139
+ - Updated `autoprefixer` to 9.6.1 (minor)
140
+ - Updated `browserslist` to 4.6.4 (minor)
141
+ - Updated `cssdb` to 4.4.0 (minor)
142
+ - Updated `caniuse-lite` to 1.0.30000981 (patch)
143
+ - Updated `postcss` to 7.0.17 (patch)
144
+ - Updated `postcss-color-hex-alpha` to 5.0.3 (patch)
145
+ - Updated `postcss-custom-media` to 7.0.8 (patch)
146
+ - Updated `postcss-custom-properties` to 8.0.11 (patch)
147
+
148
+ ### 6.6.0 (February 28, 2019)
149
+
150
+ - Moved browserslist detection from using each input file per process to using
151
+ the working directory on intialization, as was implied by the documentation.
152
+ If fixing this previously undocumented behavior causes any harm to existing
153
+ projects, it can be easily rolled back in a subsequent patch. For the
154
+ majority of projects — those with a singular browserslist configuration and
155
+ potentially many individually processed CSS files — we should expect reported
156
+ build times around 35 seconds to drop to less than 2 seconds.
157
+ - Updated `browserslist` to 4.4.2 (minor)
158
+ - Updated `autoprefixer` to 9.4.9 (patch)
159
+ - Updated `caniuse-lite` to 1.0.30000939 (patch)
160
+ - Updated `postcss` to 7.0.14 (patch)
161
+ - Updated `postcss-attribute-case-insensitive` to 4.0.1 (patch)
162
+
163
+ ### 6.5.0 (December 12, 2018)
164
+
165
+ - Added `css-blank-pseudo` polyfill
166
+ - Added `css-has-pseudo` polyfill
167
+ - Updated `autoprefixer` to 9.4.2 (minor)
168
+ - Updated `browserslist` to 4.3.5 (minor)
169
+ - Updated `caniuse-lite` to 1.0.30000918 (patch)
170
+ - Updated `css-prefers-color-scheme` to 3.1.1 (minor, patch for this project)
171
+ - Updated `cssdb` to 4.3.0 (minor)
172
+ - Updated `postcss` to 7.0.6 (patch)
173
+
174
+ ### 6.4.0 (November 6, 2018)
175
+
176
+ - Fixed `exportTo` option to export Custom Media, Custom Properties, and Custom
177
+ Selectors all to the same function, object, or file
178
+ - Added `css-prefers-color-scheme` 3.0.0 (major, non-breaking for this project)
179
+ - Updated `cssdb` to 4.2.0 (minor)
180
+
181
+ ### 6.3.1 (November 5, 2018)
182
+
183
+ - Updated `caniuse-lite` to 1.0.30000905 (patch)
184
+ - Updated `postcss-custom-properties` to 8.0.9 (patch)
185
+
186
+ ### 6.3.0 (October 28, 2018)
187
+
188
+ - Added `postcss-double-position-gradients` 1.0.0 (major, non-breaking for this project)
189
+ - Updated `autoprefixer` to 9.3.1 (minor)
190
+ - Updated `browserslist` to 4.3.4 (patch)
191
+ - Updated `caniuse-lite` to 1.0.30000899 (patch)
192
+ - Updated `cssdb` to 4.1.0 (major, non-breaking for this project)
193
+
194
+ ### 6.2.0 (October 22, 2018)
195
+
196
+ - Updated `autoprefixer` to 9.2.1 (minor)
197
+ - Updated `browserslist` to 4.3.1 (minor)
198
+
199
+ ### 6.1.2 (October 19, 2018)
200
+
201
+ - Updated `browserslist` to 4.2.1 (patch)
202
+ - Updated `caniuse-lite` to 1.0.30000893 (patch)
203
+ - Updated `postcss-custom-media` to 7.0.7 (patch)
204
+
205
+ ### 6.1.1 (October 12, 2018)
206
+
207
+ - Updated: `postcss-custom-media` to 7.0.6 (patch)
208
+
209
+ ### 6.1.0 (October 10, 2018)
210
+
211
+ - Added: `postcss-color-gray`
212
+ - Added: Passing `autoprefixer: false` disables autoprefixer
213
+ - Updated: `browserslist` to 4.2.0 (minor)
214
+ - Updated: `caniuse-lite` to 1.0.30000890 (patch)
215
+
216
+ ### 6.0.10 (October 2, 2018)
217
+
218
+ - Updated: `postcss-custom-properties` to 8.0.8 (patch)
219
+
220
+ ### 6.0.9 (October 2, 2018)
221
+
222
+ - Updated: `browserslist` to 4.1.2 (patch)
223
+ - Updated: `postcss` to 7.0.5 (patch)
224
+ - Updated: `postcss-custom-properties` to 8.0.7 (patch)
225
+
226
+ ### 6.0.8 (October 1, 2018)
227
+
228
+ - Updated: `caniuse-lite` to 1.0.30000888 (patch)
229
+ - Updated: `postcss` to 7.0.4 (patch)
230
+
231
+ **Did you hear? PostCSS Preset Env is now part of Create React App!** 🎉
232
+
233
+ ### 6.0.7 (September 23, 2018)
234
+
235
+ - Updated: `postcss` to 7.0.3 (patch)
236
+ - Updated: `postcss-custom-properties` to 8.0.6 (patch)
237
+
238
+ ### 6.0.6 (September 23, 2018)
239
+
240
+ - Updated: `postcss-custom-media` to 7.0.4 (patch)
241
+
242
+ ### 6.0.5 (September 23, 2018)
243
+
244
+ - Updated: `postcss-color-mod-function` to 3.0.3 (patch)
245
+
246
+ ### 6.0.4 (September 23, 2018)
247
+
248
+ - Updated: `caniuse-lite` to 1.0.30000887 (patch)
249
+ - Updated: `postcss-color-mod-function` to 3.0.2 (patch)
250
+
251
+ ### 6.0.3 (September 21, 2018)
252
+
253
+ - Updated: `caniuse-lite` to 1.0.30000885 (patch)
254
+ - Updated: `postcss-custom-properties` to 8.0.5 (patch)
255
+
256
+ ### 6.0.2 (September 20, 2018)
257
+
258
+ - Fixed: Do not break on an empty `importFrom` object
259
+ - Fixed: Actually run `postcss-env-function`
260
+
261
+ ### 6.0.1 (September 20, 2018)
262
+
263
+ - Fixed: Issue with the `system-ui` font family polyfill by replacing
264
+ `postcss-font-family-system-ui` with an internal polyfill, at least until the
265
+ problem with the original plugin is resolved.
266
+
267
+ ### 6.0.0 (September 20, 2018)
268
+
269
+ - Added: Support for PostCSS 7+
270
+ - Added: Support for PostCSS Values Parser 2+
271
+ - Added: Support for PostCSS Selector Parser 5+
272
+ - Added: Support for Node 6+
273
+ - Updated: All 28 plugins
274
+
275
+ ### 5.4.0 (July 25, 2018)
276
+
277
+ - Added: `toggle` option to override which features are enabled or disabled
278
+ - Deprecated: toggle features with `toggle`, not `features`
279
+
280
+ ### 5.3.0 (July 24, 2018)
281
+
282
+ - Updated: `postcss-lab-function` to v1.1.0 (minor update)
283
+
284
+ ### 5.2.3 (July 21, 2018)
285
+
286
+ - Updated: `postcss-color-mod-function` to v2.4.3 (patch update)
287
+
288
+ ### 5.2.2 (July 13, 2018)
289
+
290
+ - Updated: `autoprefixer` to v8.6.5 (patch update)
291
+ - Updated: `caniuse-lite` to v1.0.30000865 (patch update)
292
+ - Updated: `postcss-color-functional-notation` to v1.0.2 (patch update)
293
+
294
+ ### 5.2.1 (June 26, 2018)
295
+
296
+ - Updated: `caniuse-lite` to v1.0.30000859 (patch update)
297
+ - Updated: `postcss-attribute-case-insensitive` to v3.0.1 (patch update)
298
+
299
+ ### 5.2.0 (June 25, 2018)
300
+
301
+ - Updated: `autoprefixer` to v8.6.3 (minor update)
302
+ - Updated: `caniuse-lite` to v1.0.30000858 (patch update)
303
+ - Updated: `postcss` to 6.0.23 (patch update)
304
+ - Updated: `postcss-nesting` to v6.0.0 (major internal update, non-breaking for this project)
305
+
306
+ ### 5.1.0 (May 21, 2018)
307
+
308
+ - Added: `autoprefixer` option to pass options into autoprefixer
309
+ - Updated: `autoprefixer` to v8.5.0 (minor update)
310
+ - Updated: `browserslist` to v3.2.8 (patch update)
311
+ - Updated: `caniuse-lite` to v1.0.30000844 (patch update)
312
+ - Updated: `postcss-color-functional-notation` to v1.0.1 (patch update)
313
+
314
+ ### 5.0.0 (May 11, 2018)
315
+
316
+ - Added: `autoprefixer`
317
+ - Added: `postcss-color-functional-notation`
318
+ - Added: `postcss-env-function`
319
+ - Added: `postcss-lab-function`
320
+ - Added: `postcss-place`
321
+ - Added: `postcss-gap-properties`
322
+ - Added: `postcss-overflow-shorthand`
323
+ - Updated: `cssdb` to v3.1.0 (major update)
324
+ - Updated: In conformance with cssdb v3, the default stage is now 2
325
+ - Updated: `postcss-attribute-case-insensitive` to v3.0.0 (major update)
326
+ - Updated: `postcss-pseudo-class-any-link` to v5.0.0 (major update)
327
+ - Updated: `postcss-image-set-function` to v2.0.0 (major update)
328
+ - Updated: `postcss-dir-pseudo-class` to v4.0.0 (major update)
329
+ - Updated: `postcss-color-rebeccapurple` to v3.1.0 (minor update)
330
+ - Updated: `postcss` to v6.0.22 (patch update)
331
+ - Updated: `browserslist` to v3.2.7 (patch update)
332
+ - Updated: `caniuse-lite` to v1.0.30000839 (patch update)
333
+
334
+ All plugins now conform to the latest stable releases of `postcss-value-parser`
335
+ v1.5.0 and `postcss-selector-parser` v4.0.0.
336
+
337
+ ### 4.1.0 (April 23, 2018)
338
+
339
+ - Updated: `browserslist` to v3.2.5 (patch update)
340
+ - Updated: `caniuse-lite` to v1.0.30000830 (patch update)
341
+ - Updated: `postcss-apply` to v0.10.0 (minor update)
342
+ - Updated: `postcss-nesting` to v5.0.0 (major update, non-breaking for this project)
343
+
344
+ ### 4.0.0 (April 7, 2018)
345
+
346
+ - Added: `postcss-focus-within`
347
+ - Updated: `postcss-focus-visible` to v3.0.0 (major update)
348
+ - Updated: `caniuse-lite` to v1.0.30000824 (patch update)
349
+ - Updated: `cssdb` to v2.0.0 (major update)
350
+ - Changed: All `specificationId` names to new `id` names for the `cssdb` update.
351
+
352
+ ### 3.5.0 (April 5, 2018)
353
+
354
+ - Fixed: `selectors-matches-pseudo` mapping to allow `:matches` polyfilling
355
+ - Updated: `postcss-dir-pseudo-class` to v3.0.0 (major update, non-breaking for this project)
356
+ - Updated: `postcss-logical` to v1.1.1 (minor update)
357
+ - Updated: `postcss` to v6.0.21 (patch update)
358
+ - Updated: `browserslist` to v3.2.4 (patch update)
359
+ - Updated: `caniuse-lite` to v1.0.30000823 (patch update)
360
+
361
+ ### 3.4.0 (March 18, 2018)
362
+
363
+ - Updated: `browserslist` to v3.2.0 (minor update)
364
+ - Updated: `postcss` to v6.0.20 (patch update)
365
+ - Updated: `postcss-image-set-polyfill` to `@csstools/postcss-image-set-function` (hopefully temporarily)
366
+
367
+ ### 3.3.0 (March 16, 2018)
368
+
369
+ - Updated: `postcss-apply` to v0.9.0 (minor update)
370
+ - Updated: `browserslist` to v3.1.2 (patch update)
371
+ - Updated: `caniuse-lite` to v1.0.30000815 (patch update)
372
+ - Updated: distribution to cjs and es bundles
373
+
374
+ ### 3.2.2 (February 27, 2018)
375
+
376
+ - Updated: `postcss-color-mod-function` to v2.4.2 (patch update)
377
+
378
+ ### 3.2.1 (February 21, 2018)
379
+
380
+ - Updated: Use the latest tested version of all dependencies
381
+
382
+ ### 3.2.0 (February 18, 2018)
383
+
384
+ - Added: `postcss-page-break` which has moved here from Autoprefixer
385
+
386
+ ### 3.1.0 (February 17, 2018)
387
+
388
+ - Added: `postcss-focus-visible`
389
+
390
+ ### 3.0.0 (February 16, 2018)
391
+
392
+ - Updated: `postcss-color-mod-function` to v2.4 (minor update)
393
+ - Updated: `postcss-custom-properties` to v7.0 (major update)
394
+
395
+ ### 2.2.0 (February 14, 2018)
396
+
397
+ - Updated: `browserslist` to v3.1 (major update)
398
+ - Updated: `postcss-color-mod-function` to v2.3 (minor update)
399
+ - Improved: cleaned up one reusable variable and added a few tests
400
+
401
+ ### 2.1.0 (January 22, 2018)
402
+
403
+ - Updated: `cssdb` to v1.5 (minor update)
404
+ - Updated: `postcss-color-mod-function` to v2.2 (major update)
405
+ - Updated: `postcss-font-family-system-ui` to v3.0 (repo update)
406
+
407
+ ### 2.0.0 (January 16, 2018)
408
+
409
+ - Initial version
410
+
411
+ ### 1.0.0 (December 20, 2017)
412
+
413
+ - Unsupported version accidentally published by a member of the community
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # PostCSS Preset Env [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]
2
2
 
3
3
  [<img alt="npm version" src="https://img.shields.io/npm/v/postcss-preset-env.svg" height="20">][npm-url]
4
- [<img alt="build status" src="https://github.com/csstools/postcss-preset-env/workflows/test/badge.svg" height="20">][cli-url]
4
+ [<img alt="build status" src="https://github.com/csstools/postcss-plugins/workflows/test/badge.svg" height="20">][cli-url]
5
5
  [<img alt="support chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url]
6
6
 
7
7
  [PostCSS Preset Env] lets you convert modern CSS into something most browsers
@@ -95,15 +95,7 @@ Add [PostCSS Preset Env] to your project:
95
95
  npm install postcss-preset-env --save-dev
96
96
  ```
97
97
 
98
- Use [PostCSS Preset Env] to process your CSS:
99
-
100
- ```js
101
- const postcssPresetEnv = require('postcss-preset-env');
102
-
103
- postcssPresetEnv.process(YOUR_CSS /*, processOptions, pluginOptions */);
104
- ```
105
-
106
- Or use it as a [PostCSS] plugin:
98
+ Use [PostCSS Preset Env] as a [PostCSS] plugin:
107
99
 
108
100
  ```js
109
101
  const postcss = require('postcss');
@@ -141,7 +133,7 @@ features.
141
133
 
142
134
  The `features` option enables or disables specific polyfills by ID. Passing
143
135
  `true` to a specific feature ID will enable its polyfill, while passing `false`
144
- will disable it. [List of IDs](https://github.com/csstools/postcss-preset-env/blob/master/src/lib/plugins-by-id.js#L36)
136
+ will disable it. [List of IDs](https://github.com/csstools/postcss-plugins/blob/main/plugin-packs/postcss-preset-env/src/lib/plugins-by-id.js#L36)
145
137
 
146
138
  ```js
147
139
  postcssPresetEnv({
@@ -362,8 +354,8 @@ postcssPresetEnv({
362
354
  });
363
355
  ```
364
356
 
365
- [cli-img]: https://github.com/postcss/postcss-preset-env/workflows/test/badge.svg
366
- [cli-url]: https://github.com/postcss/postcss-preset-env/actions/workflows/test.yml?query=workflow/test
357
+ [cli-img]: https://github.com/csstools/postcss-plugins/workflows/test/badge.svg
358
+ [cli-url]: https://github.com/csstools/postcss-plugins/actions/workflows/test.yml?query=workflow/test
367
359
  [git-img]: https://img.shields.io/badge/support-chat-blue.svg
368
360
  [git-url]: https://gitter.im/postcss/postcss
369
361
  [npm-img]: https://img.shields.io/npm/v/postcss-preset-env.svg
@@ -374,7 +366,7 @@ postcssPresetEnv({
374
366
  [caniuse]: https://caniuse.com/
375
367
  [cssdb]: https://cssdb.org/
376
368
  [PostCSS]: https://github.com/postcss/postcss
377
- [PostCSS Preset Env]: https://github.com/csstools/postcss-preset-env
369
+ [PostCSS Preset Env]: https://github.com/csstools/postcss-plugins/tree/main/plugin-packs/postcss-preset-env
378
370
  [readme-style-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-style-with-preset-env.svg
379
371
  [readme-style-with-preset-env-url]: https://codepen.io/pen?template=OZRovK
380
372
  [readme-transform-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-transform-with-preset-env.svg
package/dist/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";var e=require("autoprefixer"),s=require("browserslist"),t=require("cssdb"),o=require("postcss-attribute-case-insensitive"),r=require("css-blank-pseudo"),n=require("postcss-color-functional-notation"),i=require("postcss-color-hex-alpha"),c=require("postcss-color-rebeccapurple"),u=require("postcss-custom-media"),a=require("postcss-custom-properties"),p=require("postcss-custom-selectors"),l=require("postcss-dir-pseudo-class"),f=require("postcss-double-position-gradients"),d=require("postcss-env-function"),m=require("postcss-focus-visible"),b=require("postcss-focus-within"),g=require("postcss-font-variant"),y=require("postcss-gap-properties"),v=require("css-has-pseudo"),w=require("postcss-image-set-function"),h=require("postcss-initial"),$=require("postcss-lab-function"),j=require("postcss-logical"),q=require("postcss-media-minmax"),O=require("postcss-nesting"),k=require("postcss-overflow-shorthand"),x=require("postcss-page-break"),S=require("postcss-place"),P=require("css-prefers-color-scheme"),M=require("postcss-pseudo-class-any-link"),B=require("postcss-replace-overflow-wrap"),U=require("postcss-selector-not"),F=require("caniuse-lite"),T=require("fs"),A=require("path");function E(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function V(e){if(e&&e.__esModule)return e;var s=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(s,t,o.get?o:{enumerable:!0,get:function(){return e[t]}})}})),s.default=e,Object.freeze(s)}var I=E(e),N=E(s),C=E(t),D=E(o),J=E(r),R=E(n),_=E(i),z=E(c),L=E(u),G=E(a),H=E(p),K=E(l),Q=E(f),W=E(d),X=E(m),Y=E(b),Z=E(g),ee=E(y),se=E(v),te=E(w),oe=E(h),re=E($),ne=E(j),ie=E(q),ce=E(O),ue=E(k),ae=E(x),pe=E(S),le=E(P),fe=E(M),de=E(B),me=E(U),be=V(F),ge=E(T),ye=E(A);function ve(){return{postcssPlugin:"postcss-system-ui-font",Declaration(e){we.test(e.prop)&&(e.value.includes($e.join(", "))||(e.value=e.value.replace(je,qe)))}}}ve.postcss=!0;const we=/(?:^(?:-|\\002d){2})|(?:^font(?:-family)?$)/i,he="[\\f\\n\\r\\x09\\x20]",$e=["system-ui","-apple-system","Segoe UI","Roboto","Ubuntu","Cantarell","Noto Sans","sans-serif"],je=new RegExp(`(^|,|${he}+)(?:system-ui${he}*)(?:,${he}*(?:${$e.join("|")})${he}*)?(,|$)`,"i"),qe=`$1${$e.join(", ")}$2`,Oe={"css-blank-pseudo":"blank-pseudo-class","css-has-pseudo":"has-pseudo-class","css-prefers-color-scheme":"prefers-color-scheme-query","postcss-attribute-case-insensitive":"case-insensitive-attributes","postcss-color-functional-notation":"color-functional-notation","postcss-color-hex-alpha":"hexadecimal-alpha-notation","postcss-color-rebeccapurple":"rebeccapurple-color","postcss-custom-media":"custom-media-queries","postcss-custom-properties":"custom-properties","postcss-custom-selectors":"custom-selectors","postcss-dir-pseudo-class":"dir-pseudo-class","postcss-double-position-gradients":"double-position-gradients","postcss-env-function":"environment-variables","postcss-focus-visible":"focus-visible-pseudo-class","postcss-focus-within":"focus-within-pseudo-class","postcss-font-variant":"font-variant-property","postcss-gap-properties":"gap-properties","postcss-image-set-function":"image-set-function","postcss-initial":"all-property","postcss-lab-function":"lab-function","postcss-logical":"logical-properties-and-values","postcss-media-minmax":"media-query-ranges","postcss-nesting":"nesting-rules","postcss-overflow-shorthand":"overflow-property","postcss-page-break":"break-properties","postcss-place":"place-properties","postcss-pseudo-class-any-link":"any-link-pseudo-class","postcss-replace-overflow-wrap":"overflow-wrap-property","postcss-selector-not":"not-pseudo-class","postcss-system-ui-font-family":"system-ui-font-family"},ke=(()=>{const e={};for(const[s,t]of Object.entries(Oe))e[t]=s;return e})(),xe={"all-property":oe.default,"any-link-pseudo-class":fe.default,"blank-pseudo-class":J.default,"break-properties":ae.default,"case-insensitive-attributes":D.default,"color-functional-notation":R.default,"custom-media-queries":L.default,"custom-properties":G.default,"custom-selectors":H.default,"dir-pseudo-class":K.default,"double-position-gradients":Q.default,"environment-variables":W.default,"focus-visible-pseudo-class":X.default,"focus-within-pseudo-class":Y.default,"font-variant-property":Z.default,"gap-properties":ee.default,"has-pseudo-class":se.default,"hexadecimal-alpha-notation":_.default,"image-set-function":te.default,"lab-function":re.default,"logical-properties-and-values":ne.default,"media-query-ranges":ie.default,"nesting-rules":ce.default,"not-pseudo-class":me.default,"overflow-property":ue.default,"overflow-wrap-property":de.default,"place-properties":pe.default,"prefers-color-scheme-query":le.default,"rebeccapurple-color":z.default,"system-ui-font-family":ve};function Se(e,s){return Object.keys(e).map((t=>[].concat(e[t]).map((e=>({[s]:!0,plugin:e,id:t}))))).reduce(((e,s)=>e.concat(s)),[])}function Pe(e){const s=be.features[e];if(s){const e=be.feature(s).stats;return Object.keys(e).reduce(((s,t)=>s.concat(Object.keys(e[t]).filter((s=>0!==e[t][s].indexOf("y"))).map((e=>`${t} ${e}`)))),[])}return["> 0%"]}var Me=["custom-media-queries","custom-properties","environment-variables","image-set-function","media-query-ranges","prefers-color-scheme-query","nesting-rules","custom-selectors","any-link-pseudo-class","case-insensitive-attributes","focus-visible-pseudo-class","focus-within-pseudo-class","matches-pseudo-class","not-pseudo-class","logical-properties-and-values","dir-pseudo-class","all-property","color-functional-notation","double-position-gradients","hexadecimal-alpha-notation","lab-function","rebeccapurple-color","color-mod-function","blank-pseudo-class","break-properties","font-variant-property","has-pseudo-class","gap-properties","overflow-property","overflow-wrap-property","place-properties","system-ui-font-family"];async function Be(e,s,t,o){const r=function(e){return`:root {\n${Object.keys(e).reduce(((s,t)=>(s.push(`\t${t}: ${e[t]};`),s)),[]).join("\n")}\n}\n`}(t),n=function(e){return`${Object.keys(e).reduce(((s,t)=>(s.push(`@custom-media ${t} ${e[t]};`),s)),[]).join("\n")}\n`}(s),i=function(e){return`${Object.keys(e).reduce(((s,t)=>(s.push(`@custom-selector ${t} ${e[t]};`),s)),[]).join("\n")}\n`}(o),c=`${n}\n${i}\n${r}`;await Ee(e,c)}function Ue(e,s){return`\n\t${e}: {\n${Object.keys(s).reduce(((e,t)=>(e.push(`\t\t'${Ve(t)}': '${Ve(s[t])}'`),e)),[]).join(",\n")}\n\t}`}function Fe(e,s){return`export const ${e} = {\n${Object.keys(s).reduce(((e,t)=>(e.push(`\t'${Ve(t)}': '${Ve(s[t])}'`),e)),[]).join(",\n")}\n};\n`}function Te(e,s){return Promise.all([].concat(s).map((async s=>{if(s instanceof Function)await s({customMedia:Ae(e.customMedia),customProperties:Ae(e.customProperties),customSelectors:Ae(e.customSelectors)});else{const t=s===Object(s)?s:{to:String(s)},o=t.toJSON||Ae;if("customMedia"in t||"customProperties"in t||"customSelectors"in t)t.customMedia=o(e.customMedia),t.customProperties=o(e.customProperties),t.customSelectors=o(e.customSelectors);else if("custom-media"in t||"custom-properties"in t||"custom-selectors"in t)t["custom-media"]=o(e.customMedia),t["custom-properties"]=o(e.customProperties),t["custom-selectors"]=o(e.customSelectors);else{const s=String(t.to||""),r=(t.type||ye.default.extname(t.to).slice(1)).toLowerCase(),n=o(e.customMedia),i=o(e.customProperties),c=o(e.customSelectors);"css"===r&&await Be(s,n,i,c),"js"===r&&await async function(e,s,t,o){const r=`module.exports = {${Ue("customMedia",s)},${Ue("customProperties",t)},${Ue("customSelectors",o)}\n};\n`;await Ee(e,r)}(s,n,i,c),"json"===r&&await async function(e,s,t,o){const r=`${JSON.stringify({"custom-media":s,"custom-properties":t,"custom-selectors":o},null," ")}\n`;await Ee(e,r)}(s,n,i,c),"mjs"===r&&await async function(e,s,t,o){const r=`${Fe("customMedia",s)}\n${Fe("customProperties",t)}\n${Fe("customSelectors",o)}`;await Ee(e,r)}(s,n,i,c)}}})))}function Ae(e){return Object.keys(e).reduce(((s,t)=>(s[t]=String(e[t]),s)),{})}function Ee(e,s){return new Promise(((t,o)=>{ge.default.writeFile(e,s,(e=>{e?o(e):t()}))}))}function Ve(e){return e.replace(/\\([\s\S])|(')/g,"\\$1$2").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}function Ie(e,s){const t=N.default(e,{ignoreUnknownVersions:!0});return"nesting-rules"===s.id&&function(e,s){const t=Pe(e);if(s.some((e=>N.default(t,{ignoreUnknownVersions:!0}).some((s=>s===e)))))return!0;return!1}("css-matches-pseudo",t)?{noIsPseudoSelector:!0}:{}}function Ne(e,s){let t="unknown",o=1/0;for(let r=0;r<s.length;r++){const n=Ce(e,s[r]);n<o&&(o=n,t=s[r])}return{mostSimilar:t,distance:o}}function Ce(e,s){if(!e.length)return s.length;if(!s.length)return e.length;const t=[];for(let o=0;o<=s.length;o++){t[o]=[o];for(let r=1;r<=e.length;r++)t[o][r]=0===o?r:Math.min(t[o-1][r]+1,t[o][r-1]+1,t[o-1][r-1]+(e[r-1]===s[o-1]?0:1))}return t[s.length][e.length]}const De=e=>{const s=Object(Object(e).features),t=Object.keys(s),o=Object(Object(e).insertBefore),r=Object(Object(e).insertAfter),n=Object(e).browsers,i="stage"in Object(e)?!1===e.stage?5:parseInt(e.stage)||0:2,c=Object(e).autoprefixer,u=Je(Object(e)),a=!1===c?()=>{}:I.default(Object.assign({overrideBrowserslist:n},c)),p=C.default.concat(Se(o,"insertBefore"),Se(r,"insertAfter")).filter((e=>e.insertBefore||e.id in xe)).sort(((e,s)=>Me.indexOf(e.id)-Me.indexOf(s.id)||(e.insertBefore?-1:s.insertBefore?1:0)||(e.insertAfter?1:s.insertAfter?-1:0))).map((e=>{const s=Pe(e.caniuse);return e.insertBefore||e.insertAfter?{browsers:s,plugin:e.plugin,id:`${e.insertBefore?"before":"after"}-${e.id}`,stage:6}:{browsers:s,plugin:xe[e.id],id:e.id,stage:e.stage}})).filter((e=>e.id in s?s[e.id]:e.stage>=i)).map((e=>{let t,o;return t=Ie(n,e),t=!0===s[e.id]?u?Object.assign({},t,u):void 0:u?Object.assign({},t,u,s[e.id]):Object.assign({},t,s[e.id]),o=e.plugin.postcss?e.plugin(t):e.plugin,{browsers:e.browsers,plugin:o,id:e.id}})),l=N.default(n,{ignoreUnknownVersions:!0}),f=p.filter((e=>e.id in s?s[e.id]:l.some((s=>N.default(e.browsers,{ignoreUnknownVersions:!0}).some((e=>e===s)))))).map((e=>e.plugin));f.push(a);const d=()=>({postcssPlugin:"postcss-preset-env",OnceExit:function(s,{result:o}){!function(e,s,t){const o=Object.keys(ke),r=Object.keys(Oe);e.forEach((e=>{if(o.includes(e))return;const n=Ne(e,o),i=Ne(e,r);n.distance<i.distance?s.warn(t,`Unknown feature: "${e}" did you mean: "${n.mostSimilar}"`):s.warn(t,`Unknown feature: "${e}" did you mean: "${Oe[i.mostSimilar]}"`)}))}(t,s,o),Object(e).exportTo&&Te(u.exportTo,e.exportTo)}});return d.postcss=!0,{postcssPlugin:"postcss-preset-env",plugins:[...f,d()]}},Je=e=>{if("importFrom"in e||"exportTo"in e||"preserve"in e){const s={};return"importFrom"in e&&(s.importFrom=e.importFrom),"exportTo"in e&&(s.exportTo={customMedia:{},customProperties:{},customSelectors:{}}),"preserve"in e&&(s.preserve=e.preserve),s}return!1};De.postcss=!0,module.exports=De;