Unverified Commit a5811a77 authored by Jiwon Choi's avatar Jiwon Choi Committed by GitHub

Bump TypeScript to 5.6.3 (#72311)

### Why?

To unpin the TS version for testing added at #69889.

Closes NDX-287

---------
Co-authored-by: 's avatarSebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
parent ea211a87
......@@ -114,7 +114,7 @@
"@types/html-validator": "5.0.3",
"@types/http-proxy": "1.17.3",
"@types/jest": "29.5.5",
"@types/node": "20.12.3",
"@types/node": "20.17.6",
"@types/node-fetch": "2.6.1",
"@types/react": "npm:types-react@19.0.0-rc.0",
"@types/react-dom": "npm:types-react-dom@19.0.0-rc.0",
......@@ -246,7 +246,7 @@
"tree-kill": "1.2.2",
"tsec": "0.2.1",
"turbo": "2.1.2",
"typescript": "5.5.3",
"typescript": "5.6.3",
"unfetch": "4.2.0",
"wait-port": "0.2.2",
"webpack": "5.96.1",
......@@ -265,7 +265,7 @@
"webpack": "5.96.1",
"browserslist": "4.22.2",
"caniuse-lite": "1.0.30001579",
"@types/node": "20.12.3",
"@types/node": "20.17.6",
"@babel/core": "7.22.5",
"@babel/parser": "7.22.5",
"@babel/types": "7.22.5",
......
......@@ -319,7 +319,7 @@
"text-table": "0.2.0",
"timers-browserify": "2.0.12",
"tty-browserify": "0.0.1",
"typescript": "5.5.3",
"typescript": "5.6.3",
"ua-parser-js": "1.0.35",
"unistore": "3.4.1",
"util": "0.12.4",
......
......@@ -70,10 +70,12 @@ export class LRUCache<T> {
private evictLeastRecentlyUsed(): void {
const lruKey = this.cache.keys().next().value
const lruSize = this.sizes.get(lruKey) || 0
this.totalSize -= lruSize
this.cache.delete(lruKey)
this.sizes.delete(lruKey)
if (lruKey !== undefined) {
const lruSize = this.sizes.get(lruKey) || 0
this.totalSize -= lruSize
this.cache.delete(lruKey)
this.sizes.delete(lruKey)
}
}
reset() {
......
......@@ -432,6 +432,10 @@ export class MockedResponse extends Stream.Writable implements ServerResponse {
public addTrailers(): void {
throw new Error('Method not implemented.')
}
public setHeaders(): this {
throw new Error('Method not implemented.')
}
}
interface RequestResponseMockerOptions {
......
......@@ -197,7 +197,7 @@ export class HeadersAdapter extends Headers {
}
}
public *entries(): IterableIterator<[string, string]> {
public *entries(): HeadersIterator<[string, string]> {
for (const key of Object.keys(this.headers)) {
const name = key.toLowerCase()
// We assert here that this is a string because we got it from the
......@@ -208,14 +208,14 @@ export class HeadersAdapter extends Headers {
}
}
public *keys(): IterableIterator<string> {
public *keys(): HeadersIterator<string> {
for (const key of Object.keys(this.headers)) {
const name = key.toLowerCase()
yield name
}
}
public *values(): IterableIterator<string> {
public *values(): HeadersIterator<string> {
for (const key of Object.keys(this.headers)) {
// We assert here that this is a string because we got it from the
// Object.keys() call above.
......@@ -225,7 +225,7 @@ export class HeadersAdapter extends Headers {
}
}
public [Symbol.iterator](): IterableIterator<[string, string]> {
public [Symbol.iterator](): HeadersIterator<[string, string]> {
return this.entries()
}
}
......@@ -412,7 +412,7 @@ declare module 'next/dist/compiled/amphtml-validator' {
}
declare module 'next/dist/compiled/superstruct' {
import m from 'superstruct'
import * as m from 'superstruct'
export = m
}
declare module 'next/dist/compiled/async-retry'
......@@ -544,7 +544,7 @@ declare module 'next/dist/compiled/picomatch' {
export = m
}
declare module 'next/dist/compiled/nanoid/index.cjs' {
import m from 'nanoid'
import * as m from 'nanoid'
export = m
}
declare module 'next/dist/compiled/ora' {
......@@ -590,7 +590,7 @@ declare module 'next/dist/compiled/tar' {
}
declare module 'next/dist/compiled/terser' {
import m from 'terser'
import * as m from 'terser'
export = m
}
declare module 'next/dist/compiled/semver' {
......@@ -619,7 +619,7 @@ declare module 'next/dist/compiled/unistore' {
export = m
}
declare module 'next/dist/compiled/web-vitals' {
import m from 'web-vitals'
import * as m from 'web-vitals'
export = m
}
declare module 'next/dist/compiled/web-vitals-attribution' {}
......
This diff is collapsed.
......@@ -172,9 +172,7 @@ export class NextInstance {
'react-dom': reactVersion,
'@types/react': 'latest',
'@types/react-dom': 'latest',
// TODO: fix the TS error with the TS 5.6
// x-ref: https://github.com/vercel/next.js/actions/runs/10777104696/job/29887663970?pr=69784
typescript: '5.5.4',
typescript: 'latest',
'@types/node': 'latest',
...this.dependencies,
...this.packageJson?.dependencies,
......
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