diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index d11d019..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: [jakubpawlowicz] diff --git a/History.md b/History.md index 35b484f..5cbdfa9 100644 --- a/History.md +++ b/History.md @@ -1,4 +1,34 @@ -[5.5.0 / 2021-xx-xx](https://github.com/clean-css/clean-css-cli/compare/5.4...HEAD) +[5.6.3 / 2023-11-30](https://github.com/clean-css/clean-css-cli/compare/v5.6.2...v5.6.3) +================== + +* Bumps clean-css dependency to 5.3.3 + +[5.6.2 / 2023-01-19](https://github.com/clean-css/clean-css-cli/compare/v5.6.1...v5.6.2) +================== + +* Bumps clean-css dependency to 5.3.2 + +[5.6.1 / 2022-07-13](https://github.com/clean-css/clean-css-cli/compare/v5.6.0...v5.6.1) +================== + +* Bumps clean-css dependency to 5.3.1. + +[5.6.0 / 2022-03-31](https://github.com/clean-css/clean-css-cli/compare/v5.5.2...v5.6.0) +================== + +* Bumps clean-css dependency to 5.3.0. + +[5.5.2 / 2022-01-28](https://github.com/clean-css/clean-css-cli/compare/v5.5.1...v5.5.2) +================== + +* Bumps clean-css dependency to 5.2.4. + +[5.5.1 / 2022-01-26](https://github.com/clean-css/clean-css-cli/compare/v5.5.0...v5.5.1) +================== + +* Bumps clean-css dependency to 5.2.3. + +[5.5.0 / 2021-12-08](https://github.com/clean-css/clean-css-cli/compare/5.4...v5.5.0) ================== * Adds a new `--watch` switch, which makes CLI re-run optimizations when watched file(s) change. diff --git a/README.md b/README.md index fa1fe1b..49a7a9f 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,8 @@ clean-css-cli is a command-line interface to [clean-css](https://github.com/jaku Previously a part of clean-css it's a separate package since clean-css 4.0. +__IMPORTANT: clean-css-cli is now in a [maintenance mode](https://github.com/clean-css/clean-css-cli/discussions/76). PRs are still welcome, and I will try do an occasional bugfix relase.__ + **Table of Contents** - [Node.js version support](#nodejs-version-support) diff --git a/index.js b/index.js index 07ef5b6..bfd06df 100644 --- a/index.js +++ b/index.js @@ -100,6 +100,7 @@ function cli(process, beforeMinifyCallback) { if (program.rawArgs.indexOf('-O0') > -1) { options.level[0] = true; + options.level[1] = false; } if (program.rawArgs.indexOf('-O1') > -1) { diff --git a/package-lock.json b/package-lock.json index 15deb08..f06ecb2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "clean-css-cli", - "version": "5.4.2", + "version": "5.6.3", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -56,9 +56,9 @@ } }, "clean-css": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.2.2.tgz", - "integrity": "sha512-/eR8ru5zyxKzpBLv9YZvMXgTSSQn7AdkMItMYynsFgGwTveCRVam9IUPFloE85B4vAIj05IuKmmEoV7/AQjT0w==", + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", + "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", "requires": { "source-map": "~0.6.0" }, @@ -100,9 +100,9 @@ } }, "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, "date-now": { @@ -128,9 +128,9 @@ }, "dependencies": { "domelementtype": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.1.0.tgz", - "integrity": "sha512-LsTgx/L5VpD+Q8lmsXSHW2WpA+eBlZ9HPf3erD1IoPF00/3JKHZ3BknUVA2QGDNu69ZNmyFmCWBSO45XjYKC5w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.2.0.tgz", + "integrity": "sha512-DtBMo82pv1dFtUmHyr48beiuq792Sxohr+8Hm9zoxklYPfa6n0Z3Byjj2IV7bmr2IyqClnqEQhfgHJJ5QF0R5A==", "dev": true }, "entities": { @@ -199,9 +199,9 @@ } }, "follow-redirects": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.0.tgz", - "integrity": "sha512-aq6gF1BEKje4a9i9+5jimNFIpq4Q1WiwBToeRK5NvZBd/TRsmW8BsJfOEGkr76TbOyPVD3OVDN910EcUNtRYEA==", + "version": "1.14.8", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.8.tgz", + "integrity": "sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==", "dev": true }, "fs.realpath": { @@ -307,31 +307,41 @@ "dev": true }, "jshint": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.12.0.tgz", - "integrity": "sha512-TwuuaUDmra0JMkuqvqy+WGo2xGHSNjv1BA1nTIgtH2K5z1jHuAEeAgp7laaR+hLRmajRjcrM71+vByBDanCyYA==", + "version": "2.13.4", + "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.4.tgz", + "integrity": "sha512-HO3bosL84b2qWqI0q+kpT/OpRJwo0R4ivgmxaO848+bo10rc50SkPnrtwSFXttW0ym4np8jbJvLwk5NziB7jIw==", "dev": true, "requires": { "cli": "~1.0.0", "console-browserify": "1.1.x", "exit": "0.1.x", "htmlparser2": "3.8.x", - "lodash": "~4.17.19", + "lodash": "~4.17.21", "minimatch": "~3.0.2", - "shelljs": "0.3.x", "strip-json-comments": "1.0.x" + }, + "dependencies": { + "minimatch": { + "version": "3.0.8", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", + "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + } } }, "lodash": { - "version": "4.17.20", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", - "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", "dev": true }, "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", "requires": { "brace-expansion": "^1.1.7" } @@ -385,12 +395,6 @@ "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", "dev": true }, - "shelljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.3.0.tgz", - "integrity": "sha1-NZbmMHp4FUT1kfN9phg2DzHbV7E=", - "dev": true - }, "source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", diff --git a/package.json b/package.json index 65176d4..43f5572 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "clean-css-cli", - "version": "5.4.2", + "version": "5.6.3", "description": "A command-line interface to clean-css CSS optimization library", "scripts": { "check": "jshint ./bin/cleancss .", @@ -35,13 +35,13 @@ "homepage": "https://github.com/clean-css/clean-css-cli#readme", "dependencies": { "chokidar": "^3.5.2", - "clean-css": "^5.2.2", + "clean-css": "^5.3.3", "commander": "7.x", "glob": "^7.1.6" }, "devDependencies": { "http-proxy": "1.x", - "jshint": "^2.12.0", + "jshint": "^2.13.0", "source-map": "0.5.x", "vows": "^0.8.3" }, diff --git a/test/binary-test.js b/test/binary-test.js index 65d6673..d9848e2 100644 --- a/test/binary-test.js +++ b/test/binary-test.js @@ -156,6 +156,13 @@ vows.describe('cleancss') } }) }) + .addBatch({ + 'level 0 optimizations': pipedContext('a{color:#ff0000;margin:0 0 0 0}', '-O0', { + 'should skip all optimizations': function (error, stdout) { + assert.equal(stdout, 'a{color:#ff0000;margin:0 0 0 0}'); + } + }) + }) .addBatch({ 'enable restructuring optimizations': pipedContext('div{margin-top:0}.one{margin:0}.two{display:block;margin-top:0}', '-O2 restructureRules:on', { 'should do basic optimizations only': function (error, stdout) { diff --git a/test/fixtures/unsupported/selectors-ie7.css b/test/fixtures/unsupported/selectors-ie7.css index 3f2fc3e..d43708e 100644 --- a/test/fixtures/unsupported/selectors-ie7.css +++ b/test/fixtures/unsupported/selectors-ie7.css @@ -2,15 +2,15 @@ p:focus{top:0} p:before{top:0} p:after{top:0} p:root{top:0} -p:nth-of-type(1){top:0} -p:nth-last-of-type(1){top:0} +p:first-of-type{top:0} +p:last-of-type{top:0} p:first-of-type{top:0} p:last-of-type{top:0} p:only-of-type{top:0} p:only-child{top:0} p:last-child{top:0} -p:nth-child(1){top:0} -p:nth-last-child(1){top:0} +p:first-child{top:0} +p:last-child{top:0} p:empty{top:0} p:target{top:0} p:checked{top:0} diff --git a/test/fixtures/unsupported/selectors-ie8.css b/test/fixtures/unsupported/selectors-ie8.css index 2d01251..fb8a104 100644 --- a/test/fixtures/unsupported/selectors-ie8.css +++ b/test/fixtures/unsupported/selectors-ie8.css @@ -1,13 +1,13 @@ p:root{top:0} -p:nth-of-type(1){top:0} -p:nth-last-of-type(1){top:0} +p:first-of-type{top:0} +p:last-of-type{top:0} p:first-of-type{top:0} p:last-of-type{top:0} p:only-of-type{top:0} p:only-child{top:0} p:last-child{top:0} -p:nth-child(1){top:0} -p:nth-last-child(1){top:0} +p:first-child{top:0} +p:last-child{top:0} p:empty{top:0} p:target{top:0} p:checked{top:0}