Skip to content

Commit 448f66d

Browse files
Dep and CI updates (#16)
1 parent ce9e596 commit 448f66d

File tree

5 files changed

+30
-20
lines changed

5 files changed

+30
-20
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ coverage/
33
tmp/
44
npm-debug.log*
55
.DS_Store
6+
.nyc_output/

.travis.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
1-
node_js:
2-
- stable
3-
- 9
4-
- 6
5-
- 4
6-
sudo: false
1+
os: linux
2+
dist: bionic
73
language: node_js
4+
node_js:
5+
- 12
6+
- 10
7+
- 8
88
script: "npm run test:cov"
9-
after_script: "npm i -g codecov.io && cat ./coverage/lcov.info | codecov"
9+
10+
jobs:
11+
include:
12+
- node_js: stable
13+
after_script: |
14+
npm i -g codecov
15+
npx nyc report --reporter=text-lcov | codecov --pipe
16+
# Node.js 6 is not supported by nyc, so run tests without code coverage
17+
- node_js: 6
18+
script: npm run test

index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ function cssExtract (bundle, opts) {
1616
var outFile = opts.out || opts.o || 'bundle.css'
1717
var sourceMap = d(opts.sourceMap, bundle && bundle._options && bundle._options.debug, false)
1818

19-
assert.equal(typeof bundle, 'object', 'bundle should be an object')
20-
assert.equal(typeof opts, 'object', 'opts should be an object')
19+
assert.strictEqual(typeof bundle, 'object', 'bundle should be an object')
20+
assert.strictEqual(typeof opts, 'object', 'opts should be an object')
2121

2222
// every time .bundle is called, attach hook
2323
bundle.on('reset', addHooks)

package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"scripts": {
77
"deps": "dependency-check . && dependency-check . --extra --no-dev",
88
"test": "standard && npm run deps && NODE_ENV=test node test",
9-
"test:cov": "standard && npm run deps && NODE_ENV=test istanbul cover ./test/index.js"
9+
"test:cov": "standard && npm run deps && NODE_ENV=test nyc node test"
1010
},
1111
"repository": "stackcss/css-extract",
1212
"keywords": [
@@ -20,21 +20,21 @@
2020
],
2121
"license": "MIT",
2222
"dependencies": {
23-
"bl": "^1.1.2",
23+
"bl": "^4.0.2",
2424
"defined": "^1.0.0",
2525
"from2-string": "^1.1.0",
2626
"static-module": "^3.0.0",
27-
"through2": "^2.0.1"
27+
"through2": "^4.0.2"
2828
},
2929
"devDependencies": {
30-
"browserify": "^13.0.0",
31-
"dependency-check": "^2.5.1",
30+
"browserify": "^16.5.2",
31+
"dependency-check": "^2.10.1",
3232
"insert-css": "^2.0.0",
33-
"istanbul": "^0.4.2",
34-
"sheetify": "^6.0.0",
35-
"standard": "^6.0.7",
36-
"tape": "^4.5.0",
37-
"tmp": "0.0.28"
33+
"nyc": "^15.1.0",
34+
"sheetify": "^8.0.0",
35+
"standard": "^14.3.4",
36+
"tape": "^5.0.1",
37+
"tmp": "^0.2.1"
3838
},
3939
"files": [
4040
"index.js",

test/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ test('css-extract', function (t) {
3333

3434
t.test('should extract sheetify css to file', function (t) {
3535
t.plan(3)
36-
tmpDir({unsafeCleanup: true}, onDir)
36+
tmpDir({ unsafeCleanup: true }, onDir)
3737

3838
function onDir (err, dir, cleanup) {
3939
t.ifError(err, 'no error')

0 commit comments

Comments
 (0)