File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,9 @@ export async function readBaseline(baselineFilepath: string): Promise<object> {
42
42
return JSON . parse ( file ) ;
43
43
}
44
44
45
- export async function writeBaseline ( data : JSON , baselineFilepath : string ) : Promise < void > {
45
+ export async function writeBaseline (
46
+ baselineFilepath : string ,
47
+ data : Record < string , unknown > ,
48
+ ) : Promise < void > {
46
49
return fs . writeFile ( baselineFilepath , JSON . stringify ( data ) ) ;
47
50
}
Original file line number Diff line number Diff line change @@ -64,13 +64,6 @@ export default async function run(options: RunOptions): Promise<void> {
64
64
// Generate relative path relative to process.cwd()
65
65
const baselinePath = getBaselineRelativePath ( process . cwd ( ) , '' , baselineAbsolutePath ) ;
66
66
67
- console . log ( {
68
- dirname : __dirname ,
69
- cwd : process . cwd ( ) ,
70
- baselineAbsolutePath,
71
- baselinePath,
72
- } ) ;
73
-
74
67
const tasks = new Listr ( [
75
68
{
76
69
title : 'Read Webpack stats files' ,
@@ -125,9 +118,9 @@ export default async function run(options: RunOptions): Promise<void> {
125
118
title : 'Write baseline data' ,
126
119
task : ( ctx , task ) => {
127
120
const stats = get ( ctx , 'sources[0]webpack' ) ;
128
- const filteredWebpackStats = webpackFilter ( stats ) as JSON ;
121
+ const filteredWebpackStats = webpackFilter ( stats ) as Record < string , unknown > ;
129
122
130
- return writeBaseline ( filteredWebpackStats , baselineAbsolutePath ) . then ( ( ) => {
123
+ return writeBaseline ( baselineAbsolutePath , filteredWebpackStats ) . then ( ( ) => {
131
124
// eslint-disable-next-line no-param-reassign
132
125
task . title = `${ task . title } (${ baselinePath } )` ;
133
126
} ) ;
You can’t perform that action at this time.
0 commit comments