Skip to content

Commit

Permalink
feat: postcss 8 upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
Anidetrix committed Oct 8, 2020
1 parent e85888a commit b9adee9
Show file tree
Hide file tree
Showing 18 changed files with 796 additions and 757 deletions.
8 changes: 8 additions & 0 deletions __tests__/helpers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,10 @@ export interface TestData extends WriteData {

export function validate(data: TestData): void {
const options = data.options ?? {};
// eslint-disable-next-line jest/valid-title
test(data.title, async () => {
if (data.shouldFail) {
// eslint-disable-next-line jest/no-conditional-expect
await expect(write(data)).rejects.toThrowErrorMatchingSnapshot();
return;
}
Expand All @@ -107,15 +109,20 @@ export function validate(data: TestData): void {

const mode = inferModeOption(options.mode);
if (mode.extract) {
// eslint-disable-next-line jest/no-conditional-expect
await expect(res.isCss()).resolves.toBeTruthy();
// eslint-disable-next-line jest/no-conditional-expect
for (const f of await res.css()) expect(f).toMatchSnapshot("css");
}

const sourceMap = inferSourceMapOption(options.sourceMap);
if (sourceMap && !sourceMap.inline) {
// eslint-disable-next-line jest/no-conditional-expect
await expect(res.isMap()).resolves.toBe(Boolean(mode.extract));
// eslint-disable-next-line jest/no-conditional-expect
for (const f of await res.map()) expect(f).toMatchSnapshot("map");
} else {
// eslint-disable-next-line jest/no-conditional-expect
await expect(res.isMap()).resolves.toBeFalsy();
}

Expand All @@ -124,6 +131,7 @@ export function validate(data: TestData): void {
}

export function validateMany(groupName: string, testDatas: TestData[]): void {
// eslint-disable-next-line jest/valid-title
describe(groupName, () => {
for (const testData of testDatas) {
validate({ ...testData, outDir: path.join(groupName, testData.title) });
Expand Down
95 changes: 47 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,81 +46,80 @@
"test": "jest"
},
"dependencies": {
"@rollup/pluginutils": "^3.1.0",
"@rollup/pluginutils": "^4.0.0",
"@types/cssnano": "^4.0.0",
"cosmiconfig": "^6.0.0",
"cosmiconfig": "^7.0.0",
"cssnano": "^4.1.10",
"fs-extra": "^9.0.1",
"icss-utils": "^4.1.1",
"icss-utils": "^5.0.0-rc.0",
"mime-types": "^2.1.27",
"p-queue": "^6.4.0",
"postcss": "^7.0.32",
"postcss-modules-extract-imports": "^2.0.0",
"postcss-modules-local-by-default": "^3.0.2",
"postcss-modules-scope": "^2.2.0",
"postcss-modules-values": "^3.0.0",
"p-queue": "^6.6.1",
"postcss": "^8.1.1",
"postcss-modules-extract-imports": "^3.0.0-rc.1",
"postcss-modules-local-by-default": "^4.0.0-rc.1",
"postcss-modules-scope": "^3.0.0-rc.1",
"postcss-modules-values": "^4.0.0-rc.3",
"postcss-value-parser": "^4.1.0",
"query-string": "^6.13.5",
"resolve": "^1.17.0",
"source-map": "^0.7.3",
"tslib": "^2.0.0"
"tslib": "^2.0.2"
},
"devDependencies": {
"@babel/core": "^7.10.3",
"@babel/plugin-proposal-class-properties": "^7.10.1",
"@babel/preset-env": "^7.10.3",
"@commitlint/cli": "^9.0.1",
"@commitlint/config-angular": "^9.0.1",
"@commitlint/prompt-cli": "^9.0.1",
"@rollup/plugin-babel": "^5.0.4",
"@rollup/plugin-commonjs": "^13.0.0",
"@babel/core": "^7.11.6",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/preset-env": "^7.11.5",
"@commitlint/cli": "^11.0.0",
"@commitlint/config-angular": "^11.0.0",
"@commitlint/prompt-cli": "^11.0.0",
"@rollup/plugin-babel": "^5.2.1",
"@rollup/plugin-commonjs": "^15.1.0",
"@rollup/plugin-json": "^4.1.0",
"@rollup/plugin-node-resolve": "^8.1.0",
"@rollup/plugin-node-resolve": "^9.0.0",
"@rollup/plugin-replace": "^2.3.3",
"@rollup/plugin-typescript": "^5.0.0",
"@rollup/plugin-typescript": "^6.0.0",
"@semantic-release/changelog": "^5.0.1",
"@semantic-release/git": "^9.0.0",
"@types/fs-extra": "^9.0.1",
"@types/icss-utils": "^4.1.0",
"@types/jest": "^26.0.3",
"@types/jest": "^26.0.14",
"@types/mime-types": "^2.1.0",
"@types/node": "*",
"@types/resolve": "^1.17.1",
"@types/uglifycss": "^0.0.6",
"@typescript-eslint/eslint-plugin": "^3.4.0",
"@typescript-eslint/parser": "^3.4.0",
"autoprefixer": "^9.8.4",
"@typescript-eslint/eslint-plugin": "^4.4.0",
"@typescript-eslint/parser": "^4.4.0",
"autoprefixer": "^10.0.1",
"builtin-modules": "^3.1.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint": "^7.10.0",
"eslint-config-prettier": "^6.12.0",
"eslint-import-resolver-node": "^0.3.4",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-jest": "^23.17.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jest": "^24.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-unicorn": "^20.1.0",
"eslint-plugin-unicorn": "^22.0.0",
"gh-pages": "^3.1.0",
"husky": "^4.2.5",
"jest": "^26.1.0",
"jest-circus": "^26.1.0",
"less": "^3.11.3",
"lint-staged": "^10.2.11",
"husky": "^4.3.0",
"jest": "^26.5.2",
"jest-circus": "^26.5.2",
"less": "^3.12.2",
"lint-staged": "^10.4.0",
"minireset.css": "^0.0.6",
"node-sass": "^4.14.1",
"postcss-custom-properties": "^9.1.1",
"prettier": "^2.0.5",
"rollup": "^2.18.0",
"rollup-plugin-dts": "^1.4.7",
"rollup-plugin-lit-css": "^2.0.4",
"postcss-custom-properties": "^10.0.0",
"prettier": "^2.1.2",
"rollup": "^2.29.0",
"rollup-plugin-dts": "^1.4.13",
"rollup-plugin-lit-css": "^2.0.5",
"rollup-plugin-node-externals": "^2.2.0",
"rollup-plugin-terser": "^6.1.0",
"sass": "^1.26.9",
"semantic-release": "^17.1.1",
"rollup-plugin-terser": "^7.0.2",
"sass": "^1.27.0",
"semantic-release": "^17.1.2",
"shx": "^0.3.2",
"stylus": "^0.54.7",
"sugarss": "^2.0.0",
"ts-jest": "^26.1.1",
"typedoc": "^0.17.7",
"typescript": "^3.9.5"
"stylus": "^0.54.8",
"sugarss": "^3.0.1",
"ts-jest": "^26.4.1",
"typedoc": "^0.19.2",
"typescript": "^4.0.3"
},
"peerDependencies": {
"rollup": "^2.2.0"
Expand Down
Loading

0 comments on commit b9adee9

Please sign in to comment.