1
- import { existsSync , readFileSync } from 'node:fs'
1
+ import { existsSync } from 'node:fs'
2
2
import fs from 'node:fs/promises'
3
3
import path from 'node:path'
4
4
@@ -11,7 +11,6 @@ import {deburr, noop} from 'lodash'
11
11
import pFilter from 'p-filter'
12
12
import resolveFrom from 'resolve-from'
13
13
import semver from 'semver'
14
- import { evaluate , patch } from 'silver-fleece'
15
14
16
15
import { CLIInitStepCompleted } from '../../__telemetry__/init.telemetry'
17
16
import { type InitFlags } from '../../commands/init/initCommand'
@@ -434,21 +433,6 @@ export default async function initSanity(
434
433
435
434
await writeSourceFiles ( sanityFolder ( useTypeScript , templateToUse ) , undefined , hasSrcFolder )
436
435
437
- // set tsconfig.json target to ES2017
438
- const tsConfigPath = path . join ( workDir , 'tsconfig.json' )
439
-
440
- if ( useTypeScript && existsSync ( tsConfigPath ) ) {
441
- const tsConfigFile = readFileSync ( tsConfigPath , 'utf8' )
442
- const config = evaluate ( tsConfigFile )
443
-
444
- if ( config . compilerOptions . target ?. toLowerCase ( ) !== 'es2017' ) {
445
- config . compilerOptions . target = 'ES2017'
446
-
447
- const newConfig = patch ( tsConfigFile , config )
448
- await fs . writeFile ( tsConfigPath , Buffer . from ( newConfig ) )
449
- }
450
- }
451
-
452
436
const appendEnv = unattended ? true : await promptForAppendEnv ( prompt , envFilename )
453
437
454
438
if ( appendEnv ) {
0 commit comments