From a9530879e8bf05defde97766f381ab49a1bda88c Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Sat, 29 May 2021 14:36:55 +0700 Subject: [PATCH] Require Node.js 12 and upgrade dependencies Closes #119 Fixes #118 --- .github/funding.yml | 4 ---- .github/workflows/main.yml | 5 ++--- license | 2 +- package.json | 22 +++++++++++----------- readme.md | 5 ----- test.js | 6 +++--- 6 files changed, 17 insertions(+), 27 deletions(-) delete mode 100644 .github/funding.yml diff --git a/.github/funding.yml b/.github/funding.yml deleted file mode 100644 index 15edf6e..0000000 --- a/.github/funding.yml +++ /dev/null @@ -1,4 +0,0 @@ -github: sindresorhus -open_collective: sindresorhus -patreon: sindresorhus -custom: https://sindresorhus.com/donate diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 18531b3..3b8aa86 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,13 +10,12 @@ jobs: fail-fast: false matrix: node-version: + - 16 - 14 - 12 - - 10 - - 8 steps: - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - run: npm install diff --git a/license b/license index e7af2f7..fa7ceba 100644 --- a/license +++ b/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/package.json b/package.json index 69a5047..ab03b07 100644 --- a/package.json +++ b/package.json @@ -7,10 +7,10 @@ "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" + "url": "https://sindresorhus.com" }, "engines": { - "node": ">=8" + "node": ">=12" }, "scripts": { "test": "xo && ava" @@ -30,19 +30,19 @@ "postcss-runner" ], "dependencies": { - "autoprefixer": "^9.6.1", - "fancy-log": "^1.3.2", + "autoprefixer": "^10.2.6", + "fancy-log": "^1.3.3", "plugin-error": "^1.0.1", - "postcss": "^7.0.17", - "through2": "^3.0.1", + "postcss": "^8.3.0", + "through2": "^4.0.2", "vinyl-sourcemaps-apply": "^0.2.1" }, "devDependencies": { - "ava": "^2.3.0", - "gulp-sourcemaps": "^2.6.0", - "p-event": "^4.1.0", - "vinyl": "^2.1.0", - "xo": "^0.24.0" + "ava": "^2.4.0", + "gulp-sourcemaps": "^3.0.0", + "p-event": "^4.2.0", + "vinyl": "^2.2.1", + "xo": "^0.39.0" }, "peerDependencies": { "gulp": ">=4" diff --git a/readme.md b/readme.md index 8d05731..eccad4b 100644 --- a/readme.md +++ b/readme.md @@ -4,14 +4,12 @@ *Issues with the output should be reported on the Autoprefixer [issue tracker](https://github.com/postcss/autoprefixer/issues).* - ## Install ``` $ npm install --save-dev gulp-autoprefixer ``` - ## Usage ```js @@ -27,7 +25,6 @@ exports.default = () => ( ); ``` - ## API ### autoprefixer(options?) @@ -38,7 +35,6 @@ Type: `object` See the Autoprefixer [options](https://github.com/postcss/autoprefixer#options). - ## Source Maps Use [gulp-sourcemaps](https://github.com/gulp-sourcemaps/gulp-sourcemaps) like this: @@ -59,7 +55,6 @@ exports.default = () => ( ); ``` - ## Tip If you use other PostCSS based tools, like `cssnano`, you may want to run them together using [`gulp-postcss`](https://github.com/postcss/autoprefixer#gulp) instead of `gulp-autoprefixer`. It will be faster, as the CSS is parsed only once for all PostCSS based tools, including Autoprefixer. diff --git a/test.js b/test.js index 909de5f..f05d1d1 100644 --- a/test.js +++ b/test.js @@ -17,7 +17,7 @@ test('autoprefix CSS', async t => { })); const file = await data; - t.true(/-/.test(file.contents.toString())); + t.regex(file.contents.toString(), /-/); t.is(file.relative, 'fixture.css'); }); @@ -43,8 +43,8 @@ test('generate source maps', async t => { const file = await data; t.is(file.sourceMap.mappings, 'AAAA;CACC,aAAa;AACd'); const contents = file.contents.toString(); - t.true(/flex/.test(contents)); - t.true(/sourceMappingURL=data:application\/json;charset=utf8;base64/.test(contents)); + t.regex(contents, /flex/); + t.regex(contents, /sourceMappingURL=data:application\/json;charset=utf8;base64/); }); test('read upstream source maps', async t => {