From 512792b2532769a0f64f5b3e40d9c88e2006997e Mon Sep 17 00:00:00 2001 From: ylemkimon Date: Fri, 5 Jan 2018 00:37:46 +0900 Subject: [PATCH 1/2] Upgrade to PostCSS 6/cssnano 4 Updated cssnano options and its test(the order of declarations has been changed). --- package.json | 6 +++--- test/moduleMinimizeTest.js | 4 +++- .../keyframes-and-animation/expected.css | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 9cd6e8d9..86289730 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "author": "Tobias Koppers @sokra", "description": "css loader module for webpack", "engines": { - "node": ">=0.12.0 || >=4.3.0 <5.0.0 || >=5.10" + "node": ">=4.3.0 <5.0.0 || >=5.10" }, "files": [ "index.js", @@ -14,12 +14,12 @@ "dependencies": { "babel-code-frame": "^6.11.0", "css-selector-tokenizer": "^0.7.0", - "cssnano": ">=2.6.1 <4", "icss-utils": "^2.1.0", + "cssnano": "^4.0.0-rc.2", "loader-utils": "^1.0.2", "lodash.camelcase": "^4.3.0", "object-assign": "^4.0.1", - "postcss": "^5.0.6", + "postcss": "^6.0.0", "postcss-modules-extract-imports": "^1.0.0", "postcss-modules-local-by-default": "^1.0.1", "postcss-modules-scope": "^1.0.0", diff --git a/test/moduleMinimizeTest.js b/test/moduleMinimizeTest.js index 7efa9979..b847e073 100644 --- a/test/moduleMinimizeTest.js +++ b/test/moduleMinimizeTest.js @@ -16,7 +16,9 @@ describe("module minimize", function() { module: true, sourceMap: true, minimize: { - discardComments: false + preset: ['default', { + discardComments: false + }] }, localIdentName: '_[local]_' })); diff --git a/test/moduleMinimizeTestCases/keyframes-and-animation/expected.css b/test/moduleMinimizeTestCases/keyframes-and-animation/expected.css index 23b566a3..6274cbdb 100644 --- a/test/moduleMinimizeTestCases/keyframes-and-animation/expected.css +++ b/test/moduleMinimizeTestCases/keyframes-and-animation/expected.css @@ -1,3 +1,3 @@ -@keyframes _bounce_{0%{transform:translateY(-100%);opacity:0}5%{transform:translateY(-50%);opacity:1}}@keyframes _bounce2_{0%{transform:translateY(-100%);opacity:0}50%{transform:translateY(-50%);opacity:1}} +@keyframes _bounce_{0%{opacity:0;transform:translateY(-100%)}5%{opacity:1;transform:translateY(-50%)}}@keyframes _bounce2_{0%{opacity:0;transform:translateY(-100%)}50%{opacity:1;transform:translateY(-50%)}} -/* comment */._bounce_{animation-name:_bounce_;animation:_bounce2_ 1s ease;z-index:1442} \ No newline at end of file +/* comment */._bounce_{animation:_bounce2_ 1s ease;animation-name:_bounce_;z-index:1442} \ No newline at end of file From aee6326b49db9fcdfa40e35583f29a4892658a1a Mon Sep 17 00:00:00 2001 From: ylemkimon Date: Fri, 5 Jan 2018 00:39:28 +0900 Subject: [PATCH 2/2] Upgrade dependencies Upgraded to icss-utils 3, Codecov 3, ESLint 4, Mocha 4, should 13 --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 86289730..f0e82678 100644 --- a/package.json +++ b/package.json @@ -14,8 +14,8 @@ "dependencies": { "babel-code-frame": "^6.11.0", "css-selector-tokenizer": "^0.7.0", - "icss-utils": "^2.1.0", "cssnano": "^4.0.0-rc.2", + "icss-utils": "^3.0.0", "loader-utils": "^1.0.2", "lodash.camelcase": "^4.3.0", "object-assign": "^4.0.1", @@ -28,11 +28,11 @@ "source-list-map": "^2.0.0" }, "devDependencies": { - "codecov": "^1.0.1", - "eslint": "3.14.0", + "codecov": "^3.0.0", + "eslint": "^4.14.0", "istanbul": "^0.4.5", - "mocha": "^3.2.0", - "should": "^11.1.2", + "mocha": "^4.1.0", + "should": "^13.2.0", "standard-version": "^4.0.0" }, "scripts": {