From 193b4b8646397e779e7e6d8bcce68de076afdb5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rge=20N=C3=A6ss?= Date: Tue, 12 Mar 2024 19:07:38 +0100 Subject: [PATCH] chore(deps): pin typescript to 5.3 (#5984) * chore: pin typescript to 5.3 * fix(types): add ts-expect-error to tests --- package.json | 2 +- .../types/src/schema/test/alias.test.ts | 3 + pnpm-lock.yaml | 174 ++++++++++++++++-- 3 files changed, 161 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index a5dc4536248..18d1fbdf9bd 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,7 @@ "sanity": "workspace:*", "semver": "^7.3.5", "turbo": "^1.12.4", - "typescript": "^5.4.2", + "typescript": "5.3.3", "yargs": "^17.3.0" }, "optionalDependencies": { diff --git a/packages/@sanity/types/src/schema/test/alias.test.ts b/packages/@sanity/types/src/schema/test/alias.test.ts index cbad34d4387..e9fb4953ddc 100644 --- a/packages/@sanity/types/src/schema/test/alias.test.ts +++ b/packages/@sanity/types/src/schema/test/alias.test.ts @@ -95,6 +95,7 @@ describe('alias type test', () => { }) it('should support alias with preview', () => { + //@ts-expect-error error is not in select keys defineType({ type: 'custom-object', name: 'redefined', @@ -105,6 +106,7 @@ describe('alias type test', () => { }, }) + //@ts-expect-error error is not in select keys defineField({ type: 'custom-object', name: 'redefined', @@ -115,6 +117,7 @@ describe('alias type test', () => { }, }) + //@ts-expect-error error is not in select keys defineArrayMember({ type: 'custom-object', name: 'redefined', diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e6aaac597f6..c0d15ef711c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -41,13 +41,13 @@ importers: version: 6.15.4 '@sanity/eslint-config-i18n': specifier: ^1.0.0 - version: 1.0.0(eslint@8.57.0)(typescript@5.4.2) + version: 1.0.0(eslint@8.57.0)(typescript@5.3.3) '@sanity/eslint-config-studio': specifier: ^3.0.1 - version: 3.0.1(eslint@8.57.0)(typescript@5.4.2) + version: 3.0.1(eslint@8.57.0)(typescript@5.3.3) '@sanity/pkg-utils': specifier: ^3.3.2 - version: 3.3.8(@types/node@18.19.8)(typescript@5.4.2) + version: 3.3.8(@types/node@18.19.8)(typescript@5.3.3) '@sanity/test': specifier: 0.0.1-alpha.1 version: 0.0.1-alpha.1 @@ -77,10 +77,10 @@ importers: version: 17.0.32 '@typescript-eslint/eslint-plugin': specifier: ^6.18.1 - version: 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.4.2) + version: 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.3.3) '@typescript-eslint/parser': specifier: ^6.19.0 - version: 6.19.0(eslint@8.57.0)(typescript@5.4.2) + version: 6.19.0(eslint@8.57.0)(typescript@5.3.3) cac: specifier: ^6.7.12 version: 6.7.14 @@ -196,8 +196,8 @@ importers: specifier: ^1.12.4 version: 1.12.4 typescript: - specifier: ^5.4.2 - version: 5.4.2 + specifier: 5.3.3 + version: 5.3.3 yargs: specifier: ^17.3.0 version: 17.7.2 @@ -5796,12 +5796,12 @@ packages: resolution: {integrity: sha512-dSZqGeYjHKGIkqAzGqLcG92LZyJGX+nYbs/FWawhBbTBDWi21kvQ0hsL3DJThuFVWtZMWTQijN3z6Cnd44Pf2g==} engines: {node: '>=14.18'} - /@sanity/eslint-config-i18n@1.0.0(eslint@8.57.0)(typescript@5.4.2): + /@sanity/eslint-config-i18n@1.0.0(eslint@8.57.0)(typescript@5.3.3): resolution: {integrity: sha512-BIeD9IVT7O5I6vDyDaICoidN02qeImdXDRAW062iHY9gV4JrGScWBFio2HQLso7C+Z6SrQB8jOft6SzeYqDhdQ==} dependencies: '@rushstack/eslint-patch': 1.7.0 '@sanity/eslint-plugin-i18n': 1.0.0 - '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.3.3) eslint-plugin-i18next: 6.0.3 transitivePeerDependencies: - eslint @@ -5809,6 +5809,26 @@ packages: - typescript dev: true + /@sanity/eslint-config-studio@3.0.1(eslint@8.57.0)(typescript@5.3.3): + resolution: {integrity: sha512-N7IFd/VZuL0UyJ2T5t5WWWf9DrhgY6lt0bnnScwwyX4ijA7WMFtxR5rgL2EDGdhI2eYyxOeleeBaK9QEXgiA1A==} + dependencies: + '@babel/core': 7.24.0 + '@babel/eslint-parser': 7.23.3(@babel/core@7.24.0)(eslint@8.57.0) + '@babel/preset-env': 7.24.0(@babel/core@7.24.0) + '@babel/preset-react': 7.23.3(@babel/core@7.24.0) + '@rushstack/eslint-patch': 1.7.0 + '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.3.3) + confusing-browser-globals: 1.0.11 + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.0) + eslint-plugin-react: 7.33.2(eslint@8.57.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.0) + transitivePeerDependencies: + - eslint + - supports-color + - typescript + dev: true + /@sanity/eslint-config-studio@3.0.1(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-N7IFd/VZuL0UyJ2T5t5WWWf9DrhgY6lt0bnnScwwyX4ijA7WMFtxR5rgL2EDGdhI2eYyxOeleeBaK9QEXgiA1A==} dependencies: @@ -5999,7 +6019,7 @@ packages: - '@types/node' - supports-color - /@sanity/pkg-utils@3.3.8(@types/node@18.19.8)(typescript@5.4.2): + /@sanity/pkg-utils@3.3.8(@types/node@18.19.8)(typescript@5.3.3): resolution: {integrity: sha512-PKQVdY6yvmLFzJzM3ukSHGpa044zIcBWxD2P4Rs/MPfKrxwxQfwewuCDXrLd6X9udqduiiUTYAr/gCZ3XEMjYQ==} engines: {node: '>=16.0.0'} hasBin: true @@ -6042,7 +6062,7 @@ packages: rollup-plugin-esbuild: 6.1.1(esbuild@0.19.12)(rollup@4.13.0) rxjs: 7.8.1 treeify: 1.1.0 - typescript: 5.4.2 + typescript: 5.3.3 uuid: 9.0.1 zod: 3.22.4 transitivePeerDependencies: @@ -6226,7 +6246,7 @@ packages: '@sanity/client': 6.15.4 '@sanity/color': 2.2.5 '@sanity/icons': 2.11.2(react@18.2.0) - '@sanity/pkg-utils': 3.3.8(@types/node@18.19.8)(typescript@5.4.2) + '@sanity/pkg-utils': 3.3.8(@types/node@18.19.8)(typescript@5.3.3) '@sanity/ui': 1.9.3(react-dom@18.2.0)(react-is@18.2.0)(react@18.2.0)(styled-components@5.3.11) '@types/cpx': 1.5.5 '@vitejs/plugin-react': 4.2.1(vite@4.5.2) @@ -7144,6 +7164,35 @@ packages: '@types/yargs-parser': 21.0.3 dev: true + /@typescript-eslint/eslint-plugin@6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.3.3): + resolution: {integrity: sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + '@typescript-eslint/parser': ^6.0.0 || ^6.0.0-alpha + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@eslint-community/regexpp': 4.10.0 + '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.19.0 + '@typescript-eslint/type-utils': 6.19.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.19.0(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.19.0 + debug: 4.3.4(supports-color@5.5.0) + eslint: 8.57.0 + graphemer: 1.4.0 + ignore: 5.3.1 + natural-compare: 1.4.0 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/eslint-plugin@6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-DUCUkQNklCQYnrBSSikjVChdc84/vMPDQSgJTHBZ64G9bA9w0Crc0rd2diujKbTdp6w2J47qkeHQLoi0rpLCdg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -7173,6 +7222,27 @@ packages: - supports-color dev: true + /@typescript-eslint/parser@6.19.0(eslint@8.57.0)(typescript@5.3.3): + resolution: {integrity: sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/scope-manager': 6.19.0 + '@typescript-eslint/types': 6.19.0 + '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3) + '@typescript-eslint/visitor-keys': 6.19.0 + debug: 4.3.4(supports-color@5.5.0) + eslint: 8.57.0 + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/parser@6.19.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-1DyBLG5SH7PYCd00QlroiW60YJ4rWMuUGa/JBV0iZuqi4l4IK3twKPq5ZkEebmGqRjXWVgsUzfd3+nZveewgow==} engines: {node: ^16.0.0 || >=18.0.0} @@ -7202,6 +7272,26 @@ packages: '@typescript-eslint/visitor-keys': 6.19.0 dev: true + /@typescript-eslint/type-utils@6.19.0(eslint@8.57.0)(typescript@5.3.3): + resolution: {integrity: sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3) + '@typescript-eslint/utils': 6.19.0(eslint@8.57.0)(typescript@5.3.3) + debug: 4.3.4(supports-color@5.5.0) + eslint: 8.57.0 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/type-utils@6.19.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-mcvS6WSWbjiSxKCwBcXtOM5pRkPQ6kcDds/juxcy/727IQr3xMEcwr/YLHW2A2+Fp5ql6khjbKBzOyjuPqGi/w==} engines: {node: ^16.0.0 || >=18.0.0} @@ -7227,6 +7317,28 @@ packages: engines: {node: ^16.0.0 || >=18.0.0} dev: true + /@typescript-eslint/typescript-estree@6.19.0(typescript@5.3.3): + resolution: {integrity: sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + '@typescript-eslint/types': 6.19.0 + '@typescript-eslint/visitor-keys': 6.19.0 + debug: 4.3.4(supports-color@5.5.0) + globby: 11.1.0 + is-glob: 4.0.3 + minimatch: 9.0.3 + semver: 7.5.4 + ts-api-utils: 1.0.3(typescript@5.3.3) + typescript: 5.3.3 + transitivePeerDependencies: + - supports-color + dev: true + /@typescript-eslint/typescript-estree@6.19.0(typescript@5.4.2): resolution: {integrity: sha512-o/zefXIbbLBZ8YJ51NlkSAt2BamrK6XOmuxSR3hynMIzzyMY33KuJ9vuMdFSXW+H0tVvdF9qBPTHA91HDb4BIQ==} engines: {node: ^16.0.0 || >=18.0.0} @@ -7249,6 +7361,25 @@ packages: - supports-color dev: true + /@typescript-eslint/utils@6.19.0(eslint@8.57.0)(typescript@5.3.3): + resolution: {integrity: sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==} + engines: {node: ^16.0.0 || >=18.0.0} + peerDependencies: + eslint: ^7.0.0 || ^8.0.0 + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) + '@types/json-schema': 7.0.15 + '@types/semver': 7.5.6 + '@typescript-eslint/scope-manager': 6.19.0 + '@typescript-eslint/types': 6.19.0 + '@typescript-eslint/typescript-estree': 6.19.0(typescript@5.3.3) + eslint: 8.57.0 + semver: 7.5.4 + transitivePeerDependencies: + - supports-color + - typescript + dev: true + /@typescript-eslint/utils@6.19.0(eslint@8.57.0)(typescript@5.4.2): resolution: {integrity: sha512-QR41YXySiuN++/dC9UArYOg4X86OAYP83OWTewpVx5ct1IZhjjgTLocj7QNxGhWoTqknsgpl7L+hGygCO+sdYw==} engines: {node: ^16.0.0 || >=18.0.0} @@ -9960,8 +10091,8 @@ packages: eslint-plugin-react: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.3.3) eslint: 8.57.0 eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.19.0)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0) eslint-plugin-react: 7.33.2(eslint@8.57.0) @@ -10021,7 +10152,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.3.3) debug: 3.2.7 eslint: 8.57.0 eslint-import-resolver-node: 0.3.9 @@ -10067,7 +10198,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/parser': 6.19.0(eslint@8.57.0)(typescript@5.3.3) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 @@ -10198,7 +10329,7 @@ packages: '@typescript-eslint/eslint-plugin': optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/eslint-plugin': 6.19.0(@typescript-eslint/parser@6.19.0)(eslint@8.57.0)(typescript@5.3.3) eslint: 8.57.0 eslint-rule-composer: 0.3.0 dev: true @@ -17683,6 +17814,15 @@ packages: resolution: {integrity: sha512-mzss4MeyzUkYBppn4x5cdAqrhBHFEuVmMMgLMTyFV23x6GvQMyo+/R5E5Lsbrt7WSt5RfvewjcwD1DChRTA9lA==} dev: false + /ts-api-utils@1.0.3(typescript@5.3.3): + resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} + engines: {node: '>=16.13.0'} + peerDependencies: + typescript: '>=4.2.0' + dependencies: + typescript: 5.3.3 + dev: true + /ts-api-utils@1.0.3(typescript@5.4.2): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'}