Skip to content

Commit 029d4a8

Browse files
authored
update dependencies (#164)
1 parent 395524d commit 029d4a8

File tree

9 files changed

+2831
-1932
lines changed

9 files changed

+2831
-1932
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: node_js
22
node_js:
3-
- '8'
4-
- '9'
53
- '10'
4+
- '12'
65
after_script:
76
- 'cat coverage/lcov.info | ./node_modules/.bin/coveralls'

package-lock.json

Lines changed: 2808 additions & 1912 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@
3636
"space": true,
3737
"semicolon": false,
3838
"rules": {
39-
"operator-linebreak": "off"
39+
"operator-linebreak": "off",
40+
"space-before-function-paren": "off"
4041
}
4142
},
4243
"prettier": {
@@ -63,24 +64,24 @@
6364
"css-time-sort": "^1.0.0",
6465
"css-unit-sort": "^3.3.1",
6566
"css-value-browser-h4cks-analyzer": "^2.0.0",
66-
"flat": "^4.1.0",
67+
"flat": "^5.0.0",
6768
"gzip-size": "^5.1.1",
6869
"is-vendor-prefixed": "^3.3.1",
6970
"path": "^0.12.7",
70-
"postcss": "^7.0.17",
71+
"postcss": "^7.0.26",
7172
"postcss-values-parser": "^3.0.5",
7273
"specificity": "^0.4.1",
7374
"split-css-value": "^0.1.1",
7475
"split-lines": "^2.0.0",
75-
"string-natural-compare": "^2.0.3",
76+
"string-natural-compare": "^3.0.0",
7677
"tinycolor2": "^1.4.1",
7778
"vendor-prefixes": "^1.0.0"
7879
},
7980
"devDependencies": {
80-
"ava": "^2.3.0",
81-
"coveralls": "^3.0.6",
82-
"nyc": "^14.1.1",
83-
"xo": "^0.24.0"
81+
"ava": "^2.4.0",
82+
"coveralls": "^3.0.9",
83+
"nyc": "^15.0.0",
84+
"xo": "^0.25.3"
8485
},
8586
"nyc": {
8687
"reporter": [

src/analyzer/rules/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,9 @@ module.exports = rules => {
1717
.filter(({selectors}) => selectors.length > 0)
1818
.sort((a, b) => {
1919
if (a.selectors.length === b.selectors.length) {
20-
return compareStrings.caseInsensitive(
21-
a.selectors.join(''),
22-
b.selectors.join('')
23-
)
20+
return compareStrings(a.selectors.join(''), b.selectors.join(''), {
21+
caseInsensitive: true
22+
})
2423
}
2524

2625
return a.selectors.length - b.selectors.length

src/analyzer/selectors/complexity.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = selectors => {
77

88
try {
99
complexity = selectorComplexity(selector)
10-
} catch (error) {
10+
} catch (_) {
1111
// Fail silently, ignoring the error
1212
}
1313

src/analyzer/selectors/identifiers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
const specificity = require('specificity')
2-
const {caseInsensitive: stringCompare} = require('string-natural-compare')
2+
const stringCompare = require('string-natural-compare')
33

44
// Sort by identifiers count (high to low), then by alphabet (A-Z)
55
function sortByIdentifiersCount(a, b) {
66
if (a.count === b.count) {
7-
return stringCompare(a.value, b.value)
7+
return stringCompare(a.value, b.value, {caseInsensitive: true})
88
}
99

1010
return b.count - a.count

src/analyzer/values/colors.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function extractColorsFromDeclaration(declaration) {
1919
return colors.push(node)
2020
}
2121
})
22-
} catch (error) {}
22+
} catch (_) {}
2323

2424
if (colors.length > 0) {
2525
declaration.colors = colors.map(color => color.toString().trim())

src/utils/uniquer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
const stringSortFn = require('string-natural-compare')
22

33
module.exports = (values, sortFn) => {
4-
sortFn = sortFn || stringSortFn.caseInsensitive
4+
sortFn =
5+
sortFn ||
6+
function(a, b) {
7+
return stringSortFn(String(a), String(b), {caseInsensitive: true})
8+
}
59

610
// Create a Map of unique values and their counts
711
const reduced = [

test/analyzer/declarations/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ test('it ignores !importants when looking for unique declarations', t => {
6060
]
6161
const {totalUnique: actual} = analyze(fixture)
6262

63-
t.deepEqual(actual, 1)
63+
t.is(actual, 1)
6464
})

0 commit comments

Comments
 (0)