bump `postcss`

master
Brad Cornes 2021-10-08 10:55:38 +01:00
parent 0be1037547
commit d32e9cc086
5 changed files with 49 additions and 35 deletions

72
package-lock.json generated
View File

@ -34,7 +34,7 @@
"multi-regexp2": "1.0.3",
"normalize-path": "3.0.0",
"pkg-up": "3.1.0",
"postcss": "8.2.6",
"postcss": "8.3.9",
"postcss-load-config": "3.0.1",
"postcss-selector-parser": "6.0.2",
"prettier": "2.3.0",
@ -6170,11 +6170,6 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"node_modules/colorette": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
"integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g=="
},
"node_modules/columnify": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz",
@ -13353,9 +13348,9 @@
"integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ=="
},
"node_modules/nanoid": {
"version": "3.1.25",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz",
"integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==",
"version": "3.1.29",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.29.tgz",
"integrity": "sha512-dW2pUSGZ8ZnCFIlBIA31SV8huOGCHb6OwzVCc7A69rb/a+SgPBwfmLvK5TKQ3INPbRkcI8a/Owo0XbiTNH19wg==",
"bin": {
"nanoid": "bin/nanoid.cjs"
},
@ -14453,6 +14448,11 @@
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"node_modules/picocolors": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
"integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA=="
},
"node_modules/picomatch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
@ -14645,13 +14645,14 @@
}
},
"node_modules/postcss": {
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz",
"integrity": "sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==",
"version": "8.3.9",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.9.tgz",
"integrity": "sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw==",
"license": "MIT",
"dependencies": {
"colorette": "^1.2.1",
"nanoid": "^3.1.20",
"source-map": "^0.6.1"
"nanoid": "^3.1.28",
"picocolors": "^0.2.1",
"source-map-js": "^0.6.2"
},
"engines": {
"node": "^10 || ^12 || >=14"
@ -16728,6 +16729,14 @@
"node": ">=0.10.0"
}
},
"node_modules/source-map-js": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz",
"integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/source-map-resolve": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz",
@ -23963,11 +23972,6 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"colorette": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",
"integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g=="
},
"columnify": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/columnify/-/columnify-1.5.4.tgz",
@ -29607,9 +29611,9 @@
"integrity": "sha512-2nMHqg1x5PU+unxX7PGY7AuYxl2qDx7PSrTRjizr8sxdd3l/3hBuWWaki62qmtYm2U5i4Z5E7GbjlyDFhs9/EQ=="
},
"nanoid": {
"version": "3.1.25",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz",
"integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q=="
"version": "3.1.29",
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.29.tgz",
"integrity": "sha512-dW2pUSGZ8ZnCFIlBIA31SV8huOGCHb6OwzVCc7A69rb/a+SgPBwfmLvK5TKQ3INPbRkcI8a/Owo0XbiTNH19wg=="
},
"nanomatch": {
"version": "1.2.13",
@ -30486,6 +30490,11 @@
"resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
"integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
},
"picocolors": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-0.2.1.tgz",
"integrity": "sha512-cMlDqaLEqfSaW8Z7N5Jw+lyIW869EzT73/F5lhtY9cLGoVxSXznfgfXMO0Z5K0o0Q2TkTXq+0KFsdnSe3jDViA=="
},
"picomatch": {
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz",
@ -30622,13 +30631,13 @@
"integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs="
},
"postcss": {
"version": "8.2.6",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.6.tgz",
"integrity": "sha512-xpB8qYxgPuly166AGlpRjUdEYtmOWx2iCwGmrv4vqZL9YPVviDVPZPRXxnXr6xPZOdxQ9lp3ZBFCRgWJ7LE3Sg==",
"version": "8.3.9",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.9.tgz",
"integrity": "sha512-f/ZFyAKh9Dnqytx5X62jgjhhzttjZS7hMsohcI7HEI5tjELX/HxCy3EFhsRxyzGvrzFF+82XPvCS8T9TFleVJw==",
"requires": {
"colorette": "^1.2.1",
"nanoid": "^3.1.20",
"source-map": "^0.6.1"
"nanoid": "^3.1.28",
"picocolors": "^0.2.1",
"source-map-js": "^0.6.2"
}
},
"postcss-load-config": {
@ -32222,6 +32231,11 @@
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
"integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
},
"source-map-js": {
"version": "0.6.2",
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz",
"integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug=="
},
"source-map-resolve": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.6.0.tgz",

View File

@ -42,7 +42,7 @@
"license-checker": "25.0.1",
"normalize-path": "3.0.0",
"pkg-up": "3.1.0",
"postcss": "8.2.6",
"postcss": "8.3.9",
"postcss-load-config": "3.0.1",
"postcss-selector-parser": "6.0.2",
"prettier": "2.3.0",

View File

@ -1,7 +1,7 @@
import selectorParser from 'postcss-selector-parser'
import dset from 'dset'
import dlv from 'dlv'
import type { Container, Node, Root, AtRule } from 'postcss'
import type { Container, Node, Root, AtRule, Document } from 'postcss'
function isAtRule(node: Node): node is AtRule {
return node.type === 'atrule'
@ -84,7 +84,7 @@ async function process(root: Root) {
}
})
let p: Container = rule
let p: Container | Document = rule
const keys = []
while (p.parent.type !== 'root') {
p = p.parent

View File

@ -24,7 +24,7 @@
"line-column": "1.0.2",
"moo": "0.5.1",
"multi-regexp2": "1.0.3",
"postcss": "8.2.6",
"postcss": "8.3.9",
"postcss-selector-parser": "6.0.2",
"semver": "7.3.2",
"sift-string": "0.0.2",

View File

@ -1,5 +1,5 @@
import { State } from './state'
import type { Container, Root, Rule } from 'postcss'
import type { Container, Document, Root, Rule } from 'postcss'
import dlv from 'dlv'
import { remToPx } from './remToPx'
@ -89,7 +89,7 @@ function replaceClassName(state: State, selector: string, find: string, replace:
export function getRuleContext(state: State, rule: Rule, className: string): string[] {
let context: string[] = [replaceClassName(state, rule.selector, className, '__placeholder__')]
let p: Container = rule
let p: Container | Document = rule
while (p.parent && p.parent.type !== 'root') {
p = p.parent
if (p.type === 'atrule') {