From 13192a44f0f1948116a2a0be3ac883367c9573e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 6 Aug 2020 19:18:46 +0200 Subject: [PATCH 1/7] dep updates using `npx updtr` --- package.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c142119..8cd7f29 100644 --- a/package.json +++ b/package.json @@ -20,21 +20,21 @@ ], "license": "MIT", "dependencies": { - "bl": "^1.1.2", + "bl": "^4.0.2", "defined": "^1.0.0", "from2-string": "^1.1.0", "static-module": "^3.0.0", - "through2": "^2.0.1" + "through2": "^4.0.2" }, "devDependencies": { - "browserify": "^13.0.0", - "dependency-check": "^2.5.1", + "browserify": "^16.5.2", + "dependency-check": "^2.10.1", "insert-css": "^2.0.0", "istanbul": "^0.4.2", - "sheetify": "^6.0.0", - "standard": "^6.0.7", - "tape": "^4.5.0", - "tmp": "0.0.28" + "sheetify": "^8.0.0", + "standard": "^6.0.8", + "tape": "^5.0.1", + "tmp": "^0.2.1" }, "files": [ "index.js", From 8a2abd84ed0be48306c1d496acc43c3bc24fda5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 6 Aug 2020 19:23:09 +0200 Subject: [PATCH 2/7] update standard --- index.js | 4 ++-- package.json | 2 +- test/index.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 289f646..473099b 100644 --- a/index.js +++ b/index.js @@ -16,8 +16,8 @@ function cssExtract (bundle, opts) { var outFile = opts.out || opts.o || 'bundle.css' var sourceMap = d(opts.sourceMap, bundle && bundle._options && bundle._options.debug, false) - assert.equal(typeof bundle, 'object', 'bundle should be an object') - assert.equal(typeof opts, 'object', 'opts should be an object') + assert.strictEqual(typeof bundle, 'object', 'bundle should be an object') + assert.strictEqual(typeof opts, 'object', 'opts should be an object') // every time .bundle is called, attach hook bundle.on('reset', addHooks) diff --git a/package.json b/package.json index 8cd7f29..603c24f 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "insert-css": "^2.0.0", "istanbul": "^0.4.2", "sheetify": "^8.0.0", - "standard": "^6.0.8", + "standard": "^14.3.4", "tape": "^5.0.1", "tmp": "^0.2.1" }, diff --git a/test/index.js b/test/index.js index 1afa789..bb788d8 100644 --- a/test/index.js +++ b/test/index.js @@ -33,7 +33,7 @@ test('css-extract', function (t) { t.test('should extract sheetify css to file', function (t) { t.plan(3) - tmpDir({unsafeCleanup: true}, onDir) + tmpDir({ unsafeCleanup: true }, onDir) function onDir (err, dir, cleanup) { t.ifError(err, 'no error') From 619a45cbd13df5178b63a8530a7814768da23e67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 6 Aug 2020 19:24:23 +0200 Subject: [PATCH 3/7] ci: update matrix --- .travis.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb5b6c6..817ceaa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,17 @@ +os: linux +dist: bionic +language: node_js node_js: - - stable - - 9 + - 12 + - 10 + - 8 - 6 - 4 -sudo: false -language: node_js script: "npm run test:cov" -after_script: "npm i -g codecov.io && cat ./coverage/lcov.info | codecov" + +jobs: + include: + - node_js: stable + after_script: | + npm i -g codecov.io + cat ./coverage/lcov.info | codecov From aa34b952976c9db96db6034d094203ed4606ac2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 6 Aug 2020 19:27:25 +0200 Subject: [PATCH 4/7] ci: drop node 4 --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 817ceaa..b6477f6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,6 @@ node_js: - 10 - 8 - 6 - - 4 script: "npm run test:cov" jobs: From 77ed3ff60b74b01ed11085960bdf9bad8042f009 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 6 Aug 2020 19:28:22 +0200 Subject: [PATCH 5/7] use nyc --- .gitignore | 1 + package.json | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 5c49d4c..f6d83d4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ coverage/ tmp/ npm-debug.log* .DS_Store +.nyc_output/ diff --git a/package.json b/package.json index 603c24f..fb44f81 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "scripts": { "deps": "dependency-check . && dependency-check . --extra --no-dev", "test": "standard && npm run deps && NODE_ENV=test node test", - "test:cov": "standard && npm run deps && NODE_ENV=test istanbul cover ./test/index.js" + "test:cov": "standard && npm run deps && NODE_ENV=test nyc node test" }, "repository": "stackcss/css-extract", "keywords": [ @@ -30,7 +30,7 @@ "browserify": "^16.5.2", "dependency-check": "^2.10.1", "insert-css": "^2.0.0", - "istanbul": "^0.4.2", + "nyc": "^15.1.0", "sheetify": "^8.0.0", "standard": "^14.3.4", "tape": "^5.0.1", From c8494486f0a5ce0d54eabc827deb11903213ce56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 6 Aug 2020 19:31:01 +0200 Subject: [PATCH 6/7] ci: make it pass --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b6477f6..eb2ed17 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ node_js: - 12 - 10 - 8 - - 6 script: "npm run test:cov" jobs: @@ -14,3 +13,6 @@ jobs: after_script: | npm i -g codecov.io cat ./coverage/lcov.info | codecov + # Node.js 6 is not supported by nyc, so run tests without code coverage + - node_js: 6 + script: npm run test From d972ac252fb8760ac3c5900f00913edf4f21aed2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Thu, 6 Aug 2020 19:37:44 +0200 Subject: [PATCH 7/7] ci: make codecov work --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb2ed17..d3e8bac 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,8 +11,8 @@ jobs: include: - node_js: stable after_script: | - npm i -g codecov.io - cat ./coverage/lcov.info | codecov + npm i -g codecov + npx nyc report --reporter=text-lcov | codecov --pipe # Node.js 6 is not supported by nyc, so run tests without code coverage - node_js: 6 script: npm run test