diff --git a/CHANGELOG.md b/CHANGELOG.md index f1e0ce1..eba276a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 8.0.0 / 2020-09-21 + +- **BREAKING:** Support postcss v8 ([#344](https://github.com/postcss/postcss-cli/issues/344), [#349](https://github.com/postcss/postcss-cli/pull/349)) +- **BREAKING:** postcss is now a `peerDependency`, you must install it seperately ([#344](https://github.com/postcss/postcss-cli/issues/344), [#349](https://github.com/postcss/postcss-cli/pull/349)) +- Upgrade dependencies ([#340](https://github.com/postcss/postcss-cli/pull/340)) + # 7.1.2 / 2020-08-31 - Make `--version` machine-readable ([#334](https://github.com/postcss/postcss-cli/issues/334), [#335](https://github.com/postcss/postcss-cli/pull/335)) diff --git a/README.md b/README.md index 50bade6..71db6e6 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@

Install

```bash -npm i -g|-D postcss-cli +npm i -D postcss postcss-cli ```

Usage

diff --git a/lib/depGraph.js b/lib/depGraph.js index 783d76e..ace18be 100644 --- a/lib/depGraph.js +++ b/lib/depGraph.js @@ -1,6 +1,6 @@ 'use strict' const path = require('path') -const DepGraph = require('dependency-graph').DepGraph +const { DepGraph } = require('dependency-graph') const graph = new DepGraph() diff --git a/package.json b/package.json index 0588ea6..75a7200 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "postcss-cli", - "version": "7.1.2", + "version": "8.0.0", "description": "CLI for PostCSS", "main": "index.js", "engines": { @@ -24,24 +24,27 @@ "fs-extra": "^9.0.0", "get-stdin": "^8.0.0", "globby": "^11.0.0", - "postcss": "^7.0.0", - "postcss-load-config": "^2.0.0", - "postcss-reporter": "^6.0.0", + "postcss-load-config": "^2.1.1", + "postcss-reporter": "^7.0.0", "pretty-hrtime": "^1.0.3", "read-cache": "^1.0.0", - "yargs": "^15.0.2" + "yargs": "^16.0.0" }, "devDependencies": { "ava": "^3.1.0", "coveralls": "^3.0.0", - "eslint": "^6.8.0", - "eslint-config-problems": "4.0.0", + "eslint": "^7.8.0", + "eslint-config-problems": "5.0.0", "nyc": "^15.0.0", + "postcss": "^8.0.4", "postcss-import": "^12.0.0", - "prettier": "~2.0.0", - "sugarss": "^2.0.0", + "prettier": "~2.1.0", + "sugarss": "^3.0.0", "uuid": "^8.0.0" }, + "peerDependencies": { + "postcss": "^8.0.0" + }, "files": [ "bin", "index.js", diff --git a/test/.eslintrc.yaml b/test/.eslintrc.yaml deleted file mode 100644 index add5a78..0000000 --- a/test/.eslintrc.yaml +++ /dev/null @@ -1,2 +0,0 @@ -parserOptions: - sourceType: module diff --git a/test/base.js b/test/base.js index 1bef3e3..32eff27 100644 --- a/test/base.js +++ b/test/base.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const path = require('path') diff --git a/test/cli.js b/test/cli.js index d2e449c..0cdc7dc 100644 --- a/test/cli.js +++ b/test/cli.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const cli = require('./helpers/cli.js') diff --git a/test/config.js b/test/config.js index 774e2f5..b8b3de5 100644 --- a/test/config.js +++ b/test/config.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const path = require('path') diff --git a/test/dir.js b/test/dir.js index 51c0b6e..ec4e60e 100644 --- a/test/dir.js +++ b/test/dir.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const path = require('path') diff --git a/test/error.js b/test/error.js index e53ce05..38b972b 100644 --- a/test/error.js +++ b/test/error.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const tmp = require('./helpers/tmp.js') @@ -27,19 +28,6 @@ test('--map && writing to stdout', (t) => { }) }) -test.failing('invalid --config', (t) => { - return cli([ - 'test/fixtures/*.css', - '-c', - 'test/postcss.config.js', - '-d', - tmp(), - ]).then(({ error, code }) => { - t.is(code, 1, 'expected non-zero error code') - t.regex(error.toString(), /ENOENT: no such file or directory/) - }) -}) - test('plugin not found', (t) => { return cli(['test/fixtures/a.css', '-u', 'postcss-plugin', '-o', tmp()]).then( ({ error, code }) => { diff --git a/test/ext.js b/test/ext.js index 3f6e883..7016782 100644 --- a/test/ext.js +++ b/test/ext.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const fs = require('fs-extra') diff --git a/test/fixtures/_bad-plugin.js b/test/fixtures/_bad-plugin.js index 2911e95..7a4ffeb 100644 --- a/test/fixtures/_bad-plugin.js +++ b/test/fixtures/_bad-plugin.js @@ -1 +1,2 @@ +'use strict' throw new Error('This fails') diff --git a/test/glob.js b/test/glob.js index 574cebb..e60b75a 100644 --- a/test/glob.js +++ b/test/glob.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const path = require('path') diff --git a/test/helpers/clean.js b/test/helpers/clean.js index 526bedf..cabfc72 100644 --- a/test/helpers/clean.js +++ b/test/helpers/clean.js @@ -1,4 +1,4 @@ -'use strict' // eslint-disable-line +'use strict' const fs = require('fs-extra') Promise.all([ diff --git a/test/helpers/cli.js b/test/helpers/cli.js index 7512439..64b9154 100644 --- a/test/helpers/cli.js +++ b/test/helpers/cli.js @@ -1,3 +1,4 @@ +'use strict' const path = require('path') const { exec } = require('child_process') diff --git a/test/helpers/env.js b/test/helpers/env.js index 2fad200..b389370 100644 --- a/test/helpers/env.js +++ b/test/helpers/env.js @@ -1,3 +1,4 @@ +'use strict' const fs = require('fs-extra') const path = require('path') const globby = require('globby') diff --git a/test/helpers/read.js b/test/helpers/read.js index 3122ee1..88b6421 100644 --- a/test/helpers/read.js +++ b/test/helpers/read.js @@ -1,3 +1,4 @@ +'use strict' const { readFile } = require('fs-extra') module.exports = function (path) { diff --git a/test/helpers/tmp.js b/test/helpers/tmp.js index f084dea..a23fa35 100644 --- a/test/helpers/tmp.js +++ b/test/helpers/tmp.js @@ -1,3 +1,4 @@ +'use strict' const path = require('path') const { v4: uuid } = require('uuid') diff --git a/test/map.js b/test/map.js index ac64a78..04f90fd 100644 --- a/test/map.js +++ b/test/map.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const fs = require('fs-extra') diff --git a/test/misc.js b/test/misc.js index 29a736c..9240e32 100644 --- a/test/misc.js +++ b/test/misc.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const cli = require('./helpers/cli.js') diff --git a/test/parser.js b/test/parser.js index 4c56abb..1ac9805 100644 --- a/test/parser.js +++ b/test/parser.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const cli = require('./helpers/cli.js') diff --git a/test/replace.js b/test/replace.js index 5b48ad4..f2712a2 100644 --- a/test/replace.js +++ b/test/replace.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const fs = require('fs-extra') diff --git a/test/stdin.js b/test/stdin.js index 867145c..8709a94 100644 --- a/test/stdin.js +++ b/test/stdin.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const fs = require('fs-extra') diff --git a/test/stdout.js b/test/stdout.js index 9b26ad4..8bd5d7b 100644 --- a/test/stdout.js +++ b/test/stdout.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const fs = require('fs-extra') diff --git a/test/stringifier.js b/test/stringifier.js index 4256c79..db3ef28 100644 --- a/test/stringifier.js +++ b/test/stringifier.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const cli = require('./helpers/cli.js') diff --git a/test/syntax.js b/test/syntax.js index 4658d69..c4295f9 100644 --- a/test/syntax.js +++ b/test/syntax.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const cli = require('./helpers/cli.js') diff --git a/test/use.js b/test/use.js index 07901f6..25400f6 100644 --- a/test/use.js +++ b/test/use.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const cli = require('./helpers/cli.js') diff --git a/test/watch.js b/test/watch.js index 6012bf7..b5bce40 100644 --- a/test/watch.js +++ b/test/watch.js @@ -1,3 +1,4 @@ +'use strict' const test = require('ava') const fs = require('fs-extra')