Skip to content

Commit 72a8574

Browse files
committed
Update dependencies
1 parent cf87be4 commit 72a8574

File tree

5 files changed

+706
-931
lines changed

5 files changed

+706
-931
lines changed

data/prefixes.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ f(require('caniuse-lite/data/features/css-filter-function'), browsers =>
241241

242242
// Backdrop-filter
243243
let backdrop = require('caniuse-lite/data/features/css-backdrop-filter')
244+
244245
f(backdrop, { match: /y\sx|y\s#2/ }, browsers =>
245246
prefix(['backdrop-filter'], {
246247
feature: 'css-backdrop-filter',
@@ -305,6 +306,7 @@ f(require('caniuse-lite/data/features/user-select-none'), browsers =>
305306

306307
// Flexible Box Layout
307308
let flexbox = require('caniuse-lite/data/features/flexbox')
309+
308310
f(flexbox, { match: /a\sx/ }, browsers => {
309311
browsers = browsers.map(i => {
310312
if (/ie|firefox/.test(i)) {
@@ -685,6 +687,7 @@ f(require('caniuse-lite/data/features/css-deviceadaptation'), browsers =>
685687

686688
// Resolution Media Queries
687689
let resolut = require('caniuse-lite/data/features/css-media-resolution')
690+
688691
f(resolut, { match: /( x($| )|a #2)/ }, browsers =>
689692
prefix(['@resolution'], {
690693
feature: 'css-media-resolution',
@@ -757,6 +760,7 @@ f(logicalProps, { match: /x\s#2/ }, browsers =>
757760

758761
// CSS appearance
759762
let appearance = require('caniuse-lite/data/features/css-appearance')
763+
760764
f(appearance, { match: /#2|x/ }, browsers =>
761765
prefix(['appearance'], {
762766
feature: 'css-appearance',
@@ -810,6 +814,7 @@ f(require('caniuse-lite/data/features/css-image-set'), browsers =>
810814

811815
// Writing Mode
812816
let writingMode = require('caniuse-lite/data/features/css-writing-mode')
817+
813818
f(writingMode, { match: /a|x/ }, browsers =>
814819
prefix(['writing-mode'], {
815820
feature: 'css-writing-mode',
@@ -944,6 +949,7 @@ f(bidi, { match: /y x/ }, browsers =>
944949

945950
// overscroll-behavior selector
946951
let over = require('caniuse-lite/data/features/css-overscroll-behavior')
952+
947953
f(over, { match: /a #1/ }, browsers =>
948954
prefix(['overscroll-behavior'], {
949955
feature: 'css-overscroll-behavior',

lib/hacks/grid-utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ function changeDuplicateAreaSelectors (ruleSelectors, templateSelectors) {
337337
*/
338338
function selectorsEqual (ruleA, ruleB) {
339339
return ruleA.selectors.some(sel => {
340-
return ruleB.selectors.some(s => s === sel)
340+
return ruleB.selectors.includes(sel)
341341
})
342342
}
343343

package.json

Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@
2929
"postcss": "^8.1.0"
3030
},
3131
"dependencies": {
32-
"browserslist": "^4.16.1",
33-
"caniuse-lite": "^1.0.30001181",
34-
"colorette": "^1.2.1",
32+
"browserslist": "^4.16.3",
33+
"caniuse-lite": "^1.0.30001196",
34+
"colorette": "^1.2.2",
3535
"fraction.js": "^4.0.13",
3636
"normalize-range": "^0.1.2",
3737
"postcss-value-parser": "^4.1.0"
@@ -41,31 +41,31 @@
4141
"chalk": false
4242
},
4343
"devDependencies": {
44-
"@logux/eslint-config": "^44.1.0",
45-
"@size-limit/preset-small-lib": "4.9.1",
44+
"@logux/eslint-config": "^45.1.0",
45+
"@size-limit/preset-small-lib": "4.10.0",
4646
"@types/jest": "^26.0.20",
47-
"@typescript-eslint/eslint-plugin": "^4.14.1",
48-
"@typescript-eslint/parser": "^4.14.1",
49-
"check-dts": "^0.4.1",
50-
"clean-publish": "^1.1.8",
51-
"eslint": "^7.18.0",
47+
"@typescript-eslint/eslint-plugin": "^4.16.1",
48+
"@typescript-eslint/parser": "^4.16.1",
49+
"check-dts": "^0.4.4",
50+
"clean-publish": "^1.1.9",
51+
"eslint": "^7.21.0",
5252
"eslint-config-standard": "^16.0.2",
5353
"eslint-plugin-import": "^2.22.1",
54-
"eslint-plugin-jest": "^24.1.3",
54+
"eslint-plugin-jest": "^24.1.5",
5555
"eslint-plugin-node": "^11.1.0",
5656
"eslint-plugin-prefer-let": "^1.1.0",
57-
"eslint-plugin-prettierx": "^0.16.0",
58-
"eslint-plugin-promise": "^4.2.1",
57+
"eslint-plugin-prettierx": "^0.17.1",
58+
"eslint-plugin-promise": "^4.3.1",
5959
"eslint-plugin-security": "^1.4.0",
60-
"eslint-plugin-unicorn": "^27.0.0",
60+
"eslint-plugin-unicorn": "^28.0.2",
6161
"fs-extra": "^9.1.0",
6262
"husky": "^4.3.8",
6363
"jest": "^26.6.3",
64-
"lint-staged": "^10.5.3",
65-
"postcss": "^8.2.4",
66-
"size-limit": "^4.9.1",
67-
"ts-jest": "^26.5.0",
68-
"typescript": "^4.1.3"
64+
"lint-staged": "^10.5.4",
65+
"postcss": "^8.2.7",
66+
"size-limit": "^4.10.0",
67+
"ts-jest": "^26.5.3",
68+
"typescript": "^4.2.3"
6969
},
7070
"lint-staged": {
7171
"*.js": "eslint --fix",
@@ -88,7 +88,8 @@
8888
"security/detect-unsafe-regex": "off",
8989
"node/no-missing-require": "off",
9090
"no-unused-expressions": "off",
91-
"no-unused-vars": "off"
91+
"no-unused-vars": "off",
92+
"no-console": "off"
9293
},
9394
"overrides": [
9495
{

test/autoprefixer.test.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-disable @typescript-eslint/no-unused-expressions */
2-
import postcss, { AtRule, ChildNode, Container, Rule } from 'postcss'
2+
import postcss, { AtRule, ChildNode, Container, Rule, Plugin } from 'postcss'
33
import path from 'path'
44
import fs from 'fs'
55

@@ -84,7 +84,7 @@ let example = autoprefixer({
8484
overrideBrowserslist: ['defaults']
8585
})
8686

87-
function prefixer (name: string) {
87+
function prefixer (name: string): Plugin {
8888
if (
8989
name === 'grid' ||
9090
name === 'grid-gap' ||
@@ -162,16 +162,16 @@ function prefixer (name: string) {
162162
}
163163
}
164164

165-
function read (name: string) {
165+
function read (name: string): string {
166166
let file = path.join(__dirname, '/cases/' + name + '.css')
167167
return fs.readFileSync(file).toString()
168168
}
169169

170-
function universalizer (string: string) {
170+
function universalizer (string: string): string {
171171
return string.replace(/\r/g, '')
172172
}
173173

174-
function check (from: string, instance = prefixer(from)) {
174+
function check (from: string, instance = prefixer(from)): void {
175175
let input = read(from)
176176
let output = read(from + '.out')
177177
let result = postcss([instance]).process(input)
@@ -487,7 +487,7 @@ const isContainerNode = (node: ChildNode): node is AtRule | Rule => {
487487
}
488488

489489
it('does not broke AST', () => {
490-
function checkParent (node: Container) {
490+
function checkParent (node: Container): void {
491491
node.walk(child => {
492492
expect(child.parent).toBeDefined()
493493
if (isContainerNode(child)) checkParent(child)
@@ -535,7 +535,7 @@ it('sets browserslist environment', () => {
535535
})
536536

537537
it('takes values from other PostCSS plugins', () => {
538-
function plugin (root: Container) {
538+
function plugin (root: Container): void {
539539
root.walkDecls(i => {
540540
i.value = 'calc(0)'
541541
})
@@ -563,7 +563,7 @@ it('has disabled grid options by default', () => {
563563
})
564564

565565
it('has different outputs for different grid options', () => {
566-
function ap (gridValue: autoprefixer.Options['grid']) {
566+
function ap (gridValue: autoprefixer.Options['grid']): Plugin {
567567
return autoprefixer({
568568
overrideBrowserslist: ['Edge 12', 'IE 10'],
569569
grid: gridValue
@@ -590,7 +590,7 @@ it('has different outputs for different grid options', () => {
590590
})
591591

592592
it('has different outputs for different grid environment variables', () => {
593-
function ap (gridValue: autoprefixer.GridValue) {
593+
function ap (gridValue: autoprefixer.GridValue): Plugin {
594594
process.env.AUTOPREFIXER_GRID = gridValue
595595
return autoprefixer({ overrideBrowserslist: ['Edge 12', 'IE 10'] })
596596
}

0 commit comments

Comments
 (0)