diff --git a/packages/@sanity/cli/package.json b/packages/@sanity/cli/package.json index 20413ee6571..8112ae33e91 100644 --- a/packages/@sanity/cli/package.json +++ b/packages/@sanity/cli/package.json @@ -72,7 +72,6 @@ "pkg-dir": "^5.0.0", "prettier": "^3.3.0", "semver": "^7.3.5", - "silver-fleece": "1.1.0", "validate-npm-package-name": "^3.0.0" }, "devDependencies": { diff --git a/packages/@sanity/cli/src/actions/init-project/initProject.ts b/packages/@sanity/cli/src/actions/init-project/initProject.ts index 4a5324c882f..37dad51c57f 100644 --- a/packages/@sanity/cli/src/actions/init-project/initProject.ts +++ b/packages/@sanity/cli/src/actions/init-project/initProject.ts @@ -1,4 +1,4 @@ -import {existsSync, readFileSync} from 'node:fs' +import {existsSync} from 'node:fs' import fs from 'node:fs/promises' import path from 'node:path' @@ -11,7 +11,6 @@ import {deburr, noop} from 'lodash' import pFilter from 'p-filter' import resolveFrom from 'resolve-from' import semver from 'semver' -import {evaluate, patch} from 'silver-fleece' import {CLIInitStepCompleted} from '../../__telemetry__/init.telemetry' import {type InitFlags} from '../../commands/init/initCommand' @@ -434,21 +433,6 @@ export default async function initSanity( await writeSourceFiles(sanityFolder(useTypeScript, templateToUse), undefined, hasSrcFolder) - // set tsconfig.json target to ES2017 - const tsConfigPath = path.join(workDir, 'tsconfig.json') - - if (useTypeScript && existsSync(tsConfigPath)) { - const tsConfigFile = readFileSync(tsConfigPath, 'utf8') - const config = evaluate(tsConfigFile) - - if (config.compilerOptions.target?.toLowerCase() !== 'es2017') { - config.compilerOptions.target = 'ES2017' - - const newConfig = patch(tsConfigFile, config) - await fs.writeFile(tsConfigPath, Buffer.from(newConfig)) - } - } - const appendEnv = unattended ? true : await promptForAppendEnv(prompt, envFilename) if (appendEnv) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 49e9ac33788..2dbd857beff 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -848,9 +848,6 @@ importers: semver: specifier: ^7.3.5 version: 7.6.3 - silver-fleece: - specifier: 1.1.0 - version: 1.1.0 validate-npm-package-name: specifier: ^3.0.0 version: 3.0.0 @@ -10979,9 +10976,6 @@ packages: resolution: {integrity: sha512-8G+/XDU8wNsJOQS5ysDVO0Etg9/2uA5gR9l4ZwijjlwxBcrU6RPfwi2+jJmbP+Ap1Hlp/nVAaEO4Fj22/SL2gQ==} engines: {node: ^16.14.0 || >=18.0.0} - silver-fleece@1.1.0: - resolution: {integrity: sha512-V3vShUiLRVPMu9aSWpU5kLDoU/HO7muJKE236EO663po3YxivAkMLbRg+amV/FhbIfF5bWXX5TVX+VYmRaOBFA==} - simple-swizzle@0.2.2: resolution: {integrity: sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==} @@ -23084,8 +23078,6 @@ snapshots: transitivePeerDependencies: - supports-color - silver-fleece@1.1.0: {} - simple-swizzle@0.2.2: dependencies: is-arrayish: 0.3.2