Skip to content

Commit 1e3a1cb

Browse files
huozhieps1lon
andauthored
Upgrade typescript to 5.3 (#64043)
Closes NEXT-2997 --------- Co-authored-by: eps1lon <[email protected]>
1 parent 1fd93ee commit 1e3a1cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+312
-301
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@
103103
"@types/html-validator": "5.0.3",
104104
"@types/http-proxy": "1.17.3",
105105
"@types/jest": "29.5.5",
106-
"@types/node": "20.2.5",
106+
"@types/node": "20.12.3",
107107
"@types/node-fetch": "2.6.1",
108-
"@types/react": "18.2.37",
109-
"@types/react-dom": "18.2.15",
108+
"@types/react": "18.2.74",
109+
"@types/react-dom": "18.2.23",
110110
"@types/relay-runtime": "14.1.13",
111111
"@types/selenium-webdriver": "4.0.15",
112112
"@types/sharp": "0.29.3",
@@ -233,7 +233,7 @@
233233
"tree-kill": "1.2.2",
234234
"tsec": "0.2.1",
235235
"turbo": "1.12.5",
236-
"typescript": "5.2.2",
236+
"typescript": "5.3.3",
237237
"unfetch": "4.2.0",
238238
"wait-port": "0.2.2",
239239
"webpack": "5.90.0",
@@ -246,13 +246,13 @@
246246
"webpack": "5.90.0",
247247
"browserslist": "4.22.2",
248248
"caniuse-lite": "1.0.30001579",
249-
"@types/node": "20.2.5",
249+
"@types/node": "20.12.3",
250250
"@babel/core": "7.22.5",
251251
"@babel/parser": "7.22.5",
252252
"@babel/types": "7.22.5",
253253
"@babel/traverse": "7.22.5",
254-
"@types/react": "18.2.37",
255-
"@types/react-dom": "18.2.15"
254+
"@types/react": "18.2.74",
255+
"@types/react-dom": "18.2.23"
256256
},
257257
"engines": {
258258
"node": ">=18.17.0",

packages/create-next-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"@types/async-retry": "1.4.2",
3333
"@types/ci-info": "2.0.0",
3434
"@types/cross-spawn": "6.0.0",
35-
"@types/node": "^20.2.5",
35+
"@types/node": "^20.12.3",
3636
"@types/prompts": "2.4.2",
3737
"@types/tar": "6.1.5",
3838
"@types/validate-npm-package-name": "3.0.0",

packages/next/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/// <reference types="./types/global" />
2-
/// <reference types="./types/compiled" />
32
/// <reference path="./dist/styled-jsx/types/global.d.ts" />
43
/// <reference path="./amp.d.ts" />
54
/// <reference path="./app.d.ts" />

packages/next/package.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,9 @@
4949
"amp.d.ts",
5050
"og.js",
5151
"og.d.ts",
52+
"types.d.ts",
53+
"types.js",
5254
"index.d.ts",
53-
"types/index.d.ts",
5455
"types/global.d.ts",
5556
"types/compiled.d.ts",
5657
"image-types/global.d.ts",
@@ -182,9 +183,9 @@
182183
"@types/path-to-regexp": "1.7.0",
183184
"@types/picomatch": "2.3.3",
184185
"@types/platform": "1.3.4",
185-
"@types/react": "18.2.37",
186-
"@types/react-dom": "18.2.15",
187-
"@types/react-is": "17.0.3",
186+
"@types/react": "18.2.74",
187+
"@types/react-dom": "18.2.23",
188+
"@types/react-is": "18.2.4",
188189
"@types/semver": "7.3.1",
189190
"@types/send": "0.14.4",
190191
"@types/shell-quote": "1.7.1",

packages/next/src/build/analysis/get-page-static-info.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { Middleware, RouteHas } from '../../lib/load-custom-routes'
44
import { promises as fs } from 'fs'
55
import LRUCache from 'next/dist/compiled/lru-cache'
66
import picomatch from 'next/dist/compiled/picomatch'
7-
import type { ServerRuntime } from 'next/types'
7+
import type { ServerRuntime } from '../../types'
88
import {
99
extractExportedConstValue,
1010
UnsupportedValueError,

packages/next/src/build/babel/plugins/next-page-config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import type {
55
Visitor,
66
NodePath,
77
} from 'next/dist/compiled/babel/core'
8-
import type { PageConfig } from 'next/types'
8+
import type { PageConfig } from '../../../types'
99
import { STRING_LITERAL_DROP_BUNDLE } from '../../../shared/lib/constants'
1010

1111
const CONFIG_KEY = 'config'

packages/next/src/build/entries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import {
5050
import { getPageStaticInfo } from './analysis/get-page-static-info'
5151
import { normalizePathSep } from '../shared/lib/page-path/normalize-path-sep'
5252
import { normalizePagePath } from '../shared/lib/page-path/normalize-page-path'
53-
import type { ServerRuntime } from '../../types'
53+
import type { ServerRuntime } from '../types'
5454
import { normalizeAppPath } from '../shared/lib/router/utils/app-paths'
5555
import { encodeMatchers } from './webpack/loaders/next-middleware-loader'
5656
import type { EdgeFunctionLoaderOptions } from './webpack/loaders/next-edge-function-loader'

packages/next/src/build/utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import type {
66
GetStaticPathsResult,
77
PageConfig,
88
ServerRuntime,
9-
} from 'next/types'
9+
} from '../types'
1010
import type { BuildManifest } from '../server/get-page-files'
1111
import type {
1212
Redirect,

packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import type webpack from 'webpack'
2-
import type { SizeLimit } from '../../../../../types'
2+
import type { SizeLimit } from '../../../../types'
33
import type { PagesRouteModuleOptions } from '../../../../server/future/route-modules/pages/module'
44
import type { MiddlewareConfig } from '../../../analysis/get-page-static-info'
55

packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import {
1515
import { SERVER_RUNTIME } from '../../../../lib/constants'
1616
import type { ManifestRewriteRoute, PrerenderManifest } from '../../..'
1717
import { normalizeAppPath } from '../../../../shared/lib/router/utils/app-paths'
18-
import type { SizeLimit } from '../../../../../types'
18+
import type { SizeLimit } from '../../../../types'
1919
import { internal_getCurrentFunctionWaitUntil } from '../../../../server/web/internal-edge-wait-until'
2020
import type { PAGE_TYPES } from '../../../../lib/page-types'
2121
import type { NextRequestHint } from '../../../../server/web/adapter'

0 commit comments

Comments
 (0)