Skip to content

Commit 9b82575

Browse files
authored
Merge pull request #1 from zardoy/patch-1
update postcss peer & typings
2 parents baa5ea4 + 4d95df1 commit 9b82575

File tree

4 files changed

+34
-7
lines changed

4 files changed

+34
-7
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
"typescript": "^3.2.4",
5151
"typescript-eslint-parser": "^15.0.0",
5252
"vue": "^2.5.16",
53-
"vue-template-compiler": "^2.5.16"
53+
"vue-template-compiler": "^2.5.16",
54+
"postcss": "^8.4.13"
5455
},
5556
"optionalDependencies": {
5657
"less": "^3.9.0",
@@ -59,7 +60,7 @@
5960
"stylus": "^0.54.5"
6061
},
6162
"peerDependencies": {
62-
"postcss": ">=6.0",
63+
"postcss": ">=8.0",
6364
"vue-template-compiler": "*"
6465
},
6566
"dependencies": {

src/postcss-clean.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
import * as postcss from 'postcss'
1+
import {parse, Plugin} from 'postcss';
22

33
// ESM import of clean-css breaks test/runtime check this fix for reference:
44
// https://github.com/vuejs/vue-component-compiler/pull/103#issuecomment-632676899
55
const CleanCSS = require('clean-css')
66

7-
exports.default = (options: any): postcss.Plugin => {
7+
export const postcss = true;
8+
9+
export default (options: import('clean-css').Options = {}): Plugin => {
810
const clean = new CleanCSS(Object.assign({ compatibility: 'ie9' }, options))
911
return {
1012
postcssPlugin: 'clean',
1113
Once(css, res) {
1214
const output = clean.minify(css.toString())
13-
res.root = () => postcss.parse(output.styles)
15+
res.root = () => parse(output.styles)
1416
},
1517
}
1618
}
17-
exports.postcss = true

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
"noImplicitAny": true,
1515
"removeComments": false,
1616
"lib": ["es6", "es7"],
17-
"types": ["@types/jest", "node"]
17+
"types": ["@types/jest", "node"],
18+
"skipLibCheck": true
1819
},
1920
"include": ["src", "typings"]
2021
}

yarn.lock

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3445,6 +3445,11 @@ nan@^2.9.2:
34453445
version "2.10.0"
34463446
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
34473447

3448+
nanoid@^3.3.3:
3449+
version "3.3.4"
3450+
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.4.tgz#730b67e3cd09e2deacf03c027c81c9d9dbc5e8ab"
3451+
integrity sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==
3452+
34483453
nanomatch@^1.2.9:
34493454
version "1.2.9"
34503455
resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2"
@@ -3795,6 +3800,11 @@ performance-now@^2.1.0:
37953800
version "2.1.0"
37963801
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
37973802

3803+
picocolors@^1.0.0:
3804+
version "1.0.0"
3805+
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
3806+
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
3807+
37983808
pify@^2.0.0, pify@^2.3.0:
37993809
version "2.3.0"
38003810
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -3887,6 +3897,15 @@ postcss@^7.0.14:
38873897
source-map "^0.6.1"
38883898
supports-color "^6.1.0"
38893899

3900+
postcss@^8.4.13:
3901+
version "8.4.13"
3902+
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.13.tgz#7c87bc268e79f7f86524235821dfdf9f73e5d575"
3903+
integrity sha512-jtL6eTBrza5MPzy8oJLFuUscHDXTV5KcLlqAWHl5q5WYRfnNRGSmOZmOZ1T6Gy7A99mOZfqungmZMpMmCVJ8ZA==
3904+
dependencies:
3905+
nanoid "^3.3.3"
3906+
picocolors "^1.0.0"
3907+
source-map-js "^1.0.2"
3908+
38903909
prelude-ls@~1.1.2:
38913910
version "1.1.2"
38923911
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
@@ -4551,6 +4570,11 @@ sntp@2.x.x:
45514570
dependencies:
45524571
hoek "4.x.x"
45534572

4573+
source-map-js@^1.0.2:
4574+
version "1.0.2"
4575+
resolved "https://registry.yarnpkg.com/source-map-js/-/source-map-js-1.0.2.tgz#adbc361d9c62df380125e7f161f71c826f1e490c"
4576+
integrity sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==
4577+
45544578
source-map-resolve@^0.5.0:
45554579
version "0.5.1"
45564580
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a"

0 commit comments

Comments
 (0)