File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
projects/npm-tools/packages/npm-scripts/src Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: BSD-3-Clause
44 */
55
6- const fs = require ( 'fs' ) ;
76const path = require ( 'path' ) ;
87
98const getTypeScriptBuildOrder = require ( '../typescript/getTypeScriptBuildOrder' ) ;
@@ -42,18 +41,6 @@ async function types() {
4241 try {
4342 process . chdir ( directory ) ;
4443
45- const buildInfoPath = path . join (
46- process . cwd ( ) ,
47- 'tmp' ,
48- 'tsconfig.tsbuildinfo'
49- ) ;
50-
51- // Remove previous type information to ensure a consistent build
52-
53- if ( fs . existsSync ( buildInfoPath ) ) {
54- fs . unlinkSync ( buildInfoPath ) ;
55- }
56-
5744 const config = getMergedConfig ( 'npmscripts' ) ;
5845
5946 const { build : BUILD_CONFIG } = config ;
Original file line number Diff line number Diff line change @@ -33,6 +33,18 @@ async function runTSC() {
3333
3434 const config = configureTypeScript ( graph ) ;
3535
36+ const buildInfoPath = path . join (
37+ process . cwd ( ) ,
38+ 'tmp' ,
39+ 'tsconfig.tsbuildinfo'
40+ ) ;
41+
42+ // Remove previous type information to ensure a consistent build
43+
44+ if ( fs . existsSync ( buildInfoPath ) ) {
45+ fs . unlinkSync ( buildInfoPath ) ;
46+ }
47+
3648 spawnSync ( 'tsc' , [ '--emitDeclarationOnly' ] ) ;
3749
3850 // Format the generated files, because: https://git.io/JYNZp
You can’t perform that action at this time.
0 commit comments