Skip to content
This repository was archived by the owner on Jun 13, 2021. It is now read-only.

Commit 2f71263

Browse files
committed
5.0.0
1 parent 3ad977d commit 2f71263

16 files changed

+372
-159
lines changed

.tape.js

+12-12
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ module.exports = {
1515
browsers: 'chrome >= 38'
1616
}
1717
},
18-
'basic:stage1': {
19-
message: 'supports { stage: 1 } usage',
18+
'basic:stage0': {
19+
message: 'supports { stage: 0 } usage',
2020
options: {
21-
stage: 1
21+
stage: 0
2222
}
2323
},
24-
'basic:stage1-ff49': {
25-
message: 'supports { browsers: "ff >= 49", stage: 1 } usage',
24+
'basic:stage0-ff49': {
25+
message: 'supports { browsers: "ff >= 49", stage: 0 } usage',
2626
options: {
2727
browsers: 'ff >= 49',
28-
stage: 1
28+
stage: 0
2929
}
3030
},
3131
'basic:nesting': {
@@ -53,9 +53,9 @@ module.exports = {
5353
}
5454
},
5555
'insert:before': {
56-
message: 'supports { stage: 2, before: { "color-mod-function": [ require("postcss-simple-vars") ] } } usage',
56+
message: 'supports { stage: 1, before: { "color-mod-function": [ require("postcss-simple-vars") ] } } usage',
5757
options: {
58-
stage: 2,
58+
stage: 1,
5959
insertBefore: {
6060
'color-mod-function': [
6161
require('postcss-simple-vars')
@@ -64,9 +64,9 @@ module.exports = {
6464
}
6565
},
6666
'insert:after': {
67-
message: 'supports { stage: 2, after: { "color-mod-function": [ require("postcss-simple-vars")() ] } } usage',
67+
message: 'supports { stage: 1, after: { "color-mod-function": [ require("postcss-simple-vars")() ] } } usage',
6868
options: {
69-
stage: 2,
69+
stage: 1,
7070
insertAfter: {
7171
'color-mod-function': require('postcss-simple-vars')
7272
},
@@ -94,9 +94,9 @@ module.exports = {
9494
expect: 'insert.after.expect.css'
9595
},
9696
'insert:after:array': {
97-
message: 'supports { stage: 2, after: { "color-mod-function": [ require("postcss-simple-vars") ] } } usage',
97+
message: 'supports { stage: 1, after: { "color-mod-function": [ require("postcss-simple-vars") ] } } usage',
9898
options: {
99-
stage: 2,
99+
stage: 1,
100100
insertAfter: {
101101
'color-mod-function': [
102102
require('postcss-simple-vars')

CHANGELOG.md

+21
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changes to PostCSS Preset Env
22

3+
- Added: `autoprefixer`
4+
- Added: `postcss-color-functional-notation`
5+
- Added: `postcss-env-function`
6+
- Added: `postcss-lab-function`
7+
- Added: `postcss-place`
8+
- Added: `postcss-gap-properties`
9+
- Added: `postcss-overflow-shorthand`
10+
- Updated: `cssdb` to v3.1.0 (major update)
11+
- Updated: In conformance with cssdb v3, the default stage is now 2
12+
- Updated: `postcss-attribute-case-insensitive` to v3.0.0 (major update)
13+
- Updated: `postcss-pseudo-class-any-link` to v5.0.0 (major update)
14+
- Updated: `postcss-image-set-function` to v2.0.0 (major update)
15+
- Updated: `postcss-dir-pseudo-class` to v4.0.0 (major update)
16+
- Updated: `postcss-color-rebeccapurple` to v3.1.0 (minor update)
17+
- Updated: `postcss` to v6.0.22 (patch update)
18+
- Updated: `browserslist` to v3.2.7 (patch update)
19+
- Updated: `caniuse-lite` to v1.0.30000839 (patch update)
20+
21+
All plugins now conform to the latest stable releases of `postcss-value-parser`
22+
v1.5.0 and `postcss-selector-parser` v4.0.0.
23+
324
### 4.1.0 (April 23, 2018)
425

526
- Updated: `browserslist` to v3.2.5 (patch update)

CONTRIBUTING.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ scope and avoid unrelated commits.
2626
cd postcss-preset-env
2727

2828
# Assign the original repo to a remote called "upstream"
29-
git remote add upstream [email protected]:jonathantneal/postcss-preset-env.git
29+
git remote add upstream [email protected]:csstools/postcss-preset-env.git
3030

3131
# Install the tools necessary for testing
3232
npm install
@@ -63,7 +63,7 @@ That’s it! Now [open a pull request] with a clear title and description.
6363
If you want to add a new plugin, follow the
6464
[pull request guidelines](#submitting-pull-requests) while making these changes:
6565

66-
- Ensure the feature exists in [cssdb](https://github.com/jonathantneal/css-db).
66+
- Ensure the feature exists in [cssdb](https://cssdb.org/).
6767
- Add the plugin to the `dependencies` list in [`package.json`](package.json).
6868
- Add the plugin to
6969
[`lib/plugins-by-id.js`](lib/plugins-by-id.js).

README.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ a:hover {
8282
}
8383
```
8484

85-
Without any configuration options, [PostCSS Preset Env] enables **Stage 3**
85+
Without any configuration options, [PostCSS Preset Env] enables **Stage 2**
8686
features and supports **all** browsers.
8787

8888
[![Transform with Preset Env][readme-transform-with-preset-env-img]][readme-transform-with-preset-env-url]
@@ -272,8 +272,8 @@ postcssPresetEnv({
272272
})
273273
```
274274

275-
[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-preset-env.svg
276-
[cli-url]: https://travis-ci.org/jonathantneal/postcss-preset-env
275+
[cli-img]: https://img.shields.io/travis/csstools/postcss-preset-env.svg
276+
[cli-url]: https://travis-ci.org/csstools/postcss-preset-env
277277
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
278278
[git-url]: https://gitter.im/postcss/postcss
279279
[npm-img]: https://img.shields.io/npm/v/postcss-preset-env.svg
@@ -282,13 +282,13 @@ postcssPresetEnv({
282282
[win-url]: https://ci.appveyor.com/project/jonathantneal/postcss-preset-env
283283

284284
[caniuse]: https://caniuse.com/
285-
[cssdb]: https://jonathantneal.github.io/css-db/
285+
[cssdb]: https://cssdb.org/
286286
[PostCSS]: https://github.com/postcss/postcss
287-
[PostCSS Preset Env]: https://github.com/jonathantneal/postcss-preset-env
287+
[PostCSS Preset Env]: https://github.com/csstools/postcss-preset-env
288288
[PostCSS Loader]: https://github.com/postcss/postcss-loader
289289
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
290290
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
291-
[readme-style-with-preset-env-img]: https://jonathantneal.github.io/postcss-preset-env/readme-style-with-preset-env.svg
291+
[readme-style-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-style-with-preset-env.svg
292292
[readme-style-with-preset-env-url]: https://codepen.io/pen?template=OZRovK
293-
[readme-transform-with-preset-env-img]: https://jonathantneal.github.io/postcss-preset-env/readme-transform-with-preset-env.svg
294-
[readme-transform-with-preset-env-url]: https://jonathantneal.github.io/postcss-preset-env/
293+
[readme-transform-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-transform-with-preset-env.svg
294+
[readme-transform-with-preset-env-url]: https://csstools.github.io/postcss-preset-env/

index.js

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// tooling
1+
import autoprefixer from 'autoprefixer'
22
import browserslist from 'browserslist';
33
import cssdb from 'cssdb';
44
import postcss from 'postcss';
@@ -7,7 +7,6 @@ import getTransformedInsertions from './lib/get-transformed-insertions';
77
import getUnsupportedBrowsersByFeature from './lib/get-unsupported-browsers-by-feature';
88
import idsByExecutionOrder from './lib/ids-by-execution-order';
99

10-
// plugin
1110
export default postcss.plugin('postcss-preset-env', opts => {
1211
// initialize options
1312
const features = Object(Object(opts).features);
@@ -16,9 +15,11 @@ export default postcss.plugin('postcss-preset-env', opts => {
1615
const browsers = Object(opts).browsers;
1716
const stage = 'stage' in Object(opts)
1817
? opts.stage === false
19-
? 6
18+
? 5
2019
: parseInt(opts.stage) || 0
21-
: 3;
20+
: 2;
21+
22+
const stagedAutoprefixer = autoprefixer({ browsers });
2223

2324
// polyfillable features (those with an available postcss plugin)
2425
const polyfillableFeatures = cssdb.concat(
@@ -93,6 +94,8 @@ export default postcss.plugin('postcss-preset-env', opts => {
9394
() => feature.plugin(result.root, result)
9495
),
9596
Promise.resolve()
97+
).then(
98+
() => stagedAutoprefixer(result.root, result)
9699
);
97100

98101
return polyfills;

lib/get-unsupported-browsers-by-feature.js

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// tooling
21
import * as caniuse from 'caniuse-lite';
32

43
// return a list of browsers that do not support the feature

lib/ids-by-execution-order.js

+6
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,21 @@ export default [
1111
'case-insensitive-attributes',
1212
'rebeccapurple-color',
1313
'hexadecimal-alpha-notation',
14+
'lab-function',
1415
'color-mod-function',
16+
'color-functional-notation',
1517
'system-ui-font-family',
1618
'font-variant-property',
1719
'all-property',
1820
'matches-pseudo-class',
1921
'not-pseudo-class',
2022
'any-link-pseudo-class',
2123
'dir-pseudo-class',
24+
'break-properties',
25+
'gap-properties',
26+
'overflow-property',
2227
'overflow-wrap-property',
28+
'place-properties',
2329
'focus-visible-pseudo-class',
2430
'focus-within-pseudo-class'
2531
];

lib/plugins-by-id.js

+13-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
// tooling
2-
import postcssApply from 'postcss-apply';
31
import postcssAttributeCaseInsensitive from 'postcss-attribute-case-insensitive';
2+
import postcssColorFunctionalNotation from 'postcss-color-functional-notation';
43
import postcssColorHexAlpha from 'postcss-color-hex-alpha';
54
import postcssColorModFunction from 'postcss-color-mod-function';
65
import postcssColorRebeccapurple from 'postcss-color-rebeccapurple';
@@ -12,12 +11,16 @@ import postcssFocusVisible from 'postcss-focus-visible';
1211
import postcssFocusWithin from 'postcss-focus-within';
1312
import postcssFontVariant from 'postcss-font-variant';
1413
import postcssFontFamilySystemUi from 'postcss-font-family-system-ui';
15-
import postcssImageSetPolyfill from '@csstools/postcss-image-set-function';
14+
import postcssGapProperties from 'postcss-gap-properties';
15+
import postcssImageSetPolyfill from 'postcss-image-set-function';
1616
import postcssInitial from 'postcss-initial';
17+
import postcssLabFunction from 'postcss-lab-function';
1718
import postcssLogical from 'postcss-logical';
1819
import postcssMediaMinmax from 'postcss-media-minmax';
1920
import postcssNesting from 'postcss-nesting';
21+
import postcssOverflowShorthand from 'postcss-overflow-shorthand';
2022
import postcssPageBreak from 'postcss-page-break';
23+
import postcssPlace from 'postcss-place';
2124
import postcssPseudoClassAnyLink from 'postcss-pseudo-class-any-link';
2225
import postcssReplaceOverflowWrap from 'postcss-replace-overflow-wrap';
2326
import postcssSelectorMatches from 'postcss-selector-matches';
@@ -29,23 +32,27 @@ export default {
2932
'any-link-pseudo-class': postcssPseudoClassAnyLink,
3033
'break-properties': postcssPageBreak,
3134
'case-insensitive-attributes': postcssAttributeCaseInsensitive,
35+
'color-functional-notation': postcssColorFunctionalNotation,
3236
'color-mod-function': postcssColorModFunction,
3337
'custom-media-queries': postcssCustomMedia,
3438
'custom-properties': postcssCustomProperties,
35-
'custom-property-sets': postcssApply,
3639
'custom-selectors': postcssCustomSelectors,
3740
'dir-pseudo-class': postcssDirPseudoClass,
41+
'focus-visible-pseudo-class': postcssFocusVisible,
42+
'focus-within-pseudo-class': postcssFocusWithin,
3843
'font-variant-property': postcssFontVariant,
44+
'gap-properties': postcssGapProperties,
3945
'hexadecimal-alpha-notation': postcssColorHexAlpha,
4046
'image-set-function': postcssImageSetPolyfill,
47+
'lab-function': postcssLabFunction,
4148
'logical-properties-and-values': postcssLogical,
4249
'matches-pseudo-class': postcssSelectorMatches,
4350
'media-query-ranges': postcssMediaMinmax,
4451
'nesting-rules': postcssNesting,
4552
'not-pseudo-class': postcssSelectorNot,
53+
'overflow-property': postcssOverflowShorthand,
4654
'overflow-wrap-property': postcssReplaceOverflowWrap,
55+
'place-properties': postcssPlace,
4756
'rebeccapurple-color': postcssColorRebeccapurple,
48-
'focus-visible-pseudo-class': postcssFocusVisible,
49-
'focus-within-pseudo-class': postcssFocusWithin,
5057
'system-ui-font-family': postcssFontFamilySystemUi
5158
};

package.json

+22-17
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
{
22
"name": "postcss-preset-env",
3-
"version": "4.1.0",
3+
"version": "5.0.0",
44
"description": "Convert modern CSS into something browsers understand",
55
"author": "Jonathan Neal <[email protected]>",
66
"license": "CC0-1.0",
7-
"repository": "jonathantneal/postcss-preset-env",
8-
"homepage": "https://github.com/jonathantneal/postcss-preset-env#readme",
9-
"bugs": "https://github.com/jonathantneal/postcss-preset-env/issues",
7+
"repository": "csstools/postcss-preset-env",
8+
"homepage": "https://github.com/csstools/postcss-preset-env#readme",
9+
"bugs": "https://github.com/csstools/postcss-preset-env/issues",
1010
"main": "index.cjs.js",
1111
"module": "index.es.js",
1212
"files": [
@@ -25,39 +25,44 @@
2525
"node": ">=4.0.0"
2626
},
2727
"dependencies": {
28-
"@csstools/postcss-image-set-function": "^1.0.0",
29-
"browserslist": "^3.2.5",
30-
"caniuse-lite": "^1.0.30000830",
31-
"cssdb": "^2.0.0",
32-
"postcss": "^6.0.21",
33-
"postcss-apply": "^0.10.0",
34-
"postcss-attribute-case-insensitive": "^2.0.0",
28+
"autoprefixer": "^8.4.1",
29+
"browserslist": "^3.2.7",
30+
"caniuse-lite": "^1.0.30000839",
31+
"cssdb": "^3.1.0",
32+
"postcss": "^6.0.22",
33+
"postcss-attribute-case-insensitive": "^3.0.0",
34+
"postcss-color-functional-notation": "^1.0.0",
3535
"postcss-color-hex-alpha": "^3.0.0",
3636
"postcss-color-mod-function": "^2.4.2",
37-
"postcss-color-rebeccapurple": "^3.0.0",
38-
"postcss-color-rgb": "^2.0.0",
37+
"postcss-color-rebeccapurple": "^3.1.0",
3938
"postcss-custom-media": "^6.0.0",
4039
"postcss-custom-properties": "^7.0.0",
4140
"postcss-custom-selectors": "^4.0.1",
42-
"postcss-dir-pseudo-class": "^3.0.0",
41+
"postcss-dir-pseudo-class": "^4.0.0",
42+
"postcss-env-function": "^1.0.0",
4343
"postcss-focus-visible": "^3.0.0",
4444
"postcss-focus-within": "^2.0.0",
4545
"postcss-font-family-system-ui": "^3.0.0",
4646
"postcss-font-variant": "^3.0.0",
47+
"postcss-gap-properties": "^1.0.0",
48+
"postcss-image-set-function": "^2.0.0",
4749
"postcss-initial": "^2.0.0",
50+
"postcss-lab-function": "^1.0.1",
4851
"postcss-logical": "^1.1.1",
4952
"postcss-media-minmax": "^3.0.0",
5053
"postcss-nesting": "^5.0.0",
54+
"postcss-overflow-shorthand": "^1.0.1",
5155
"postcss-page-break": "^1.0.0",
52-
"postcss-pseudo-class-any-link": "^4.0.0",
56+
"postcss-place": "^3.0.1",
57+
"postcss-pseudo-class-any-link": "^5.0.0",
5358
"postcss-replace-overflow-wrap": "^2.0.0",
5459
"postcss-selector-matches": "^3.0.1",
5560
"postcss-selector-not": "^3.0.1"
5661
},
5762
"devDependencies": {
58-
"babel-core": "^6.26.0",
63+
"babel-core": "^6.26.3",
5964
"babel-eslint": "^8.2.3",
60-
"babel-preset-env": "^1.6.1",
65+
"babel-preset-env": "^1.7.0",
6166
"eslint": "^4.19.1",
6267
"eslint-config-dev": "^2.0.0",
6368
"postcss-simple-vars": "^4.1.0",

0 commit comments

Comments
 (0)