File tree 14 files changed +29
-29
lines changed
14 files changed +29
-29
lines changed Original file line number Diff line number Diff line change 6
6
},
7
7
"description" : " Inquirer checkbox prompt" ,
8
8
"main" : " ./dist/cjs/index.js" ,
9
- "typings" : " ./dist/cjs/types/index.d.cts " ,
9
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
10
10
"files" : [
11
11
" dist/**/*"
12
12
],
83
83
"default" : " ./dist/esm/index.mjs"
84
84
},
85
85
"require" : {
86
- "types" : " ./dist/cjs/types/index.d.cts " ,
86
+ "types" : " ./dist/cjs/types/index.d.ts " ,
87
87
"default" : " ./dist/cjs/index.js"
88
88
}
89
89
}
Original file line number Diff line number Diff line change 3
3
"version" : " 2.0.4" ,
4
4
"description" : " Inquirer confirm prompt" ,
5
5
"main" : " ./dist/cjs/index.js" ,
6
- "typings" : " ./dist/cjs/types/index.d.cts " ,
6
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
7
7
"files" : [
8
8
" dist/**/*"
9
9
],
81
81
"default" : " ./dist/esm/index.mjs"
82
82
},
83
83
"require" : {
84
- "types" : " ./dist/cjs/types/index.d.cts " ,
84
+ "types" : " ./dist/cjs/types/index.d.ts " ,
85
85
"default" : " ./dist/cjs/index.js"
86
86
}
87
87
}
Original file line number Diff line number Diff line change 6
6
},
7
7
"description" : " Core Inquirer prompt API" ,
8
8
"main" : " ./dist/cjs/index.js" ,
9
- "typings" : " ./dist/cjs/types/index.d.cts " ,
9
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
10
10
"files" : [
11
11
" dist/**/*"
12
12
],
92
92
"default" : " ./dist/esm/index.mjs"
93
93
},
94
94
"require" : {
95
- "types" : " ./dist/cjs/types/index.d.cts " ,
95
+ "types" : " ./dist/cjs/types/index.d.ts " ,
96
96
"default" : " ./dist/cjs/index.js"
97
97
}
98
98
}
Original file line number Diff line number Diff line change 3
3
"version" : " 1.2.2" ,
4
4
"description" : " Inquirer multiline editor prompt" ,
5
5
"main" : " ./dist/cjs/index.js" ,
6
- "typings" : " ./dist/cjs/types/index.d.cts " ,
6
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
7
7
"files" : [
8
8
" dist/**/*"
9
9
],
79
79
"default" : " ./dist/esm/index.mjs"
80
80
},
81
81
"require" : {
82
- "types" : " ./dist/cjs/types/index.d.cts " ,
82
+ "types" : " ./dist/cjs/types/index.d.ts " ,
83
83
"default" : " ./dist/cjs/index.js"
84
84
}
85
85
}
Original file line number Diff line number Diff line change 3
3
"version" : " 1.1.3" ,
4
4
"description" : " Inquirer checkbox prompt" ,
5
5
"main" : " ./dist/cjs/index.js" ,
6
- "typings" : " ./dist/cjs/types/index.d.cts " ,
6
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
7
7
"files" : [
8
8
" dist/**/*"
9
9
],
79
79
"default" : " ./dist/esm/index.mjs"
80
80
},
81
81
"require" : {
82
- "types" : " ./dist/cjs/types/index.d.cts " ,
82
+ "types" : " ./dist/cjs/types/index.d.ts " ,
83
83
"default" : " ./dist/cjs/index.js"
84
84
}
85
85
}
Original file line number Diff line number Diff line change 3
3
"version" : " 1.2.3" ,
4
4
"description" : " Inquirer input text prompt" ,
5
5
"main" : " ./dist/cjs/index.js" ,
6
- "typings" : " ./dist/cjs/types/index.d.cts " ,
6
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
7
7
"files" : [
8
8
" dist/**/*"
9
9
],
81
81
"default" : " ./dist/esm/index.mjs"
82
82
},
83
83
"require" : {
84
- "types" : " ./dist/cjs/types/index.d.cts " ,
84
+ "types" : " ./dist/cjs/types/index.d.ts " ,
85
85
"default" : " ./dist/cjs/index.js"
86
86
}
87
87
}
Original file line number Diff line number Diff line change 6
6
},
7
7
"description" : " Inquirer password prompt" ,
8
8
"main" : " ./dist/cjs/index.js" ,
9
- "typings" : " ./dist/cjs/types/index.d.cts " ,
9
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
10
10
"files" : [
11
11
" dist/**/*"
12
12
],
78
78
"default" : " ./dist/esm/index.mjs"
79
79
},
80
80
"require" : {
81
- "types" : " ./dist/cjs/types/index.d.cts " ,
81
+ "types" : " ./dist/cjs/types/index.d.ts " ,
82
82
"default" : " ./dist/cjs/index.js"
83
83
}
84
84
}
Original file line number Diff line number Diff line change 3
3
"version" : " 2.3.0" ,
4
4
"description" : " Inquirer prompts, combined in a single package" ,
5
5
"main" : " ./dist/cjs/index.js" ,
6
- "typings" : " ./dist/cjs/types/index.d.cts " ,
6
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
7
7
"files" : [
8
8
" dist/**/*"
9
9
],
71
71
"default" : " ./dist/esm/index.mjs"
72
72
},
73
73
"require" : {
74
- "types" : " ./dist/cjs/types/index.d.cts " ,
74
+ "types" : " ./dist/cjs/types/index.d.ts " ,
75
75
"default" : " ./dist/cjs/index.js"
76
76
}
77
77
}
Original file line number Diff line number Diff line change 3
3
"version" : " 1.2.3" ,
4
4
"description" : " Inquirer rawlist prompt" ,
5
5
"main" : " ./dist/cjs/index.js" ,
6
- "typings" : " ./dist/cjs/types/index.d.cts " ,
6
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
7
7
"files" : [
8
8
" dist/**/*"
9
9
],
78
78
"default" : " ./dist/esm/index.mjs"
79
79
},
80
80
"require" : {
81
- "types" : " ./dist/cjs/types/index.d.cts " ,
81
+ "types" : " ./dist/cjs/types/index.d.ts " ,
82
82
"default" : " ./dist/cjs/index.js"
83
83
}
84
84
}
Original file line number Diff line number Diff line change 3
3
"version" : " 1.2.3" ,
4
4
"description" : " Inquirer select/list prompt" ,
5
5
"main" : " ./dist/cjs/index.js" ,
6
- "typings" : " ./dist/cjs/types/index.d.cts " ,
6
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
7
7
"files" : [
8
8
" dist/**/*"
9
9
],
83
83
"default" : " ./dist/esm/index.mjs"
84
84
},
85
85
"require" : {
86
- "types" : " ./dist/cjs/types/index.d.cts " ,
86
+ "types" : " ./dist/cjs/types/index.d.ts " ,
87
87
"default" : " ./dist/cjs/index.js"
88
88
}
89
89
}
Original file line number Diff line number Diff line change 6
6
},
7
7
"description" : " Inquirer testing utilities" ,
8
8
"main" : " ./dist/cjs/index.js" ,
9
- "typings" : " ./dist/cjs/types/index.d.cts " ,
9
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
10
10
"files" : [
11
11
" dist/**/*"
12
12
],
81
81
"default" : " ./dist/esm/index.mjs"
82
82
},
83
83
"require" : {
84
- "types" : " ./dist/cjs/types/index.d.cts " ,
84
+ "types" : " ./dist/cjs/types/index.d.ts " ,
85
85
"default" : " ./dist/cjs/index.js"
86
86
}
87
87
}
Original file line number Diff line number Diff line change 3
3
"version" : " 1.1.0" ,
4
4
"description" : " Inquirer core TS types" ,
5
5
"main" : " ./dist/cjs/index.js" ,
6
- "typings" : " ./dist/cjs/types/index.d.cts " ,
6
+ "typings" : " ./dist/cjs/types/index.d.ts " ,
7
7
"files" : [
8
8
" dist/**/*"
9
9
],
71
71
"default" : " ./dist/esm/index.mjs"
72
72
},
73
73
"require" : {
74
- "types" : " ./dist/cjs/types/index.d.cts " ,
74
+ "types" : " ./dist/cjs/types/index.d.ts " ,
75
75
"default" : " ./dist/cjs/index.js"
76
76
}
77
77
}
Original file line number Diff line number Diff line change @@ -24,22 +24,22 @@ mjsFiles.forEach(async (pathname: string) => {
24
24
await fs . rename ( pathname , newPath ) ;
25
25
} ) ;
26
26
27
- // Similarly, we rename the .d.mts files to .d.cts . This is because Typescript `node16` target will
27
+ // Similarly, we rename the .d.mts files to .d.ts . This is because Typescript `node16` target will
28
28
// masquerade as ESM otherwise.
29
29
const dmtsFiles : string [ ] = await globby ( [ 'dist/cjs/**/*.d.mts' , '!**/node_modules' ] ) ;
30
30
dmtsFiles . forEach ( async ( pathname : string ) => {
31
- // 1. Rename imports
31
+ // 1. Rename imports from `.mjs` to `.js`
32
32
const fileContent = await fs . readFile ( pathname , 'utf-8' ) ;
33
33
await fs . writeFile (
34
34
pathname ,
35
- fileContent . replace ( / f r o m ' ( [ ^ ' ] * ) \. m j s ' / g, "from '$1.d.cts '" ) ,
35
+ fileContent . replace ( / f r o m ' ( [ ^ ' ] * ) \. m j s ' / g, "from '$1.js '" ) ,
36
36
) ;
37
37
38
38
// 2. Rename files
39
39
const newPath = path . format ( {
40
40
...path . parse ( pathname ) ,
41
41
base : '' ,
42
- ext : '.cts ' ,
42
+ ext : '.ts ' ,
43
43
} ) ;
44
44
45
45
console . log ( `Renaming ${ pathname } to ${ newPath } ...` ) ;
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ paths.forEach(async (pkgPath) => {
56
56
default : './dist/esm/index.mjs' ,
57
57
} ,
58
58
require : {
59
- types : './dist/cjs/types/index.d.cts ' ,
59
+ types : './dist/cjs/types/index.d.ts ' ,
60
60
default : './dist/cjs/index.js' ,
61
61
} ,
62
62
} ,
You can’t perform that action at this time.
0 commit comments