Skip to content

Commit 50a0973

Browse files
committed
chore(deps): upgrade dependencies 31.03.2021
1 parent 0a39ca2 commit 50a0973

File tree

6 files changed

+1218
-853
lines changed

6 files changed

+1218
-853
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ yarn start
2525

2626
## Requirements
2727

28-
- node `>=8.0.0`
29-
- `process.platform !== 'win32'`
28+
- node `>=10.12.0`
3029

3130
## Documentation
3231

package.json

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -28,61 +28,61 @@
2828
"repository": "https://github.com/liangchunn/typescript-node-scripts",
2929
"license": "MIT",
3030
"dependencies": {
31-
"@babel/code-frame": "7.10.4",
32-
"@babel/core": "7.12.10",
33-
"@babel/preset-env": "7.12.11",
34-
"@typescript-eslint/eslint-plugin": "4.10.0",
35-
"@typescript-eslint/parser": "4.10.0",
31+
"@babel/code-frame": "7.12.13",
32+
"@babel/core": "7.13.14",
33+
"@babel/preset-env": "7.13.12",
34+
"@typescript-eslint/eslint-plugin": "4.20.0",
35+
"@typescript-eslint/parser": "4.20.0",
3636
"babel-core": "7.0.0-bridge.0",
3737
"babel-eslint": "10.1.0",
3838
"babel-jest": "26.6.3",
3939
"babel-loader": "8.2.2",
40-
"case-sensitive-paths-webpack-plugin": "2.3.0",
40+
"case-sensitive-paths-webpack-plugin": "2.4.0",
4141
"chalk": "4.1.0",
4242
"clean-webpack-plugin": "3.0.0",
43-
"eslint": "7.15.0",
43+
"eslint": "7.23.0",
4444
"eslint-plugin-import": "2.22.1",
45-
"eslint-webpack-plugin": "2.4.1",
45+
"eslint-webpack-plugin": "2.5.3",
4646
"filesize": "6.1.0",
47-
"fork-ts-checker-webpack-plugin": "6.0.7",
48-
"fs-extra": "9.0.1",
47+
"fork-ts-checker-webpack-plugin": "6.2.0",
48+
"fs-extra": "9.1.0",
4949
"jest": "26.6.3",
5050
"pstree.remy": "1.1.8",
5151
"strip-ansi": "6.0.0",
5252
"text-table": "0.2.0",
53-
"ts-jest": "26.4.4",
54-
"ts-loader": "8.0.12",
55-
"tsconfig-paths-webpack-plugin": "3.3.0",
56-
"tslib": "^2.0.3",
57-
"webpack": "5.11.0",
58-
"webpack-merge": "5.4.0",
53+
"ts-jest": "26.5.4",
54+
"ts-loader": "8.1.0",
55+
"tsconfig-paths-webpack-plugin": "3.5.1",
56+
"tslib": "^2.1.0",
57+
"webpack": "5.28.0",
58+
"webpack-merge": "5.7.3",
5959
"webpack-node-externals": "2.5.2"
6060
},
6161
"devDependencies": {
6262
"@commitlint/cli": "^11.0.0",
6363
"@commitlint/config-conventional": "^11.0.0",
6464
"@types/babel-code-frame": "^6.20.4",
65-
"@types/case-sensitive-paths-webpack-plugin": "^2.1.4",
66-
"@types/eslint": "^7.2.5",
67-
"@types/fs-extra": "^9.0.4",
68-
"@types/jest": "^26.0.15",
65+
"@types/case-sensitive-paths-webpack-plugin": "^2.1.5",
66+
"@types/eslint": "^7.2.8",
67+
"@types/fs-extra": "^9.0.9",
68+
"@types/jest": "^26.0.22",
6969
"@types/node": "^14.14.9",
7070
"@types/text-table": "^0.2.1",
71-
"@types/webpack-merge": "^4.1.5",
72-
"@types/webpack-node-externals": "^2.5.0",
71+
"@types/webpack-merge": "^5.0.0",
72+
"@types/webpack-node-externals": "^2.5.1",
7373
"commitizen": "^4.2.2",
7474
"conventional-changelog-cli": "^2.1.1",
7575
"cz-conventional-changelog": "^3.3.0",
76-
"eslint-config-prettier": "^7.0.0",
77-
"eslint-plugin-prettier": "^3.1.4",
76+
"eslint-config-prettier": "^8.1.0",
77+
"eslint-plugin-prettier": "^3.3.1",
7878
"husky": "^5.0.1",
7979
"lint-staged": "^10.5.1",
8080
"pinst": "^2.1.1",
81-
"prettier": "^2.1.2",
82-
"typescript": "4.1.2"
81+
"prettier": "^2.2.1",
82+
"typescript": "4.2.3"
8383
},
8484
"peerDependencies": {
85-
"typescript": ">=3.3.1 <4.2.0"
85+
"typescript": ">=3.3.1 <4.3.0"
8686
},
8787
"engines": {
8888
"node": ">=10.12.0"

src/lib/createWebpackConfig.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const createWebpackConfig = (
4040
new TsconfigPathsPlugin({
4141
configFile: paths.appTsConfig,
4242
silent: true,
43-
}),
43+
}) as any,
4444
],
4545
},
4646
module: {

src/lib/formatWebpackMessages.ts

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
import chalk from 'chalk'
2+
import { StatsCompilation } from 'webpack'
23

34
const friendlySyntaxErrorLabel = 'Syntax error:'
45

6+
type D = Exclude<StatsCompilation['errors'], undefined>
7+
type ArrayType<T> = T extends Array<infer U> ? U : never
8+
// Not exported by webpack
9+
type StatsError = ArrayType<D>
10+
511
/**
612
* Formats webpack messages into a nicer looking, human friendly format.
713
* Heavily adopted from:
@@ -10,7 +16,7 @@ const friendlySyntaxErrorLabel = 'Syntax error:'
1016
* TODO: fix typing of any, could be error from webpack or loader, so we might want to format it differently
1117
* @param message
1218
*/
13-
function formatMessage(rawMessage: any): string {
19+
function formatMessage(rawMessage: StatsError): string {
1420
const fileName = rawMessage.moduleId || rawMessage.file
1521
let message = fileName
1622
? `${fileName}\n${rawMessage.message}`
@@ -88,20 +94,19 @@ function formatMessage(rawMessage: any): string {
8894
}
8995

9096
export function formatWebpackMessages(
91-
json: {
92-
errors: string[]
93-
warnings: string[]
94-
} // Webpack's stat output is typed as any
97+
json: StatsCompilation
9598
): {
9699
errors: string[]
97100
warnings: string[]
98101
} {
99-
const errors = json.errors
100-
.map((message: string) => formatMessage(message))
101-
.filter((message) => message !== '')
102-
const warnings = json.warnings
103-
.map((message: string) => formatMessage(message))
104-
.filter((message) => message !== '')
102+
const errors =
103+
json.errors
104+
?.map((error) => formatMessage(error))
105+
.filter((message) => message !== '') ?? []
106+
const warnings =
107+
json.warnings
108+
?.map((warning) => formatMessage(warning))
109+
.filter((message) => message !== '') ?? []
105110

106111
return {
107112
errors,

src/scripts/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const createApp = (useYarn: boolean, appName?: string) => {
4242
const packageDevDependencies = [
4343
'@types/node',
4444
'@types/jest',
45-
'typescript@~4.1.2',
45+
'typescript@~4.2.3',
4646
'typescript-node-scripts',
4747
]
4848

0 commit comments

Comments
 (0)