postcss-preset-env
Advanced tools
Comparing version 3.3.0 to 3.4.0
# Changes to PostCSS Preset Env | ||
### 3.4.0 (March 18, 2018) | ||
- Updated: `browserslist` to v3.2.0 (minor update) | ||
- Updated: `postcss` to v6.0.20 (patch update) | ||
- Updated: `postcss-image-set-polyfill` to `@csstools/postcss-image-set-function` (hopefully temporarily) | ||
### 3.3.0 (March 16, 2018) | ||
@@ -4,0 +10,0 @@ |
@@ -14,3 +14,3 @@ 'use strict'; | ||
var postcssFontFamilySystemUi = _interopDefault(require('postcss-font-family-system-ui')); | ||
var postcssImageSetPolyfill = _interopDefault(require('postcss-image-set-polyfill')); | ||
var postcssImageSetPolyfill = _interopDefault(require('@csstools/postcss-image-set-function')); | ||
var postcssLogical = _interopDefault(require('postcss-logical')); | ||
@@ -28,3 +28,3 @@ var postcssNesting = _interopDefault(require('postcss-nesting')); | ||
var postcssDirPseudoClass = _interopDefault(require('postcss-dir-pseudo-class')); | ||
var caniuse = _interopDefault(require('caniuse-lite')); | ||
var caniuse = require('caniuse-lite'); | ||
var browserslist = _interopDefault(require('browserslist')); | ||
@@ -31,0 +31,0 @@ var cssdb = _interopDefault(require('cssdb')); |
@@ -10,3 +10,3 @@ import postcssApply from 'postcss-apply'; | ||
import postcssFontFamilySystemUi from 'postcss-font-family-system-ui'; | ||
import postcssImageSetPolyfill from 'postcss-image-set-polyfill'; | ||
import postcssImageSetPolyfill from '@csstools/postcss-image-set-function'; | ||
import postcssLogical from 'postcss-logical'; | ||
@@ -24,3 +24,3 @@ import postcssNesting from 'postcss-nesting'; | ||
import postcssDirPseudoClass from 'postcss-dir-pseudo-class'; | ||
import caniuse from 'caniuse-lite'; | ||
import { features, feature } from 'caniuse-lite'; | ||
import browserslist from 'browserslist'; | ||
@@ -68,4 +68,4 @@ import cssdb from 'cssdb'; | ||
}); | ||
}).reduce(function (array, feature) { | ||
return array.concat(feature); | ||
}).reduce(function (array, feature$$1) { | ||
return array.concat(feature$$1); | ||
}, []); | ||
@@ -77,8 +77,8 @@ } | ||
// return a list of browsers that do not support the feature | ||
function getUnsupportedBrowsersByFeature(feature) { | ||
var caniuseFeature = caniuse.features[feature]; | ||
function getUnsupportedBrowsersByFeature(feature$$1) { | ||
var caniuseFeature = features[feature$$1]; | ||
// if feature support can be determined | ||
if (caniuseFeature) { | ||
var stats = caniuse.feature(caniuseFeature).stats; | ||
var stats = feature(caniuseFeature).stats; | ||
@@ -109,3 +109,3 @@ // return an array of browsers and versions that do not support the feature | ||
// initialize options | ||
var features = Object(Object(opts).features); | ||
var features$$1 = Object(Object(opts).features); | ||
var insertBefore = Object(Object(opts).insertBefore); | ||
@@ -123,4 +123,4 @@ var insertAfter = Object(Object(opts).insertAfter); | ||
// inserted features or features with an available postcss plugin | ||
function (feature) { | ||
return feature.insertBefore || feature.specificationId in plugins; | ||
function (feature$$1) { | ||
return feature$$1.insertBefore || feature$$1.specificationId in plugins; | ||
}).sort( | ||
@@ -132,16 +132,16 @@ // features sorted by execution order and then insertion order | ||
// polyfillable features as an object | ||
function (feature) { | ||
function (feature$$1) { | ||
// target browsers for the polyfill | ||
var unsupportedBrowsers = getUnsupportedBrowsersByFeature(feature.caniuse); | ||
var unsupportedBrowsers = getUnsupportedBrowsersByFeature(feature$$1.caniuse); | ||
return feature.insertBefore || feature.insertAfter ? { | ||
return feature$$1.insertBefore || feature$$1.insertAfter ? { | ||
browsers: unsupportedBrowsers, | ||
plugin: feature.plugin, | ||
specificationId: `${feature.insertBefore ? 'before' : 'after'}-${feature.specificationId}`, | ||
plugin: feature$$1.plugin, | ||
specificationId: `${feature$$1.insertBefore ? 'before' : 'after'}-${feature$$1.specificationId}`, | ||
stage: 6 | ||
} : { | ||
browsers: unsupportedBrowsers, | ||
plugin: plugins[feature.specificationId], | ||
specificationId: feature.specificationId, | ||
stage: feature.stage | ||
plugin: plugins[feature$$1.specificationId], | ||
specificationId: feature$$1.specificationId, | ||
stage: feature$$1.stage | ||
}; | ||
@@ -151,9 +151,9 @@ }); | ||
// staged features (those at or above the selected stage) | ||
var stagedFeatures = polyfillableFeatures.filter(function (feature) { | ||
return feature.specificationId in features ? features[feature.specificationId] : feature.stage >= stage; | ||
}).map(function (feature) { | ||
var stagedFeatures = polyfillableFeatures.filter(function (feature$$1) { | ||
return feature$$1.specificationId in features$$1 ? features$$1[feature$$1.specificationId] : feature$$1.stage >= stage; | ||
}).map(function (feature$$1) { | ||
return { | ||
browsers: feature.browsers, | ||
plugin: typeof feature.plugin.process === 'function' ? features[feature.specificationId] === true ? feature.plugin() : feature.plugin(features[feature.specificationId]) : feature.plugin, | ||
specificationId: feature.specificationId | ||
browsers: feature$$1.browsers, | ||
plugin: typeof feature$$1.plugin.process === 'function' ? features$$1[feature$$1.specificationId] === true ? feature$$1.plugin() : feature$$1.plugin(features$$1[feature$$1.specificationId]) : feature$$1.plugin, | ||
specificationId: feature$$1.specificationId | ||
}; | ||
@@ -170,5 +170,5 @@ }); | ||
// features supported by the stage and browsers | ||
var supportedFeatures = stagedFeatures.filter(function (feature) { | ||
var supportedFeatures = stagedFeatures.filter(function (feature$$1) { | ||
return supportedBrowsers.some(function (supportedBrowser) { | ||
return browserslist(feature.browsers, { | ||
return browserslist(feature$$1.browsers, { | ||
ignoreUnknownVersions: true | ||
@@ -182,5 +182,5 @@ }).some(function (polyfillBrowser) { | ||
// polyfills run in execution order | ||
var polyfills = supportedFeatures.reduce(function (promise, feature) { | ||
var polyfills = supportedFeatures.reduce(function (promise, feature$$1) { | ||
return promise.then(function () { | ||
return feature.plugin(result.root, result); | ||
return feature$$1.plugin(result.root, result); | ||
}); | ||
@@ -187,0 +187,0 @@ }, Promise.resolve()); |
// tooling | ||
import caniuse from 'caniuse-lite'; | ||
import * as caniuse from 'caniuse-lite'; | ||
@@ -4,0 +4,0 @@ // return a list of browsers that do not support the feature |
@@ -11,3 +11,3 @@ // tooling | ||
import postcssFontFamilySystemUi from 'postcss-font-family-system-ui'; | ||
import postcssImageSetPolyfill from 'postcss-image-set-polyfill'; | ||
import postcssImageSetPolyfill from '@csstools/postcss-image-set-function'; | ||
import postcssLogical from 'postcss-logical'; | ||
@@ -14,0 +14,0 @@ import postcssNesting from 'postcss-nesting'; |
{ | ||
"name": "postcss-preset-env", | ||
"version": "3.3.0", | ||
"version": "3.4.0", | ||
"description": "Convert modern CSS into something browsers understand", | ||
@@ -29,6 +29,7 @@ "author": "Jonathan Neal <jonathantneal@hotmail.com>", | ||
"dependencies": { | ||
"browserslist": "^3.1.2", | ||
"@csstools/postcss-image-set-function": "^1.0.0", | ||
"browserslist": "^3.2.0", | ||
"caniuse-lite": "^1.0.30000815", | ||
"cssdb": "^1.6.0", | ||
"postcss": "^6.0.19", | ||
"postcss": "^6.0.20", | ||
"postcss-apply": "^0.9.0", | ||
@@ -47,3 +48,2 @@ "postcss-attribute-case-insensitive": "^2.0.0", | ||
"postcss-font-variant": "^3.0.0", | ||
"postcss-image-set-polyfill": "^0.4.4", | ||
"postcss-initial": "^2.0.0", | ||
@@ -64,3 +64,3 @@ "postcss-logical": "^1.0.2", | ||
"echint": "^4.0.1", | ||
"eslint": "^4.18.2", | ||
"eslint": "^4.19.0", | ||
"eslint-config-dev": "^2.0.0", | ||
@@ -70,3 +70,3 @@ "postcss-simple-vars": "^4.1.0", | ||
"pre-commit": "^1.2.2", | ||
"rollup": "^0.57.0", | ||
"rollup": "^0.57.1", | ||
"rollup-plugin-babel": "^3.0.3" | ||
@@ -73,0 +73,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
37215
0
+ Added@csstools/postcss-image-set-function@1.0.1(transitive)
- Removedpostcss-image-set-polyfill@^0.4.4
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-flag@1.0.0(transitive)
- Removedpostcss@6.0.1(transitive)
- Removedpostcss-image-set-polyfill@0.4.4(transitive)
- Removedpostcss-media-query-parser@0.2.3(transitive)
- Removedpostcss-value-parser@3.3.0(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.03.2.3(transitive)
Updatedbrowserslist@^3.2.0
Updatedpostcss@^6.0.20