Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-preset-env

Package Overview
Dependencies
Maintainers
1
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-preset-env - npm Package Compare versions

Comparing version 4.1.0 to 5.0.0

21

CHANGELOG.md
# Changes to PostCSS Preset Env
- Added: `autoprefixer`
- Added: `postcss-color-functional-notation`
- Added: `postcss-env-function`
- Added: `postcss-lab-function`
- Added: `postcss-place`
- Added: `postcss-gap-properties`
- Added: `postcss-overflow-shorthand`
- Updated: `cssdb` to v3.1.0 (major update)
- Updated: In conformance with cssdb v3, the default stage is now 2
- Updated: `postcss-attribute-case-insensitive` to v3.0.0 (major update)
- Updated: `postcss-pseudo-class-any-link` to v5.0.0 (major update)
- Updated: `postcss-image-set-function` to v2.0.0 (major update)
- Updated: `postcss-dir-pseudo-class` to v4.0.0 (major update)
- Updated: `postcss-color-rebeccapurple` to v3.1.0 (minor update)
- Updated: `postcss` to v6.0.22 (patch update)
- Updated: `browserslist` to v3.2.7 (patch update)
- Updated: `caniuse-lite` to v1.0.30000839 (patch update)
All plugins now conform to the latest stable releases of `postcss-value-parser`
v1.5.0 and `postcss-selector-parser` v4.0.0.
### 4.1.0 (April 23, 2018)

@@ -4,0 +25,0 @@

36

index.cjs.js

@@ -5,4 +5,4 @@ 'use strict';

var postcssApply = _interopDefault(require('postcss-apply'));
var postcssAttributeCaseInsensitive = _interopDefault(require('postcss-attribute-case-insensitive'));
var postcssColorFunctionalNotation = _interopDefault(require('postcss-color-functional-notation'));
var postcssColorHexAlpha = _interopDefault(require('postcss-color-hex-alpha'));

@@ -19,8 +19,12 @@ var postcssColorModFunction = _interopDefault(require('postcss-color-mod-function'));

var postcssFontFamilySystemUi = _interopDefault(require('postcss-font-family-system-ui'));
var postcssImageSetPolyfill = _interopDefault(require('@csstools/postcss-image-set-function'));
var postcssGapProperties = _interopDefault(require('postcss-gap-properties'));
var postcssImageSetPolyfill = _interopDefault(require('postcss-image-set-function'));
var postcssInitial = _interopDefault(require('postcss-initial'));
var postcssLabFunction = _interopDefault(require('postcss-lab-function'));
var postcssLogical = _interopDefault(require('postcss-logical'));
var postcssMediaMinmax = _interopDefault(require('postcss-media-minmax'));
var postcssNesting = _interopDefault(require('postcss-nesting'));
var postcssOverflowShorthand = _interopDefault(require('postcss-overflow-shorthand'));
var postcssPageBreak = _interopDefault(require('postcss-page-break'));
var postcssPlace = _interopDefault(require('postcss-place'));
var postcssPseudoClassAnyLink = _interopDefault(require('postcss-pseudo-class-any-link'));

@@ -31,2 +35,3 @@ var postcssReplaceOverflowWrap = _interopDefault(require('postcss-replace-overflow-wrap'));

var caniuse = require('caniuse-lite');
var autoprefixer = _interopDefault(require('autoprefixer'));
var browserslist = _interopDefault(require('browserslist'));

@@ -36,4 +41,2 @@ var cssdb = _interopDefault(require('cssdb'));

// tooling
// postcss plugins ordered by id

@@ -45,11 +48,15 @@ var plugins = {

'case-insensitive-attributes': postcssAttributeCaseInsensitive,
'color-functional-notation': postcssColorFunctionalNotation,
'color-mod-function': postcssColorModFunction,
'custom-media-queries': postcssCustomMedia,
'custom-properties': postcssCustomProperties,
'custom-property-sets': postcssApply,
'custom-selectors': postcssCustomSelectors,
'dir-pseudo-class': postcssDirPseudoClass,
'focus-visible-pseudo-class': postcssFocusVisible,
'focus-within-pseudo-class': postcssFocusWithin,
'font-variant-property': postcssFontVariant,
'gap-properties': postcssGapProperties,
'hexadecimal-alpha-notation': postcssColorHexAlpha,
'image-set-function': postcssImageSetPolyfill,
'lab-function': postcssLabFunction,
'logical-properties-and-values': postcssLogical,

@@ -60,6 +67,6 @@ 'matches-pseudo-class': postcssSelectorMatches,

'not-pseudo-class': postcssSelectorNot,
'overflow-property': postcssOverflowShorthand,
'overflow-wrap-property': postcssReplaceOverflowWrap,
'place-properties': postcssPlace,
'rebeccapurple-color': postcssColorRebeccapurple,
'focus-visible-pseudo-class': postcssFocusVisible,
'focus-within-pseudo-class': postcssFocusWithin,
'system-ui-font-family': postcssFontFamilySystemUi

@@ -83,4 +90,2 @@ };

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

@@ -111,7 +116,4 @@ function getUnsupportedBrowsersByFeature(feature) {

// ids ordered by execution
var idsByExecutionOrder = ['custom-properties', 'custom-property-sets', 'image-set-function', 'logical-properties-and-values', 'nesting-rules', 'custom-media-queries', 'media-query-ranges', 'custom-selectors', 'case-insensitive-attributes', 'rebeccapurple-color', 'hexadecimal-alpha-notation', 'color-mod-function', 'system-ui-font-family', 'font-variant-property', 'all-property', 'matches-pseudo-class', 'not-pseudo-class', 'any-link-pseudo-class', 'dir-pseudo-class', 'overflow-wrap-property', 'focus-visible-pseudo-class', 'focus-within-pseudo-class'];
var idsByExecutionOrder = ['custom-properties', 'custom-property-sets', 'image-set-function', 'logical-properties-and-values', 'nesting-rules', 'custom-media-queries', 'media-query-ranges', 'custom-selectors', 'case-insensitive-attributes', 'rebeccapurple-color', 'hexadecimal-alpha-notation', 'lab-function', 'color-mod-function', 'color-functional-notation', 'system-ui-font-family', 'font-variant-property', 'all-property', 'matches-pseudo-class', 'not-pseudo-class', 'any-link-pseudo-class', 'dir-pseudo-class', 'break-properties', 'gap-properties', 'overflow-property', 'overflow-wrap-property', 'place-properties', 'focus-visible-pseudo-class', 'focus-within-pseudo-class'];
// tooling
// plugin
var index = postcss.plugin('postcss-preset-env', function (opts) {

@@ -123,4 +125,6 @@ // initialize options

var browsers = Object(opts).browsers;
var stage = 'stage' in Object(opts) ? opts.stage === false ? 6 : parseInt(opts.stage) || 0 : 3;
var stage = 'stage' in Object(opts) ? opts.stage === false ? 5 : parseInt(opts.stage) || 0 : 2;
var stagedAutoprefixer = autoprefixer({ browsers });
// polyfillable features (those with an available postcss plugin)

@@ -192,3 +196,5 @@ var polyfillableFeatures = cssdb.concat(

});
}, Promise.resolve());
}, Promise.resolve()).then(function () {
return stagedAutoprefixer(result.root, result);
});

@@ -195,0 +201,0 @@ return polyfills;

@@ -1,3 +0,3 @@

import postcssApply from 'postcss-apply';
import postcssAttributeCaseInsensitive from 'postcss-attribute-case-insensitive';
import postcssColorFunctionalNotation from 'postcss-color-functional-notation';
import postcssColorHexAlpha from 'postcss-color-hex-alpha';

@@ -14,8 +14,12 @@ import postcssColorModFunction from 'postcss-color-mod-function';

import postcssFontFamilySystemUi from 'postcss-font-family-system-ui';
import postcssImageSetPolyfill from '@csstools/postcss-image-set-function';
import postcssGapProperties from 'postcss-gap-properties';
import postcssImageSetPolyfill from 'postcss-image-set-function';
import postcssInitial from 'postcss-initial';
import postcssLabFunction from 'postcss-lab-function';
import postcssLogical from 'postcss-logical';
import postcssMediaMinmax from 'postcss-media-minmax';
import postcssNesting from 'postcss-nesting';
import postcssOverflowShorthand from 'postcss-overflow-shorthand';
import postcssPageBreak from 'postcss-page-break';
import postcssPlace from 'postcss-place';
import postcssPseudoClassAnyLink from 'postcss-pseudo-class-any-link';

@@ -26,2 +30,3 @@ import postcssReplaceOverflowWrap from 'postcss-replace-overflow-wrap';

import { features, feature } from 'caniuse-lite';
import autoprefixer from 'autoprefixer';
import browserslist from 'browserslist';

@@ -31,4 +36,2 @@ import cssdb from 'cssdb';

// tooling
// postcss plugins ordered by id

@@ -40,11 +43,15 @@ var plugins = {

'case-insensitive-attributes': postcssAttributeCaseInsensitive,
'color-functional-notation': postcssColorFunctionalNotation,
'color-mod-function': postcssColorModFunction,
'custom-media-queries': postcssCustomMedia,
'custom-properties': postcssCustomProperties,
'custom-property-sets': postcssApply,
'custom-selectors': postcssCustomSelectors,
'dir-pseudo-class': postcssDirPseudoClass,
'focus-visible-pseudo-class': postcssFocusVisible,
'focus-within-pseudo-class': postcssFocusWithin,
'font-variant-property': postcssFontVariant,
'gap-properties': postcssGapProperties,
'hexadecimal-alpha-notation': postcssColorHexAlpha,
'image-set-function': postcssImageSetPolyfill,
'lab-function': postcssLabFunction,
'logical-properties-and-values': postcssLogical,

@@ -55,6 +62,6 @@ 'matches-pseudo-class': postcssSelectorMatches,

'not-pseudo-class': postcssSelectorNot,
'overflow-property': postcssOverflowShorthand,
'overflow-wrap-property': postcssReplaceOverflowWrap,
'place-properties': postcssPlace,
'rebeccapurple-color': postcssColorRebeccapurple,
'focus-visible-pseudo-class': postcssFocusVisible,
'focus-within-pseudo-class': postcssFocusWithin,
'system-ui-font-family': postcssFontFamilySystemUi

@@ -78,4 +85,2 @@ };

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

@@ -106,7 +111,4 @@ function getUnsupportedBrowsersByFeature(feature$$1) {

// ids ordered by execution
var idsByExecutionOrder = ['custom-properties', 'custom-property-sets', 'image-set-function', 'logical-properties-and-values', 'nesting-rules', 'custom-media-queries', 'media-query-ranges', 'custom-selectors', 'case-insensitive-attributes', 'rebeccapurple-color', 'hexadecimal-alpha-notation', 'color-mod-function', 'system-ui-font-family', 'font-variant-property', 'all-property', 'matches-pseudo-class', 'not-pseudo-class', 'any-link-pseudo-class', 'dir-pseudo-class', 'overflow-wrap-property', 'focus-visible-pseudo-class', 'focus-within-pseudo-class'];
var idsByExecutionOrder = ['custom-properties', 'custom-property-sets', 'image-set-function', 'logical-properties-and-values', 'nesting-rules', 'custom-media-queries', 'media-query-ranges', 'custom-selectors', 'case-insensitive-attributes', 'rebeccapurple-color', 'hexadecimal-alpha-notation', 'lab-function', 'color-mod-function', 'color-functional-notation', 'system-ui-font-family', 'font-variant-property', 'all-property', 'matches-pseudo-class', 'not-pseudo-class', 'any-link-pseudo-class', 'dir-pseudo-class', 'break-properties', 'gap-properties', 'overflow-property', 'overflow-wrap-property', 'place-properties', 'focus-visible-pseudo-class', 'focus-within-pseudo-class'];
// tooling
// plugin
var index = postcss.plugin('postcss-preset-env', function (opts) {

@@ -118,4 +120,6 @@ // initialize options

var browsers = Object(opts).browsers;
var stage = 'stage' in Object(opts) ? opts.stage === false ? 6 : parseInt(opts.stage) || 0 : 3;
var stage = 'stage' in Object(opts) ? opts.stage === false ? 5 : parseInt(opts.stage) || 0 : 2;
var stagedAutoprefixer = autoprefixer({ browsers });
// polyfillable features (those with an available postcss plugin)

@@ -187,3 +191,5 @@ var polyfillableFeatures = cssdb.concat(

});
}, Promise.resolve());
}, Promise.resolve()).then(function () {
return stagedAutoprefixer(result.root, result);
});

@@ -190,0 +196,0 @@ return polyfills;

@@ -1,2 +0,1 @@

// tooling
import * as caniuse from 'caniuse-lite';

@@ -3,0 +2,0 @@

@@ -14,3 +14,5 @@ // ids ordered by execution

'hexadecimal-alpha-notation',
'lab-function',
'color-mod-function',
'color-functional-notation',
'system-ui-font-family',

@@ -23,5 +25,9 @@ 'font-variant-property',

'dir-pseudo-class',
'break-properties',
'gap-properties',
'overflow-property',
'overflow-wrap-property',
'place-properties',
'focus-visible-pseudo-class',
'focus-within-pseudo-class'
];

@@ -1,4 +0,3 @@

// tooling
import postcssApply from 'postcss-apply';
import postcssAttributeCaseInsensitive from 'postcss-attribute-case-insensitive';
import postcssColorFunctionalNotation from 'postcss-color-functional-notation';
import postcssColorHexAlpha from 'postcss-color-hex-alpha';

@@ -15,8 +14,12 @@ import postcssColorModFunction from 'postcss-color-mod-function';

import postcssFontFamilySystemUi from 'postcss-font-family-system-ui';
import postcssImageSetPolyfill from '@csstools/postcss-image-set-function';
import postcssGapProperties from 'postcss-gap-properties';
import postcssImageSetPolyfill from 'postcss-image-set-function';
import postcssInitial from 'postcss-initial';
import postcssLabFunction from 'postcss-lab-function';
import postcssLogical from 'postcss-logical';
import postcssMediaMinmax from 'postcss-media-minmax';
import postcssNesting from 'postcss-nesting';
import postcssOverflowShorthand from 'postcss-overflow-shorthand';
import postcssPageBreak from 'postcss-page-break';
import postcssPlace from 'postcss-place';
import postcssPseudoClassAnyLink from 'postcss-pseudo-class-any-link';

@@ -33,11 +36,15 @@ import postcssReplaceOverflowWrap from 'postcss-replace-overflow-wrap';

'case-insensitive-attributes': postcssAttributeCaseInsensitive,
'color-functional-notation': postcssColorFunctionalNotation,
'color-mod-function': postcssColorModFunction,
'custom-media-queries': postcssCustomMedia,
'custom-properties': postcssCustomProperties,
'custom-property-sets': postcssApply,
'custom-selectors': postcssCustomSelectors,
'dir-pseudo-class': postcssDirPseudoClass,
'focus-visible-pseudo-class': postcssFocusVisible,
'focus-within-pseudo-class': postcssFocusWithin,
'font-variant-property': postcssFontVariant,
'gap-properties': postcssGapProperties,
'hexadecimal-alpha-notation': postcssColorHexAlpha,
'image-set-function': postcssImageSetPolyfill,
'lab-function': postcssLabFunction,
'logical-properties-and-values': postcssLogical,

@@ -48,7 +55,7 @@ 'matches-pseudo-class': postcssSelectorMatches,

'not-pseudo-class': postcssSelectorNot,
'overflow-property': postcssOverflowShorthand,
'overflow-wrap-property': postcssReplaceOverflowWrap,
'place-properties': postcssPlace,
'rebeccapurple-color': postcssColorRebeccapurple,
'focus-visible-pseudo-class': postcssFocusVisible,
'focus-within-pseudo-class': postcssFocusWithin,
'system-ui-font-family': postcssFontFamilySystemUi
};
{
"name": "postcss-preset-env",
"version": "4.1.0",
"version": "5.0.0",
"description": "Convert modern CSS into something browsers understand",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "CC0-1.0",
"repository": "jonathantneal/postcss-preset-env",
"homepage": "https://github.com/jonathantneal/postcss-preset-env#readme",
"bugs": "https://github.com/jonathantneal/postcss-preset-env/issues",
"repository": "csstools/postcss-preset-env",
"homepage": "https://github.com/csstools/postcss-preset-env#readme",
"bugs": "https://github.com/csstools/postcss-preset-env/issues",
"main": "index.cjs.js",

@@ -28,17 +28,17 @@ "module": "index.es.js",

"dependencies": {
"@csstools/postcss-image-set-function": "^1.0.0",
"browserslist": "^3.2.5",
"caniuse-lite": "^1.0.30000830",
"cssdb": "^2.0.0",
"postcss": "^6.0.21",
"postcss-apply": "^0.10.0",
"postcss-attribute-case-insensitive": "^2.0.0",
"autoprefixer": "^8.4.1",
"browserslist": "^3.2.7",
"caniuse-lite": "^1.0.30000839",
"cssdb": "^3.1.0",
"postcss": "^6.0.22",
"postcss-attribute-case-insensitive": "^3.0.0",
"postcss-color-functional-notation": "^1.0.0",
"postcss-color-hex-alpha": "^3.0.0",
"postcss-color-mod-function": "^2.4.2",
"postcss-color-rebeccapurple": "^3.0.0",
"postcss-color-rgb": "^2.0.0",
"postcss-color-rebeccapurple": "^3.1.0",
"postcss-custom-media": "^6.0.0",
"postcss-custom-properties": "^7.0.0",
"postcss-custom-selectors": "^4.0.1",
"postcss-dir-pseudo-class": "^3.0.0",
"postcss-dir-pseudo-class": "^4.0.0",
"postcss-env-function": "^1.0.0",
"postcss-focus-visible": "^3.0.0",

@@ -48,8 +48,13 @@ "postcss-focus-within": "^2.0.0",

"postcss-font-variant": "^3.0.0",
"postcss-gap-properties": "^1.0.0",
"postcss-image-set-function": "^2.0.0",
"postcss-initial": "^2.0.0",
"postcss-lab-function": "^1.0.1",
"postcss-logical": "^1.1.1",
"postcss-media-minmax": "^3.0.0",
"postcss-nesting": "^5.0.0",
"postcss-overflow-shorthand": "^1.0.1",
"postcss-page-break": "^1.0.0",
"postcss-pseudo-class-any-link": "^4.0.0",
"postcss-place": "^3.0.1",
"postcss-pseudo-class-any-link": "^5.0.0",
"postcss-replace-overflow-wrap": "^2.0.0",

@@ -60,5 +65,5 @@ "postcss-selector-matches": "^3.0.1",

"devDependencies": {
"babel-core": "^6.26.0",
"babel-core": "^6.26.3",
"babel-eslint": "^8.2.3",
"babel-preset-env": "^1.6.1",
"babel-preset-env": "^1.7.0",
"eslint": "^4.19.1",

@@ -65,0 +70,0 @@ "eslint-config-dev": "^2.0.0",

@@ -85,5 +85,8 @@ # PostCSS Preset Env [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][PostCSS]

Without any configuration options, [PostCSS Preset Env] enables **stage 3**
features and supports all browsers.
Without any configuration options, [PostCSS Preset Env] enables **Stage 2**
features and supports **all** browsers.
[![Transform with Preset Env][readme-transform-with-preset-env-img]][readme-transform-with-preset-env-url]
[![Style with Preset Env][readme-style-with-preset-env-img]][readme-style-with-preset-env-url]
## Usage

@@ -273,4 +276,4 @@

[cli-img]: https://img.shields.io/travis/jonathantneal/postcss-preset-env.svg
[cli-url]: https://travis-ci.org/jonathantneal/postcss-preset-env
[cli-img]: https://img.shields.io/travis/csstools/postcss-preset-env.svg
[cli-url]: https://travis-ci.org/csstools/postcss-preset-env
[git-img]: https://img.shields.io/badge/support-chat-blue.svg

@@ -284,7 +287,11 @@ [git-url]: https://gitter.im/postcss/postcss

[caniuse]: https://caniuse.com/
[cssdb]: https://jonathantneal.github.io/css-db/
[cssdb]: https://cssdb.org/
[PostCSS]: https://github.com/postcss/postcss
[PostCSS Preset Env]: https://github.com/jonathantneal/postcss-preset-env
[PostCSS Preset Env]: https://github.com/csstools/postcss-preset-env
[PostCSS Loader]: https://github.com/postcss/postcss-loader
[Gulp PostCSS]: https://github.com/postcss/gulp-postcss
[Grunt PostCSS]: https://github.com/nDmitry/grunt-postcss
[readme-style-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-style-with-preset-env.svg
[readme-style-with-preset-env-url]: https://codepen.io/pen?template=OZRovK
[readme-transform-with-preset-env-img]: https://csstools.github.io/postcss-preset-env/readme-transform-with-preset-env.svg
[readme-transform-with-preset-env-url]: https://csstools.github.io/postcss-preset-env/
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc