From 031aa10b4b31b33605f7b74ffcf006484724bc0e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 31 Aug 2020 21:07:40 -0400 Subject: [PATCH 1/7] Update dependency prettier to ~2.1.0 (#337) Co-authored-by: Renovate Bot --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0588ea6..390a175 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "eslint-config-problems": "4.0.0", "nyc": "^15.0.0", "postcss-import": "^12.0.0", - "prettier": "~2.0.0", + "prettier": "~2.1.0", "sugarss": "^2.0.0", "uuid": "^8.0.0" }, From 77d2c1d1f297f30c64e28ce59aea5996c1a362b6 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Mon, 31 Aug 2020 21:30:13 -0400 Subject: [PATCH 2/7] Clean up 'use strict' usage --- test/.eslintrc.yaml | 2 -- test/base.js | 1 + test/cli.js | 1 + test/config.js | 1 + test/dir.js | 1 + test/error.js | 1 + test/ext.js | 1 + test/fixtures/_bad-plugin.js | 1 + test/glob.js | 1 + test/helpers/clean.js | 2 +- test/helpers/cli.js | 1 + test/helpers/env.js | 1 + test/helpers/read.js | 1 + test/helpers/tmp.js | 1 + test/map.js | 1 + test/misc.js | 1 + test/parser.js | 1 + test/replace.js | 1 + test/stdin.js | 1 + test/stdout.js | 1 + test/stringifier.js | 1 + test/syntax.js | 1 + test/use.js | 1 + test/watch.js | 1 + 24 files changed, 23 insertions(+), 3 deletions(-) delete mode 100644 test/.eslintrc.yaml 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..4dace3c 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') 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') From 1c3ebba359cc4702c2094b1a28ef5a678e930dc6 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com> Date: Tue, 1 Sep 2020 10:40:13 -0400 Subject: [PATCH 3/7] Upgrade eslint & eslint-config-problems (#339) Closes #326 Closes #338 --- lib/depGraph.js | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 390a175..12c5763 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "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-import": "^12.0.0", "prettier": "~2.1.0", From 66b6055d3cf8b1960b4e83131d06f1f382940e16 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 21 Sep 2020 12:47:41 -0400 Subject: [PATCH 4/7] Update dependency yargs to v16 (#340) Co-authored-by: Renovate Bot --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 12c5763..7a9487a 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "postcss-reporter": "^6.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", From a4998fafdf40e58c299565676ac26137219592d5 Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman <17342435+RyanZim@users.noreply.github.com> Date: Mon, 21 Sep 2020 12:48:10 -0400 Subject: [PATCH 5/7] Support postcss v8 (#349) * Support postcss v8 Fixes #344 Closes #348, closes #345, closes #343. * Don't promote global installs --- README.md | 2 +- package.json | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) 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/package.json b/package.json index 7a9487a..0237360 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,8 @@ "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": "^16.0.0" @@ -37,11 +36,15 @@ "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.1.0", - "sugarss": "^2.0.0", + "sugarss": "^3.0.0", "uuid": "^8.0.0" }, + "peerDependencies": { + "postcss": "^8.0.0" + }, "files": [ "bin", "index.js", From ed69076bea45df66dcde8f317af3e886f5706f1c Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Mon, 21 Sep 2020 13:06:59 -0400 Subject: [PATCH 6/7] Remove obsolete failing test Fixes #123 --- test/error.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/test/error.js b/test/error.js index 4dace3c..38b972b 100644 --- a/test/error.js +++ b/test/error.js @@ -28,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 }) => { From 9e03d5c001a68027d569bf8c10fe3e448a40851d Mon Sep 17 00:00:00 2001 From: Ryan Zimmerman Date: Mon, 21 Sep 2020 13:53:28 -0400 Subject: [PATCH 7/7] 8.0.0 --- CHANGELOG.md | 6 ++++++ package.json | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) 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/package.json b/package.json index 0237360..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": {