Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Commit

Permalink
Merge pull request #220 from csstools/next/release
Browse files Browse the repository at this point in the history
PostCSS 8 Support
  • Loading branch information
Antonio-Laguna committed Nov 16, 2021
2 parents 268e8a3 + 860144d commit 41aa293
Show file tree
Hide file tree
Showing 27 changed files with 398 additions and 500 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
* text=auto eol=lf
18 changes: 18 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,18 @@
name: test
on:
push:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [12, 16]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- run: yarn install --ignore-scripts
- run: yarn run test
7 changes: 4 additions & 3 deletions .gitignore
@@ -1,12 +1,13 @@
dist
node_modules
package-lock.json
yarn.lock
*.log*
*.result.css
.*
!.editorconfig
!.gitattributes
!.github
!.gitignore
!.rollup.js
!.tape.js
!.travis.yml
/index.js*
/index.mjs*
21 changes: 7 additions & 14 deletions .rollup.js
@@ -1,16 +1,9 @@
import babel from 'rollup-plugin-babel';
import pkg from './package.json'

export default {
input: 'src/postcss.js',
output: [
{ file: 'index.js', format: 'cjs', sourcemap: true },
{ file: 'index.mjs', format: 'esm', sourcemap: true }
],
plugins: [
babel({
presets: [
['@babel/env', { targets: { node: 6 } }]
]
})
]
};
...pkg.rollup,
plugins: pkg.rollup.plugins.map(plugin => require(plugin)()),
onwarn(warning, warn) {
if (warning.code !== 'UNRESOLVED_IMPORT') warn(warning)
}
}
13 changes: 1 addition & 12 deletions .tape.js
Expand Up @@ -89,29 +89,18 @@ module.exports = {
}
},
'insert:after': {
message: 'supports { stage: 1, features: { "color-mod-function": { unresolved: "warn" } }, insertAfter: { "color-mod-function": [ require("postcss-simple-vars")() ] } } usage',
message: 'supports { stage: 1, insertAfter: { "color-mod-function": [ require("postcss-simple-vars")() ] } } usage',
options: {
stage: 1,
features: {
'color-mod-function': {
unresolved: 'warn'
}
},
insertAfter: {
'color-mod-function': require('postcss-simple-vars')
}
},
warnings: 2
},
'insert:after:exec': {
message: 'supports { stage: 2, features: { "color-mod-function": { unresolved: "ignore" } }, insertAfter: { "color-mod-function": require("postcss-simple-vars")() } } usage',
options: {
stage: 2,
features: {
'color-mod-function': {
unresolved: 'ignore'
}
},
insertAfter: {
'color-mod-function': require('postcss-simple-vars')()
}
Expand Down
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

39 changes: 39 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,44 @@
# Changes to PostCSS Preset Env

### 7.0.0 (September 22, 2021)

- Updated `autoprefixer` to 10.3.5 (major)
- Updated `browserslist` to 4.12.0 (minor)
- Updated `caniuse-lite` to 1.0.30001048 (patch)
- Updated `css-blank-pseudo` to 2.0.0 (major)
- Updated `css-has-pseudo` to 2.0.0 (major)
- Updated `css-prefers-color-scheme` to 5.0.0 (major)
- Updated `cssdb` to 5.0.0 (major)
- Updated `postcss` to 7.0.27 (major)
- Updated `postcss-attribute-case-insensitive` to 5.0.0 (major)
- Updated `postcss-color-functional-notation` to 4.0.0 (major)
- Updated `postcss-color-hex-alpha` to 7.0.0 (major)
- Updated `postcss-color-rebeccapurple` to 7.0.0 (major)
- Updated `postcss-custom-media` to 8.0.0 (major)
- Updated `postcss-custom-properties` to 12.0.0 (major)
- Updated `postcss-custom-selectors` to 6.0.0 (major)
- Updated `postcss-dir-pseudo-class` to 6.0.0 (major)
- Updated `postcss-double-position-gradients` to 3.0.0 (major)
- Updated `postcss-env-function` to 4.0.0 (major)
- Updated `postcss-focus-visible` to 6.0.1 (major)
- Updated `postcss-focus-within` to 5.0.1 (major)
- Updated `postcss-font-variant` to 5.0.0 (major)
- Updated `postcss-gap-properties` to 3.0.0 (major)
- Updated `postcss-image-set-function` to 4.0.0 (major)
- Updated `postcss-initial` to 3.0.2 (patch)
- Updated `postcss-lab-function` to 4.0.0 (major)
- Updated `postcss-logical` to 5.0.0 (major)
- Updated `postcss-media-minmax` to 5.0.0 (major)
- Updated `postcss-nesting` to 8.0.1 (major)
- Updated `postcss-overflow-shorthand` to 3.0.0 (major)
- Updated `postcss-page-break` to 3.0.4 (major)
- Updated `postcss-place` to 7.0.0 (major)
- Updated `postcss-pseudo-class-any-link` to 7.0.0 (major)
- Updated `postcss-replace-overflow-wrap` to 4.0.0 (major)
- Updated `postcss-selector-matches` to 4.0.0 (major)
- Removed `postcss-color-gray`
- Updated support for Node 12+ (major)

### 6.7.0 (July 8, 2019)

- Fixed the issue of autoprefixer alerting an upcoming change to the API
Expand Down
10 changes: 5 additions & 5 deletions README.md
@@ -1,8 +1,8 @@
# PostCSS Preset Env [<img src="https://postcss.github.io/postcss/logo.svg" alt="PostCSS" width="90" height="90" align="right">][postcss]

[![NPM Version][npm-img]][npm-url]
[![Build Status][cli-img]][cli-url]
[![Support Chat][git-img]][git-url]
[<img alt="npm version" src="https://img.shields.io/npm/v/postcss-preset-env.svg" height="20">][npm-url]
[<img alt="build status" src="https://github.com/csstools/postcss-preset-env/workflows/test/badge.svg" height="20">][cli-url]
[<img alt="support chat" src="https://img.shields.io/badge/support-chat-blue.svg" height="20">][git-url]

[PostCSS Preset Env] lets you convert modern CSS into something most browsers
can understand, determining the polyfills you need based on your targeted
Expand Down Expand Up @@ -362,8 +362,8 @@ postcssPresetEnv({
});
```

[cli-img]: https://img.shields.io/travis/csstools/postcss-preset-env/master.svg
[cli-url]: https://travis-ci.org/csstools/postcss-preset-env
[cli-img]: https://github.com/postcss/postcss-preset-env/workflows/test/badge.svg
[cli-url]: https://github.com/postcss/postcss-preset-env/actions/workflows/test.yml?query=workflow/test
[git-img]: https://img.shields.io/badge/support-chat-blue.svg
[git-url]: https://gitter.im/postcss/postcss
[npm-img]: https://img.shields.io/npm/v/postcss-preset-env.svg
Expand Down
157 changes: 95 additions & 62 deletions package.json
@@ -1,85 +1,118 @@
{
"name": "postcss-preset-env",
"version": "6.7.0",
"version": "7.0.0",
"description": "Convert modern CSS into something browsers understand",
"author": "Jonathan Neal <jonathantneal@hotmail.com>",
"license": "CC0-1.0",
"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.js",
"module": "index.mjs",
"main": "dist/index.js",
"module": "dist/index.mjs",
"files": [
"index.js",
"index.js.map",
"index.mjs",
"index.mjs.map"
"dist"
],
"scripts": {
"build": "rollup -c .rollup.js --silent",
"prepublishOnly": "npm test",
"pretest:tape": "npm run build",
"test": "npm run test:js && npm run test:tape",
"test:js": "eslint src/*.js src/lib/*.js src/patch/*.js --cache --ignore-path .gitignore --quiet",
"test:tape": "postcss-tape"
"build": "npx rollup -c .rollup.js",
"build:watch": "npx rollup -c .rollup.js --watch",
"lint": "npx eslint --cache src",
"lint:fix": "npx eslint --cache --fix",
"pretest": "npm install && npm run build",
"test": "npm run lint && npm run tape",
"tape": "npx postcss-tape",
"prepublishOnly": "npm test"
},
"engines": {
"node": ">=6.0.0"
"node": ">=12"
},
"peerDependencies": {
"postcss": "^8.3"
},
"dependencies": {
"autoprefixer": "^9.6.1",
"browserslist": "^4.6.4",
"caniuse-lite": "^1.0.30001040",
"css-blank-pseudo": "^0.1.4",
"css-has-pseudo": "^0.10.0",
"css-prefers-color-scheme": "^3.1.1",
"cssdb": "^4.4.0",
"postcss": "^8.3.4",
"postcss-attribute-case-insensitive": "^4.0.1",
"postcss-color-functional-notation": "^2.0.1",
"postcss-color-gray": "^5.0.0",
"postcss-color-hex-alpha": "^5.0.3",
"postcss-color-mod-function": "^3.0.3",
"postcss-color-rebeccapurple": "^4.0.1",
"postcss-custom-media": "^7.0.8",
"postcss-custom-properties": "^8.0.11",
"postcss-custom-selectors": "^5.1.2",
"postcss-dir-pseudo-class": "^5.0.0",
"postcss-double-position-gradients": "^1.0.0",
"postcss-env-function": "^2.0.2",
"postcss-focus-visible": "^4.0.0",
"postcss-focus-within": "^4.0.0",
"postcss-font-variant": "^4.0.0",
"postcss-gap-properties": "^2.0.0",
"postcss-image-set-function": "^3.0.1",
"postcss-initial": "^3.0.1",
"postcss-lab-function": "^2.0.1",
"postcss-logical": "^3.0.0",
"postcss-media-minmax": "^4.0.0",
"postcss-nesting": "^7.0.0",
"postcss-overflow-shorthand": "^2.0.0",
"postcss-page-break": "^2.0.0",
"postcss-place": "^4.0.1",
"postcss-pseudo-class-any-link": "^6.0.0",
"postcss-replace-overflow-wrap": "^3.0.0",
"postcss-selector-matches": "^4.0.0",
"postcss-selector-not": "^4.0.0"
"autoprefixer": "^10.4.0",
"browserslist": "^4.17.5",
"caniuse-lite": "^1.0.30001272",
"css-blank-pseudo": "^2.0.0",
"css-has-pseudo": "^2.0.0",
"css-prefers-color-scheme": "^5.0.0",
"cssdb": "^5.0.0",
"postcss": "^8.3",
"postcss-attribute-case-insensitive": "^5.0.0",
"postcss-color-functional-notation": "^4.0.0",
"postcss-color-hex-alpha": "^8.0.0",
"postcss-color-rebeccapurple": "^7.0.0",
"postcss-custom-media": "^8.0.0",
"postcss-custom-properties": "^12.0.0",
"postcss-custom-selectors": "^6.0.0",
"postcss-dir-pseudo-class": "^6.0.0",
"postcss-double-position-gradients": "^3.0.0",
"postcss-env-function": "^4.0.1",
"postcss-focus-visible": "^6.0.1",
"postcss-focus-within": "^5.0.1",
"postcss-font-variant": "^5.0.0",
"postcss-gap-properties": "^3.0.0",
"postcss-image-set-function": "^4.0.0",
"postcss-initial": "^3.0.4",
"postcss-lab-function": "^4.0.0",
"postcss-logical": "^5.0.0",
"postcss-media-minmax": "^5.0.0",
"postcss-nesting": "^10.0.0",
"postcss-overflow-shorthand": "^3.0.0",
"postcss-page-break": "^3.0.4",
"postcss-place": "^7.0.0",
"postcss-pseudo-class-any-link": "^7.0.0",
"postcss-replace-overflow-wrap": "^4.0.0",
"postcss-selector-not": "^5.0.0"
},
"devDependencies": {
"@babel/core": "^7.5.0",
"@babel/preset-env": "^7.5.2",
"babel-eslint": "^10.0.2",
"eslint": "^5.16.0",
"eslint-config-dev": "^2.0.0",
"postcss-simple-vars": "^5.0.2",
"postcss-tape": "^4.0.0",
"@babel/core": "^7.15.8",
"@babel/preset-env": "^7.15.8",
"eslint": "^8.1.0",
"postcss-simple-vars": "^6.0.3",
"postcss-tape": "^6.0.1",
"pre-commit": "^1.2.2",
"rollup": "^1.16.6",
"rollup-plugin-babel": "^4.3.3"
"rollup": "^2.58.3",
"rollup-plugin-babel": "^4.4.0"
},
"babel": {
"presets": [
[
"@babel/env",
{
"targets": "maintained node versions"
}
]
]
},
"eslintConfig": {
"extends": "dev",
"parser": "babel-eslint"
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module"
},
"root": true
},
"rollup": {
"input": "src/postcss.js",
"plugins": [
"rollup-plugin-babel"
],
"output": [
{
"exports": "default",
"file": "dist/index.js",
"format": "cjs"
},
{
"file": "dist/index.mjs",
"format": "esm"
}
]
},
"keywords": [
"postcss",
Expand Down
3 changes: 2 additions & 1 deletion src/cli.js
Expand Up @@ -14,7 +14,7 @@ if (process.argv.length < 3) {
}

// get process and plugin options from the command line
const fileRegExp = /^[\w\/.]+$/;
const fileRegExp = /^[\w/.]+$/;
const argRegExp = /^--(\w+)=("|')?(.+)\2$/;
const relaxedJsonPropRegExp = /(['"])?([a-z0-9A-Z_]+)(['"])?:/g;
const relaxedJsonValueRegExp = /("[a-z0-9A-Z_]+":\s*)(?!true|false|null|\d+)'?([A-z0-9]+)'?([,}])/g;
Expand Down Expand Up @@ -106,6 +106,7 @@ function getStdin() {
process.stdin.on('readable', () => {
let chunk;

// eslint-disable-next-line no-cond-assign
while (chunk = process.stdin.read()) {
data += chunk;
}
Expand Down
1 change: 0 additions & 1 deletion src/lib/ids-by-execution-order.js
Expand Up @@ -19,7 +19,6 @@ export default [
'all-property', // run all-property before other property polyfills
'color-functional-notation',
'double-position-gradients',
'gray-function',
'hexadecimal-alpha-notation',
'lab-function',
'rebeccapurple-color',
Expand Down

0 comments on commit 41aa293

Please sign in to comment.