From 689cb49494673aa1c0caa4bf956dd8ade9d13b56 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Sat, 19 Sep 2020 06:18:50 +0100 Subject: [PATCH 01/13] PostCSS 8 support --- .github/workflows/test.yml | 2 +- .jshintrc | 2 +- CHANGELOG | 5 ++ Gruntfile.js | 2 +- package-lock.json | 17 +++++-- package.json | 12 ++--- test/test.js | 100 ++++++++++++++++++++++--------------- 7 files changed, 87 insertions(+), 53 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b51b98c..87daf67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - node: [8, 14] + node: [14] steps: - name: Clone repository diff --git a/.jshintrc b/.jshintrc index 69e76d3..8214772 100644 --- a/.jshintrc +++ b/.jshintrc @@ -1,5 +1,5 @@ { - "esversion": 6, + "esversion": 8, "curly": true, "eqeqeq": true, "expr": true, diff --git a/CHANGELOG b/CHANGELOG index 2533470..d724fc7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +v3.0.0 + date: 19-09-2020 + changes: + - Updated PostCSS to 8.0.5 + - Drop support for NodeJS 8, 11 and 13 v2.0.4 date: 12-05-2020 changes: diff --git a/Gruntfile.js b/Gruntfile.js index b51981c..239a619 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -65,7 +65,7 @@ module.exports = (grunt) => { options: { map: { inline: false, - annotation: 'tmp/maps/' + annotation: '/tmp/maps/' }, processors: processors }, diff --git a/package-lock.json b/package-lock.json index 357e372..ca0c238 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@lodder/grunt-postcss", - "version": "2.0.4", + "version": "3.0.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -802,7 +802,8 @@ "colorette": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", - "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==" + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==", + "dev": true }, "colors": { "version": "1.1.2", @@ -2976,6 +2977,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/line-column/-/line-column-1.0.2.tgz", "integrity": "sha1-0lryk2tvSEkXKzEuR5LR2Ye8NKI=", + "dev": true, "requires": { "isarray": "^1.0.0", "isobject": "^2.0.0" @@ -2984,12 +2986,14 @@ "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true }, "isobject": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, "requires": { "isarray": "1.0.0" } @@ -3307,7 +3311,8 @@ "nanoid": { "version": "3.1.12", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.12.tgz", - "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==" + "integrity": "sha512-1qstj9z5+x491jfiC4Nelk+f8XBad7LN20PmyWINJEMRSf3wcAjAWysw1qaA8z6NSKe2sjq1hRSDpBH5paCb6A==", + "dev": true }, "nanomatch": { "version": "1.2.13", @@ -3846,6 +3851,7 @@ "version": "8.0.5", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.0.5.tgz", "integrity": "sha512-3rDm6KR0jHstte3aL3ugrCyFA1UXY90SWNwRZ2WTmRf/QpOqM35mm0FrRR+HHZQ5fY9+nXFat1nl2ekYJf0P4w==", + "dev": true, "requires": { "colorette": "^1.2.1", "line-column": "^1.0.2", @@ -6191,7 +6197,8 @@ "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true }, "source-map-resolve": { "version": "0.5.3", diff --git a/package.json b/package.json index c8c0271..a4e89a3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@lodder/grunt-postcss", - "version": "2.0.4", + "version": "3.0.0", "description": "Apply several post-processors to your CSS using PostCSS", "author": { "name": "Dmitry Nikitenko", @@ -9,7 +9,7 @@ "repository": "C-Lodder/grunt-postcss", "license": "MIT", "engines": { - "node": ">= 8" + "node": ">= 14" }, "scripts": { "test": "grunt test" @@ -26,13 +26,12 @@ ], "dependencies": { "diff": "^4.0.2", - "maxmin": "^3.0.0", - "postcss": "^8.0.5" + "maxmin": "^3.0.0" }, "devDependencies": { "@lodder/time-grunt": "^4.0.0", "cssnano": "^4.1.10", - "grunt": "^1.1.0", + "grunt": "^1.3.0", "grunt-contrib-clean": "^2.0.0", "grunt-contrib-jshint": "^2.1.0", "grunt-contrib-nodeunit": "^2.1.0", @@ -40,6 +39,7 @@ "postcss-scss": "^3.0.0" }, "peerDependencies": { - "grunt": ">=1.0.4" + "grunt": ">=1.0.4", + "postcss": "^8.0.5" } } diff --git a/test/test.js b/test/test.js index 66d8285..5c4b3bd 100644 --- a/test/test.js +++ b/test/test.js @@ -1,4 +1,5 @@ -const grunt = require('grunt'); +const fs = require('fs'); +const { readFile, access } = fs.promises; /* ======== A Handy Little Nodeunit Reference ======== @@ -20,59 +21,74 @@ const grunt = require('grunt'); test.ifError(value) */ +const fileExists = async(file) => { + try { + await access(file); + return true; + } catch (err) { + return false; + } +}; + exports.gruntPostcss = { - defaults: (test) => { + defaults: async(test) => { const actual = { - css: grunt.file.read('tmp/defaults.css'), + css: await readFile('tmp/defaults.css', 'utf8'), }; const expected = { - css: grunt.file.read('test/expected/defaults.css'), + css: await readFile('test/expected/defaults.css', 'utf8'), }; + const checkExists = await fileExists('tmp/defaults.css.map'); + test.strictEqual(actual.css, expected.css); - test.ok(!grunt.file.exists('tmp/defaults.css.map')); + test.ok(!checkExists); test.done(); }, - defaultsFn: (test) => { + defaultsFn: async(test) => { const actual = { - css: grunt.file.read('tmp/defaultsFn.css'), + css: await readFile('tmp/defaultsFn.css', 'utf8'), }; const expected = { - css: grunt.file.read('test/expected/defaults.css'), + css: await readFile('test/expected/defaults.css', 'utf8'), }; + const checkExists = await fileExists('tmp/defaultsFn.css.map'); + test.strictEqual(actual.css, expected.css); - test.ok(!grunt.file.exists('tmp/defaultsFn.css.map')); + test.ok(!checkExists); test.done(); }, - mapInline: (test) => { + mapInline: async(test) => { const actual = { - css: grunt.file.read('tmp/mapInline.css'), + css: await readFile('tmp/mapInline.css', 'utf8'), }; const expected = { - css: grunt.file.read('test/expected/mapInline.css'), + css: await readFile('test/expected/mapInline.css', 'utf8'), }; + const checkExists = await fileExists('tmp/mapInline.css.map'); + test.strictEqual(actual.css, expected.css); - test.ok(!grunt.file.exists('tmp/mapInline.css.map')); + test.ok(!checkExists); test.done(); }, - mapSeparate: (test) => { + mapSeparate: async(test) => { const actual = { - css: grunt.file.read('tmp/mapSeparate.css'), - map: grunt.file.read('tmp/mapSeparate.css.map'), + css: await readFile('tmp/mapSeparate.css', 'utf8'), + map: await readFile('tmp/mapSeparate.css.map', 'utf8'), }; const expected = { - css: grunt.file.read('test/expected/mapSeparate.css'), - map: grunt.file.read('test/expected/mapSeparate.css.map'), + css: await readFile('test/expected/mapSeparate.css', 'utf8'), + map: await readFile('test/expected/mapSeparate.css.map', 'utf8'), }; test.strictEqual(actual.css, expected.css); @@ -80,32 +96,34 @@ exports.gruntPostcss = { test.done(); }, - mapAnnotationPath: (test) => { + mapAnnotationPath: async(test) => { const actual = { - css: grunt.file.read('tmp/mapAnnotationPath.css'), - map: grunt.file.read('tmp/maps/mapAnnotationPath.css.map'), + css: await readFile('tmp/mapAnnotationPath.css', 'utf8'), + map: await readFile('tmp/maps/mapAnnotationPath.css.map', 'utf8'), }; const expected = { - css: grunt.file.read('test/expected/mapAnnotationPath.css'), - map: grunt.file.read('test/expected/maps/mapAnnotationPath.css.map'), + css: await readFile('test/expected/mapAnnotationPath.css', 'utf8'), + map: await readFile('test/expected/maps/mapAnnotationPath.css.map', 'utf8'), }; + const checkExists = await fileExists('tmp/mapAnnotationPath.css.map'); + test.strictEqual(actual.css, expected.css); test.strictEqual(actual.map, expected.map); - test.ok(!grunt.file.exists('tmp/mapAnnotationPath.css.map')); + test.ok(!checkExists); test.done(); }, - diff: (test) => { + diff: async(test) => { const actual = { - css: grunt.file.read('tmp/diff.css'), - map: grunt.file.read('tmp/diff.css.diff'), + css: await readFile('tmp/diff.css', 'utf8'), + map: await readFile('tmp/diff.css.diff', 'utf8'), }; const expected = { - css: grunt.file.read('test/expected/diff.css'), - map: grunt.file.read('test/expected/diff.css.diff'), + css: await readFile('test/expected/diff.css', 'utf8'), + map: await readFile('test/expected/diff.css.diff', 'utf8'), }; test.strictEqual(actual.css, expected.css); @@ -113,29 +131,33 @@ exports.gruntPostcss = { test.done(); }, - syntax: (test) => { + syntax: async(test) => { const actual = { - scss: grunt.file.read('tmp/syntax.scss'), + scss: await readFile('tmp/syntax.scss', 'utf8'), }; const expected = { - scss: grunt.file.read('test/expected/syntax.scss'), + scss: await readFile('test/expected/syntax.scss', 'utf8'), }; test.strictEqual(actual.scss, expected.scss); test.done(); }, - writeDest: (test) => { - test.ok(grunt.file.exists('tmp/doWriteDest.scss')); - test.ok(!grunt.file.exists('tmp/noWriteDest.scss')); + writeDest: async(test) => { + const checkExists = await fileExists('tmp/doWriteDest.css'); + const checkNoExists = await fileExists('tmp/noWriteDest.css'); + test.ok(checkExists); + test.ok(!checkNoExists); test.done(); }, - sequential: (test) => { - test.ok(grunt.file.exists('tmp/sequential.css')); - const actual = grunt.file.read('tmp/sequential.css'); - const expected = grunt.file.read('test/fixtures/a.css'); + sequential: async(test) => { + const checkExists = await fileExists('tmp/sequential.css'); + test.ok(checkExists); + + const actual = await readFile('tmp/sequential.css', 'utf8'); + const expected = await readFile('test/fixtures/a.css', 'utf8'); test.strictEqual(actual, expected); test.done(); }, From 77cc1fe72486808f0e69edf371f160457f2a78fc Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Sat, 19 Sep 2020 07:00:30 +0100 Subject: [PATCH 02/13] Fix annotation path --- Gruntfile.js | 22 +++++++++++----------- test/test.js | 53 ++++++++++++++++++++++++++-------------------------- 2 files changed, 38 insertions(+), 37 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 239a619..8dcac19 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -29,6 +29,17 @@ module.exports = (grunt) => { }, postcss: { + mapAnnotationPath: { + options: { + map: { + inline: false, + annotation: 'tmp/maps/' + }, + processors: processors + }, + src: 'test/fixtures/a.css', + dest: 'tmp/mapAnnotationPath.css' + }, defaults: { options: { processors: processors @@ -61,17 +72,6 @@ module.exports = (grunt) => { src: 'test/fixtures/a.css', dest: 'tmp/mapSeparate.css' }, - mapAnnotationPath: { - options: { - map: { - inline: false, - annotation: '/tmp/maps/' - }, - processors: processors - }, - src: 'test/fixtures/a.css', - dest: 'tmp/mapAnnotationPath.css' - }, diff: { options: { diff: true, diff --git a/test/test.js b/test/test.js index 5c4b3bd..019978e 100644 --- a/test/test.js +++ b/test/test.js @@ -25,13 +25,33 @@ const fileExists = async(file) => { try { await access(file); return true; - } catch (err) { + } catch (error) { + console.log(error); return false; } }; exports.gruntPostcss = { + mapAnnotationPath: async(test) => { + const actual = { + css: await readFile('tmp/mapAnnotationPath.css', 'utf8'), + map: await readFile('tmp/maps/mapAnnotationPath.css.map', 'utf8'), + }; + + const expected = { + css: await readFile('test/expected/mapAnnotationPath.css', 'utf8'), + map: await readFile('test/expected/maps/mapAnnotationPath.css.map', 'utf8'), + }; + + test.strictEqual(actual.css, expected.css); + test.strictEqual(actual.map, expected.map); + + const checkExists = await fileExists('tmp/mapAnnotationPath.css.map'); + test.ok(!checkExists); + test.done(); + }, + defaults: async(test) => { const actual = { css: await readFile('tmp/defaults.css', 'utf8'), @@ -41,9 +61,9 @@ exports.gruntPostcss = { css: await readFile('test/expected/defaults.css', 'utf8'), }; - const checkExists = await fileExists('tmp/defaults.css.map'); - test.strictEqual(actual.css, expected.css); + + const checkExists = await fileExists('tmp/defaults.css.map'); test.ok(!checkExists); test.done(); }, @@ -57,9 +77,9 @@ exports.gruntPostcss = { css: await readFile('test/expected/defaults.css', 'utf8'), }; - const checkExists = await fileExists('tmp/defaultsFn.css.map'); - test.strictEqual(actual.css, expected.css); + + const checkExists = await fileExists('tmp/defaultsFn.css.map'); test.ok(!checkExists); test.done(); }, @@ -73,9 +93,9 @@ exports.gruntPostcss = { css: await readFile('test/expected/mapInline.css', 'utf8'), }; - const checkExists = await fileExists('tmp/mapInline.css.map'); - test.strictEqual(actual.css, expected.css); + + const checkExists = await fileExists('tmp/mapInline.css.map'); test.ok(!checkExists); test.done(); }, @@ -96,25 +116,6 @@ exports.gruntPostcss = { test.done(); }, - mapAnnotationPath: async(test) => { - const actual = { - css: await readFile('tmp/mapAnnotationPath.css', 'utf8'), - map: await readFile('tmp/maps/mapAnnotationPath.css.map', 'utf8'), - }; - - const expected = { - css: await readFile('test/expected/mapAnnotationPath.css', 'utf8'), - map: await readFile('test/expected/maps/mapAnnotationPath.css.map', 'utf8'), - }; - - const checkExists = await fileExists('tmp/mapAnnotationPath.css.map'); - - test.strictEqual(actual.css, expected.css); - test.strictEqual(actual.map, expected.map); - test.ok(!checkExists); - test.done(); - }, - diff: async(test) => { const actual = { css: await readFile('tmp/diff.css', 'utf8'), From 709c0c1a309a63a77fc06ab8d57f734546129032 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Sat, 19 Sep 2020 07:18:18 +0100 Subject: [PATCH 03/13] revert order --- Gruntfile.js | 22 +++++++++++----------- tasks/postcss.js | 4 +++- test/test.js | 39 +++++++++++++++++++-------------------- 3 files changed, 33 insertions(+), 32 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 8dcac19..b51981c 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -29,17 +29,6 @@ module.exports = (grunt) => { }, postcss: { - mapAnnotationPath: { - options: { - map: { - inline: false, - annotation: 'tmp/maps/' - }, - processors: processors - }, - src: 'test/fixtures/a.css', - dest: 'tmp/mapAnnotationPath.css' - }, defaults: { options: { processors: processors @@ -72,6 +61,17 @@ module.exports = (grunt) => { src: 'test/fixtures/a.css', dest: 'tmp/mapSeparate.css' }, + mapAnnotationPath: { + options: { + map: { + inline: false, + annotation: 'tmp/maps/' + }, + processors: processors + }, + src: 'test/fixtures/a.css', + dest: 'tmp/mapAnnotationPath.css' + }, diff: { options: { diff: true, diff --git a/tasks/postcss.js b/tasks/postcss.js index c56616e..bde080d 100644 --- a/tasks/postcss.js +++ b/tasks/postcss.js @@ -45,6 +45,7 @@ module.exports = (grunt) => { } if (typeof options.map.annotation === 'string') { + //annotation = path.relative(path.dirname(to), getSourcemapPath(to)); annotation = path.relative(path.dirname(to), getSourcemapPath(to)).replace(/\\/g, '/'); } @@ -63,7 +64,8 @@ module.exports = (grunt) => { prev: getPrevMap(from), inline: (typeof options.map.inline === 'boolean') ? options.map.inline : true, annotation: getAnnotation(to), - sourcesContent: (typeof options.map.sourcesContent === 'boolean') ? options.map.sourcesContent : true + sourcesContent: (typeof options.map.sourcesContent === 'boolean') ? options.map.sourcesContent : true, + //absolute: (typeof options.map.absolute === 'boolean') ? options.map.absolute : false }, from: from, to: to, diff --git a/test/test.js b/test/test.js index 019978e..c2020ff 100644 --- a/test/test.js +++ b/test/test.js @@ -26,32 +26,12 @@ const fileExists = async(file) => { await access(file); return true; } catch (error) { - console.log(error); return false; } }; exports.gruntPostcss = { - mapAnnotationPath: async(test) => { - const actual = { - css: await readFile('tmp/mapAnnotationPath.css', 'utf8'), - map: await readFile('tmp/maps/mapAnnotationPath.css.map', 'utf8'), - }; - - const expected = { - css: await readFile('test/expected/mapAnnotationPath.css', 'utf8'), - map: await readFile('test/expected/maps/mapAnnotationPath.css.map', 'utf8'), - }; - - test.strictEqual(actual.css, expected.css); - test.strictEqual(actual.map, expected.map); - - const checkExists = await fileExists('tmp/mapAnnotationPath.css.map'); - test.ok(!checkExists); - test.done(); - }, - defaults: async(test) => { const actual = { css: await readFile('tmp/defaults.css', 'utf8'), @@ -116,6 +96,25 @@ exports.gruntPostcss = { test.done(); }, + mapAnnotationPath: async(test) => { + const actual = { + css: await readFile('tmp/mapAnnotationPath.css', 'utf8'), + map: await readFile('tmp/maps/mapAnnotationPath.css.map', 'utf8'), + }; + + const expected = { + css: await readFile('test/expected/mapAnnotationPath.css', 'utf8'), + map: await readFile('test/expected/maps/mapAnnotationPath.css.map', 'utf8'), + }; + + test.strictEqual(actual.css, expected.css); + test.strictEqual(actual.map, expected.map); + + const checkExists = await fileExists('tmp/mapAnnotationPath.css.map'); + test.ok(!checkExists); + test.done(); + }, + diff: async(test) => { const actual = { css: await readFile('tmp/diff.css', 'utf8'), From 9de3f8b1ec7e17ab3188789d58985609c8033838 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Sat, 19 Sep 2020 07:42:58 +0100 Subject: [PATCH 04/13] minor tweaks --- tasks/postcss.js | 1 - test/test.js | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tasks/postcss.js b/tasks/postcss.js index bde080d..269d22d 100644 --- a/tasks/postcss.js +++ b/tasks/postcss.js @@ -45,7 +45,6 @@ module.exports = (grunt) => { } if (typeof options.map.annotation === 'string') { - //annotation = path.relative(path.dirname(to), getSourcemapPath(to)); annotation = path.relative(path.dirname(to), getSourcemapPath(to)).replace(/\\/g, '/'); } diff --git a/test/test.js b/test/test.js index c2020ff..34f31d9 100644 --- a/test/test.js +++ b/test/test.js @@ -1,5 +1,4 @@ -const fs = require('fs'); -const { readFile, access } = fs.promises; +const { readFile, access } = require('fs').promises; /* ======== A Handy Little Nodeunit Reference ======== @@ -146,8 +145,9 @@ exports.gruntPostcss = { writeDest: async(test) => { const checkExists = await fileExists('tmp/doWriteDest.css'); - const checkNoExists = await fileExists('tmp/noWriteDest.css'); test.ok(checkExists); + + const checkNoExists = await fileExists('tmp/noWriteDest.css'); test.ok(!checkNoExists); test.done(); }, From ead77cf8e105cebfeb215748f516a42b0b04a7ab Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Sat, 19 Sep 2020 07:46:51 +0100 Subject: [PATCH 05/13] fix file name --- test/test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test.js b/test/test.js index 34f31d9..e4dba80 100644 --- a/test/test.js +++ b/test/test.js @@ -144,10 +144,10 @@ exports.gruntPostcss = { }, writeDest: async(test) => { - const checkExists = await fileExists('tmp/doWriteDest.css'); + const checkExists = await fileExists('tmp/doWriteDest.scss'); test.ok(checkExists); - const checkNoExists = await fileExists('tmp/noWriteDest.css'); + const checkNoExists = await fileExists('tmp/noWriteDest.scss'); test.ok(!checkNoExists); test.done(); }, From aa019b73bae33d07c2baf396a9b717b774d39391 Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Sat, 19 Sep 2020 07:49:47 +0100 Subject: [PATCH 06/13] test windows? --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87daf67..6f41dc1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ env: jobs: run: name: Node ${{ matrix.node }} - runs-on: ubuntu-latest + runs-on: [ubuntu-latest, windows-latest] strategy: fail-fast: false From 2ee9c44ba995a29e259e73559ca4c9a8b1bf1bff Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Sat, 19 Sep 2020 07:50:34 +0100 Subject: [PATCH 07/13] revert --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6f41dc1..87daf67 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ env: jobs: run: name: Node ${{ matrix.node }} - runs-on: [ubuntu-latest, windows-latest] + runs-on: ubuntu-latest strategy: fail-fast: false From b56f9cc888e2180d5653ad94135116c10f0d3e1c Mon Sep 17 00:00:00 2001 From: C-Lodder Date: Sat, 19 Sep 2020 08:27:16 +0100 Subject: [PATCH 08/13] Update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 91f0f2d..d2ea457 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This plugin requires Grunt `~1.0.3` -**Note:** As of v2.0.0, Node.js 8.x or above is required. +**Note:** As of v3.0.0, Node.js 14.x or above is required. If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: From a1bceff6145ed85c6816ec00cd94b02e74c5c134 Mon Sep 17 00:00:00 2001 From: Lodder Date: Mon, 21 Sep 2020 06:27:03 +0100 Subject: [PATCH 09/13] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2ea457..a527607 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ This plugin requires Grunt `~1.0.3` -**Note:** As of v3.0.0, Node.js 14.x or above is required. +**Note:** As of v3.0.0, Node.js 10.x, 12.x or 14.x is required. If you haven't used [Grunt](http://gruntjs.com/) before, be sure to check out the [Getting Started](http://gruntjs.com/getting-started) guide, as it explains how to create a [Gruntfile](http://gruntjs.com/sample-gruntfile) as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command: From 498c7e41500da044caec248a05ff613cc7672602 Mon Sep 17 00:00:00 2001 From: Lodder Date: Mon, 21 Sep 2020 06:27:23 +0100 Subject: [PATCH 10/13] Update test.yml --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87daf67..c3bda05 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - node: [14] + node: [10, 12, 14] steps: - name: Clone repository From 2f2663d58b9f5af11fe00670902698131a53efa6 Mon Sep 17 00:00:00 2001 From: Lodder Date: Mon, 21 Sep 2020 06:34:16 +0100 Subject: [PATCH 11/13] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4e89a3..9d9e2d8 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "repository": "C-Lodder/grunt-postcss", "license": "MIT", "engines": { - "node": ">= 14" + "node": "^10 || ^12 || >=14" }, "scripts": { "test": "grunt test" From e1eb651b9a4139e051be41baabeaae82d6446292 Mon Sep 17 00:00:00 2001 From: Lodder Date: Thu, 24 Sep 2020 12:29:48 +0100 Subject: [PATCH 12/13] Update CHANGELOG --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index d724fc7..db42076 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,7 +1,7 @@ v3.0.0 date: 19-09-2020 changes: - - Updated PostCSS to 8.0.5 + - Updated to PostCSS 8 - Drop support for NodeJS 8, 11 and 13 v2.0.4 date: 12-05-2020 From fe68fadd87a3ab7ae4c0e0289d5ee322b01f6835 Mon Sep 17 00:00:00 2001 From: Lodder Date: Thu, 24 Sep 2020 14:18:40 +0100 Subject: [PATCH 13/13] Update postcss.js --- tasks/postcss.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/postcss.js b/tasks/postcss.js index 269d22d..ea765a7 100644 --- a/tasks/postcss.js +++ b/tasks/postcss.js @@ -64,7 +64,7 @@ module.exports = (grunt) => { inline: (typeof options.map.inline === 'boolean') ? options.map.inline : true, annotation: getAnnotation(to), sourcesContent: (typeof options.map.sourcesContent === 'boolean') ? options.map.sourcesContent : true, - //absolute: (typeof options.map.absolute === 'boolean') ? options.map.absolute : false + absolute: (typeof options.map.absolute === 'boolean') ? options.map.absolute : false }, from: from, to: to,