Unverified Commit 337a40c6 authored by Benjamin Woodruff's avatar Benjamin Woodruff Committed by GitHub

[ci] Pin typescript version in tests (#95619)

Typescript 7 came out, which is breaking a lot of our e2e tests.
parent b7f84ed7
...@@ -13,7 +13,6 @@ describe('Error overlay - RSC build errors', () => { ...@@ -13,7 +13,6 @@ describe('Error overlay - RSC build errors', () => {
'react-tweet': '^3.2.0', 'react-tweet': '^3.2.0',
'@mdx-js/react': '^2.3.0', '@mdx-js/react': '^2.3.0',
tailwindcss: '^3.2.6', tailwindcss: '^3.2.6',
typescript: 'latest',
'@types/react': '^18.0.28', '@types/react': '^18.0.28',
'@types/react-dom': '^18.0.10', '@types/react-dom': '^18.0.10',
'image-size': '^1.0.2', 'image-size': '^1.0.2',
......
...@@ -7,9 +7,7 @@ describe('useDefineForClassFields SWC option', () => { ...@@ -7,9 +7,7 @@ describe('useDefineForClassFields SWC option', () => {
files: join(__dirname, 'fixture'), files: join(__dirname, 'fixture'),
dependencies: { dependencies: {
mobx: '6.3.7', mobx: '6.3.7',
typescript: 'latest',
'@types/react': 'latest', '@types/react': 'latest',
'@types/node': 'latest',
'mobx-react': '7.2.1', 'mobx-react': '7.2.1',
}, },
}) })
......
...@@ -8,9 +8,7 @@ describe('correct tsconfig.json defaults', () => { ...@@ -8,9 +8,7 @@ describe('correct tsconfig.json defaults', () => {
}, },
skipStart: true, skipStart: true,
dependencies: { dependencies: {
typescript: 'latest',
'@types/react': 'latest', '@types/react': 'latest',
'@types/node': 'latest',
}, },
}) })
......
...@@ -32,9 +32,7 @@ describe('jsconfig-path-reloading', () => { ...@@ -32,9 +32,7 @@ describe('jsconfig-path-reloading', () => {
}), }),
}, },
dependencies: { dependencies: {
typescript: 'latest',
'@types/react': 'latest', '@types/react': 'latest',
'@types/node': 'latest',
}, },
}) })
......
...@@ -26,7 +26,7 @@ describe('tsconfig-path-reloading', () => { ...@@ -26,7 +26,7 @@ describe('tsconfig-path-reloading', () => {
addAfterStart?: boolean addAfterStart?: boolean
testBaseUrl: boolean testBaseUrl: boolean
}) { }) {
const typescriptVersion = testBaseUrl ? '5.9.3' : 'latest' const typescriptVersion = testBaseUrl ? '5.9.3' : '6.0.3'
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: { files: {
......
...@@ -62,9 +62,7 @@ describe('typescript-app-type-declarations', () => { ...@@ -62,9 +62,7 @@ describe('typescript-app-type-declarations', () => {
'next-env.d.ts': nextEnvDts, 'next-env.d.ts': nextEnvDts,
}, },
dependencies: { dependencies: {
typescript: 'latest',
'@types/react': 'latest', '@types/react': 'latest',
'@types/node': 'latest',
}, },
}) })
......
...@@ -4,9 +4,7 @@ describe('navigation between pages and app dir', () => { ...@@ -4,9 +4,7 @@ describe('navigation between pages and app dir', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: new FileRef(__dirname), files: new FileRef(__dirname),
dependencies: { dependencies: {
typescript: 'latest',
'@types/react': 'latest', '@types/react': 'latest',
'@types/node': 'latest',
}, },
}) })
......
...@@ -4,9 +4,7 @@ describe('redirects and rewrites', () => { ...@@ -4,9 +4,7 @@ describe('redirects and rewrites', () => {
const { next } = nextTestSetup({ const { next } = nextTestSetup({
files: __dirname, files: __dirname,
dependencies: { dependencies: {
typescript: 'latest',
'@types/react': 'latest', '@types/react': 'latest',
'@types/node': 'latest',
}, },
}) })
......
...@@ -259,8 +259,8 @@ export class NextInstance { ...@@ -259,8 +259,8 @@ export class NextInstance {
'react-dom': reactVersion, 'react-dom': reactVersion,
'@types/react': '19.2.2', '@types/react': '19.2.2',
'@types/react-dom': '19.2.1', '@types/react-dom': '19.2.1',
typescript: 'latest', typescript: '6.0.3',
'@types/node': 'latest', '@types/node': '26.1.0',
...this.dependencies, ...this.dependencies,
...this.packageJson?.dependencies, ...this.packageJson?.dependencies,
} }
......
...@@ -11,9 +11,7 @@ describe('Does not override tsconfig moduleResolution field during build', () => ...@@ -11,9 +11,7 @@ describe('Does not override tsconfig moduleResolution field during build', () =>
pkg: new FileRef(join(__dirname, 'pkg')), pkg: new FileRef(join(__dirname, 'pkg')),
}, },
dependencies: { dependencies: {
typescript: 'latest',
'@types/react': 'latest', '@types/react': 'latest',
'@types/node': 'latest',
pkg: './pkg', pkg: './pkg',
}, },
}) })
......
...@@ -7,8 +7,6 @@ describe('TypeScript basic', () => { ...@@ -7,8 +7,6 @@ describe('TypeScript basic', () => {
files: new FileRef(path.join(__dirname, 'app')), files: new FileRef(path.join(__dirname, 'app')),
dependencies: { dependencies: {
'@next/bundle-analyzer': 'canary', '@next/bundle-analyzer': 'canary',
typescript: 'latest',
'@types/node': 'latest',
'@types/react': 'latest', '@types/react': 'latest',
'@types/react-dom': 'latest', '@types/react-dom': 'latest',
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment