Skip to content

Commit d73e5a4

Browse files
authored
chore: bump dependencies (#131)
* chore: bump dependencies * chore: upgrade PostCSS and plugins * ci: bump Node version to current LTS
1 parent d322c24 commit d73e5a4

17 files changed

+2146
-2757
lines changed

.eslintrc

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
{
2-
"extends": [
3-
"plugin:@typescript-eslint/recommended",
4-
"prettier",
5-
"prettier/@typescript-eslint"
6-
],
7-
"root": true,
8-
"rules": {
9-
"@typescript-eslint/explicit-function-return-type": 0
10-
}
2+
"extends": ["plugin:@typescript-eslint/recommended", "prettier"],
3+
"root": true
114
}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
- uses: actions/checkout@v1
1010
- uses: actions/setup-node@v1
1111
with:
12-
node-version: 10.x
12+
node-version: 14.x
1313
- name: Install
1414
run: yarn install --frozen-lockfile
1515
- name: Lint

package.json

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
],
2727
"scripts": {
2828
"build": "rm -rf ./lib && tsc",
29-
"lint": "eslint './src/**/*.{js,ts}' --max-warnings 0 && yarn prettier './**/*.{json,md,js,ts,yml}' -c",
29+
"lint": "eslint --max-warnings 0 . && yarn prettier -c .",
3030
"prepublishOnly": "yarn build",
3131
"test": "jest ./src"
3232
},
@@ -42,6 +42,9 @@
4242
"src/**/*.{ts}"
4343
],
4444
"preset": "ts-jest",
45+
"setupFiles": [
46+
"<rootDir>/src/setup-tests.ts"
47+
],
4548
"testEnvironment": "node",
4649
"testPathIgnorePatterns": [
4750
"/node_modules/",
@@ -62,47 +65,47 @@
6265
"trailingComma": "all"
6366
},
6467
"resolutions": {
65-
"postcss": "7.0.27"
68+
"postcss": "8.3.0"
6669
},
6770
"dependencies": {
68-
"dotenv": "^8.2.0",
69-
"icss-utils": "^4.1.1",
70-
"less": "^3.11.1",
71+
"dotenv": "^10.0.0",
72+
"icss-utils": "^5.1.0",
73+
"less": "^4.1.1",
7174
"lodash.camelcase": "^4.3.0",
72-
"postcss": "^7.0.27",
75+
"postcss": "^8.3.0",
7376
"postcss-filter-plugins": "^3.0.1",
7477
"postcss-icss-keyframes": "^0.2.1",
7578
"postcss-icss-selectors": "^2.0.3",
76-
"postcss-load-config": "^2.1.0",
79+
"postcss-load-config": "^3.0.1",
7780
"reserved-words": "^0.1.2",
78-
"sass": "^1.26.5",
79-
"stylus": "^0.54.7",
81+
"sass": "^1.32.13",
82+
"stylus": "^0.54.8",
8083
"tsconfig-paths": "^3.9.0"
8184
},
8285
"devDependencies": {
8386
"@types/icss-utils": "^4.1.0",
84-
"@types/jest": "^25.2.1",
85-
"@types/less": "^3.0.1",
87+
"@types/jest": "^26.0.23",
88+
"@types/less": "^3.0.2",
8689
"@types/lodash.camelcase": "^4.3.6",
8790
"@types/node": "^12.12.17",
88-
"@types/postcss-load-config": "^2.0.1",
89-
"@types/postcss-nested": "^4.1.0",
91+
"@types/postcss-load-config": "^3.0.1",
92+
"@types/postcss-nested": "^4.2.3",
9093
"@types/reserved-words": "^0.1.0",
9194
"@types/sass": "^1.16.0",
92-
"@types/stylus": "^0.48.33",
93-
"@typescript-eslint/eslint-plugin": "^2.29.0",
94-
"@typescript-eslint/parser": "^2.29.0",
95-
"bootstrap": "4.4.1",
96-
"eslint": "^6.8.0",
97-
"eslint-config-prettier": "^6.11.0",
95+
"@types/stylus": "^0.48.34",
96+
"@typescript-eslint/eslint-plugin": "^4.25.0",
97+
"@typescript-eslint/parser": "^4.25.0",
98+
"bootstrap": "5.0.1",
99+
"eslint": "^7.27.0",
100+
"eslint-config-prettier": "^8.3.0",
98101
"husky": "^4.2.5",
99-
"jest": "^25.4.0",
100-
"lint-staged": "^10.1.7",
102+
"jest": "^27.0.2",
103+
"lint-staged": "^11.0.0",
101104
"postcss-import-sync2": "^1.1.0",
102-
"prettier": "^2.0.5",
105+
"prettier": "^2.3.0",
103106
"sass-svg": "1.2.0",
104-
"ts-jest": "^25.4.0",
105-
"typescript": "^3.8.3"
107+
"ts-jest": "^27.0.1",
108+
"typescript": "^4.3.2"
106109
},
107110
"peerDependencies": {
108111
"typescript": ">=3.0.0"

src/@types/postcss-filter-plugins.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ declare module 'postcss-filter-plugins' {
55
exclude?: string[];
66
silent?: boolean;
77
}
8-
const filter: (options?: Options) => Plugin<unknown>;
8+
const filter: (options?: Options) => Plugin;
99
export = filter;
1010
}

src/@types/postcss-icss-keyframes.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
declare module 'postcss-icss-keyframes' {
2-
import { Plugin } from 'postcss';
3-
const plugin: Plugin<{
2+
import { PluginCreator } from 'postcss';
3+
const plugin: PluginCreator<{
44
generateScopeName: (
55
keyframesName: string,
66
filepath: string,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare module 'postcss-icss-selectors' {
2-
import { Plugin } from 'postcss';
3-
const plugin: Plugin<{ mode: 'local' | 'global' }>;
2+
import { PluginCreator } from 'postcss';
3+
const plugin: PluginCreator<{ mode: 'local' | 'global' }>;
44
export = plugin;
55
}

src/@types/postcss-import-sync2.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
declare module 'postcss-import-sync2' {
2-
import { Plugin } from 'postcss';
3-
const plugin: Plugin<{}>;
2+
import { PluginCreator } from 'postcss';
3+
const plugin: PluginCreator<unknown>;
44
export = plugin;
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
.public-module {
2-
color: green;
2+
color: green;
33
}

src/helpers/classTransforms.ts

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,44 @@ import { ClassnameTransformOptions } from '../options';
44
// The below is based on the CSS Modules implementation found here:
55
// https://github.com/webpack-contrib/css-loader/blob/master/lib/compile-exports.js
66

7-
const dashCase = (className: string) =>
8-
className.replace(/-+(\w)/g, (match, firstLetter) =>
7+
const dashCase = (className: string): string =>
8+
className.replace(/-+(\w)/g, (_match, firstLetter) =>
99
firstLetter.toUpperCase(),
1010
);
1111

12-
export const transformClasses = (
13-
camelCaseOption?: ClassnameTransformOptions,
14-
) => (className: string) => {
15-
const entries: string[] = [];
12+
export const transformClasses =
13+
(camelCaseOption?: ClassnameTransformOptions) =>
14+
(className: string): string[] => {
15+
const entries: string[] = [];
1616

17-
switch (camelCaseOption) {
18-
case 'camelCase': {
19-
entries.push(className);
20-
const targetClassName = camelCase(className);
21-
if (targetClassName !== className) {
22-
entries.push(targetClassName);
17+
switch (camelCaseOption) {
18+
case 'camelCase': {
19+
entries.push(className);
20+
const targetClassName = camelCase(className);
21+
if (targetClassName !== className) {
22+
entries.push(targetClassName);
23+
}
24+
break;
2325
}
24-
break;
25-
}
26-
case 'camelCaseOnly':
27-
entries.push(camelCase(className));
28-
break;
29-
case 'dashes': {
30-
entries.push(className);
31-
const targetClassName = dashCase(className);
32-
if (targetClassName !== className) {
33-
entries.push(targetClassName);
26+
case 'camelCaseOnly':
27+
entries.push(camelCase(className));
28+
break;
29+
case 'dashes': {
30+
entries.push(className);
31+
const targetClassName = dashCase(className);
32+
if (targetClassName !== className) {
33+
entries.push(targetClassName);
34+
}
35+
break;
3436
}
35-
break;
37+
case 'dashesOnly':
38+
entries.push(dashCase(className));
39+
break;
40+
case 'asIs':
41+
default:
42+
entries.push(className);
43+
break;
3644
}
37-
case 'dashesOnly':
38-
entries.push(dashCase(className));
39-
break;
40-
case 'asIs':
41-
default:
42-
entries.push(className);
43-
break;
44-
}
4545

46-
return entries;
47-
};
46+
return entries;
47+
};

src/helpers/createExports.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export const createExports = ({
2525
fileName: string;
2626
logger: Logger;
2727
options: Options;
28-
}) => {
28+
}): string => {
2929
const isCamelCase = (className: string) =>
3030
!NOT_CAMELCASE_REGEXP.test(className);
3131
const isReservedWord = (className: string) => !reserved.check(className);

0 commit comments

Comments
 (0)