From 1e3a1cbaab2a6fc3e10ceba7c27d3172579af972 Mon Sep 17 00:00:00 2001 From: Jiachi Liu Date: Wed, 17 Apr 2024 18:35:29 +0200 Subject: [PATCH] Upgrade typescript to 5.3 (#64043) Closes NEXT-2997 --------- Co-authored-by: eps1lon --- package.json | 14 +- packages/create-next-app/package.json | 2 +- packages/next/index.d.ts | 1 - packages/next/package.json | 9 +- .../build/analysis/get-page-static-info.ts | 2 +- .../build/babel/plugins/next-page-config.ts | 2 +- packages/next/src/build/entries.ts | 2 +- packages/next/src/build/utils.ts | 2 +- .../loaders/next-edge-ssr-loader/index.ts | 2 +- .../loaders/next-edge-ssr-loader/render.ts | 2 +- .../build/webpack/loaders/next-swc-loader.ts | 2 +- .../plugins/next-types-plugin/index.ts | 4 +- .../router-reducer/ppr-navigations.ts | 4 +- packages/next/src/lib/constants.ts | 2 +- packages/next/src/lib/is-edge-runtime.ts | 2 +- packages/next/src/lib/memory/startup.ts | 1 - .../src/server/api-utils/node/api-resolver.ts | 2 +- .../src/server/api-utils/node/parse-body.ts | 2 +- .../api-utils/node/try-get-preview-data.ts | 2 +- .../src/server/app-render/action-handler.ts | 2 +- packages/next/src/server/app-render/types.ts | 2 +- packages/next/src/server/base-server.ts | 2 +- packages/next/src/server/config-schema.ts | 2 +- packages/next/src/server/config-shared.ts | 2 +- packages/next/src/server/config.ts | 2 +- .../future/route-modules/pages-api/module.ts | 2 +- .../future/route-modules/pages/module.ts | 2 +- .../server/lib/router-utils/resolve-routes.ts | 2 +- packages/next/src/server/load-components.ts | 2 +- .../server/load-default-error-components.ts | 2 +- packages/next/src/server/render.tsx | 2 +- .../next/src/server/setup-http-agent-env.ts | 2 +- .../next/src/shared/lib/get-hostname.test.ts | 3 + .../shared/lib/html-context.shared-runtime.ts | 2 +- packages/next/src/shared/lib/utils.ts | 2 +- .../next/{types/index.d.ts => src/types.ts} | 20 +- packages/next/taskfile.js | 36 +- packages/next/types.d.ts | 9 + packages/next/types.js | 1 + .../{misc.d.ts => $$compiled.internal.d.ts} | 30 ++ packages/next/types/webpack.d.ts | 54 --- pnpm-lock.yaml | 333 +++++++++--------- test/development/basic/next-rs-api.test.ts | 6 +- .../with-i18n.test.ts | 2 +- .../without-i18n.test.ts | 2 +- test/lib/e2e-utils.ts | 2 +- test/lib/next-modes/base.ts | 2 +- test/lib/next-modes/next-deploy.ts | 2 +- test/lib/next-modes/next-dev.ts | 2 +- test/lib/next-modes/next-start.ts | 2 +- test/tsconfig.json | 6 - .../cssnano-simple/basic.test.ts | 2 +- .../cssnano-simple/exclude-all.test.ts | 2 +- .../cssnano-simple/plugin-config.test.ts | 2 +- test/unit/web-runtime/next-request.test.ts | 2 +- .../web-runtime/next-response-cookies.test.ts | 2 +- test/unit/web-runtime/next-response.test.ts | 2 +- 57 files changed, 312 insertions(+), 301 deletions(-) rename packages/next/{types/index.d.ts => src/types.ts} (94%) create mode 100644 packages/next/types.d.ts create mode 100644 packages/next/types.js rename packages/next/types/{misc.d.ts => $$compiled.internal.d.ts} (94%) delete mode 100644 packages/next/types/webpack.d.ts delete mode 100644 test/tsconfig.json diff --git a/package.json b/package.json index 2d9eced19d..0fdd59b356 100644 --- a/package.json +++ b/package.json @@ -103,10 +103,10 @@ "@types/html-validator": "5.0.3", "@types/http-proxy": "1.17.3", "@types/jest": "29.5.5", - "@types/node": "20.2.5", + "@types/node": "20.12.3", "@types/node-fetch": "2.6.1", - "@types/react": "18.2.37", - "@types/react-dom": "18.2.15", + "@types/react": "18.2.74", + "@types/react-dom": "18.2.23", "@types/relay-runtime": "14.1.13", "@types/selenium-webdriver": "4.0.15", "@types/sharp": "0.29.3", @@ -233,7 +233,7 @@ "tree-kill": "1.2.2", "tsec": "0.2.1", "turbo": "1.12.5", - "typescript": "5.2.2", + "typescript": "5.3.3", "unfetch": "4.2.0", "wait-port": "0.2.2", "webpack": "5.90.0", @@ -246,13 +246,13 @@ "webpack": "5.90.0", "browserslist": "4.22.2", "caniuse-lite": "1.0.30001579", - "@types/node": "20.2.5", + "@types/node": "20.12.3", "@babel/core": "7.22.5", "@babel/parser": "7.22.5", "@babel/types": "7.22.5", "@babel/traverse": "7.22.5", - "@types/react": "18.2.37", - "@types/react-dom": "18.2.15" + "@types/react": "18.2.74", + "@types/react-dom": "18.2.23" }, "engines": { "node": ">=18.17.0", diff --git a/packages/create-next-app/package.json b/packages/create-next-app/package.json index 4f75499875..cf5b9d6f95 100644 --- a/packages/create-next-app/package.json +++ b/packages/create-next-app/package.json @@ -32,7 +32,7 @@ "@types/async-retry": "1.4.2", "@types/ci-info": "2.0.0", "@types/cross-spawn": "6.0.0", - "@types/node": "^20.2.5", + "@types/node": "^20.12.3", "@types/prompts": "2.4.2", "@types/tar": "6.1.5", "@types/validate-npm-package-name": "3.0.0", diff --git a/packages/next/index.d.ts b/packages/next/index.d.ts index 348fd2e07a..f91a6df44c 100644 --- a/packages/next/index.d.ts +++ b/packages/next/index.d.ts @@ -1,5 +1,4 @@ /// -/// /// /// /// diff --git a/packages/next/package.json b/packages/next/package.json index 311efba95d..a4d5fb158a 100644 --- a/packages/next/package.json +++ b/packages/next/package.json @@ -49,8 +49,9 @@ "amp.d.ts", "og.js", "og.d.ts", + "types.d.ts", + "types.js", "index.d.ts", - "types/index.d.ts", "types/global.d.ts", "types/compiled.d.ts", "image-types/global.d.ts", @@ -182,9 +183,9 @@ "@types/path-to-regexp": "1.7.0", "@types/picomatch": "2.3.3", "@types/platform": "1.3.4", - "@types/react": "18.2.37", - "@types/react-dom": "18.2.15", - "@types/react-is": "17.0.3", + "@types/react": "18.2.74", + "@types/react-dom": "18.2.23", + "@types/react-is": "18.2.4", "@types/semver": "7.3.1", "@types/send": "0.14.4", "@types/shell-quote": "1.7.1", diff --git a/packages/next/src/build/analysis/get-page-static-info.ts b/packages/next/src/build/analysis/get-page-static-info.ts index 4420c26614..3469e0bd7b 100644 --- a/packages/next/src/build/analysis/get-page-static-info.ts +++ b/packages/next/src/build/analysis/get-page-static-info.ts @@ -4,7 +4,7 @@ import type { Middleware, RouteHas } from '../../lib/load-custom-routes' import { promises as fs } from 'fs' import LRUCache from 'next/dist/compiled/lru-cache' import picomatch from 'next/dist/compiled/picomatch' -import type { ServerRuntime } from 'next/types' +import type { ServerRuntime } from '../../types' import { extractExportedConstValue, UnsupportedValueError, diff --git a/packages/next/src/build/babel/plugins/next-page-config.ts b/packages/next/src/build/babel/plugins/next-page-config.ts index d3a20d4f04..c4473ea02c 100644 --- a/packages/next/src/build/babel/plugins/next-page-config.ts +++ b/packages/next/src/build/babel/plugins/next-page-config.ts @@ -5,7 +5,7 @@ import type { Visitor, NodePath, } from 'next/dist/compiled/babel/core' -import type { PageConfig } from 'next/types' +import type { PageConfig } from '../../../types' import { STRING_LITERAL_DROP_BUNDLE } from '../../../shared/lib/constants' const CONFIG_KEY = 'config' diff --git a/packages/next/src/build/entries.ts b/packages/next/src/build/entries.ts index 62c6040c3c..7ae4c637f1 100644 --- a/packages/next/src/build/entries.ts +++ b/packages/next/src/build/entries.ts @@ -50,7 +50,7 @@ import { import { getPageStaticInfo } from './analysis/get-page-static-info' import { normalizePathSep } from '../shared/lib/page-path/normalize-path-sep' import { normalizePagePath } from '../shared/lib/page-path/normalize-page-path' -import type { ServerRuntime } from '../../types' +import type { ServerRuntime } from '../types' import { normalizeAppPath } from '../shared/lib/router/utils/app-paths' import { encodeMatchers } from './webpack/loaders/next-middleware-loader' import type { EdgeFunctionLoaderOptions } from './webpack/loaders/next-edge-function-loader' diff --git a/packages/next/src/build/utils.ts b/packages/next/src/build/utils.ts index 6e1c9c06bc..f5ce5ace17 100644 --- a/packages/next/src/build/utils.ts +++ b/packages/next/src/build/utils.ts @@ -6,7 +6,7 @@ import type { GetStaticPathsResult, PageConfig, ServerRuntime, -} from 'next/types' +} from '../types' import type { BuildManifest } from '../server/get-page-files' import type { Redirect, diff --git a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts index e0f0728e8e..8e82cf9aab 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/index.ts @@ -1,5 +1,5 @@ import type webpack from 'webpack' -import type { SizeLimit } from '../../../../../types' +import type { SizeLimit } from '../../../../types' import type { PagesRouteModuleOptions } from '../../../../server/future/route-modules/pages/module' import type { MiddlewareConfig } from '../../../analysis/get-page-static-info' diff --git a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts index 80a6d4b1e5..1bda32f320 100644 --- a/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts +++ b/packages/next/src/build/webpack/loaders/next-edge-ssr-loader/render.ts @@ -15,7 +15,7 @@ import { import { SERVER_RUNTIME } from '../../../../lib/constants' import type { ManifestRewriteRoute, PrerenderManifest } from '../../..' import { normalizeAppPath } from '../../../../shared/lib/router/utils/app-paths' -import type { SizeLimit } from '../../../../../types' +import type { SizeLimit } from '../../../../types' import { internal_getCurrentFunctionWaitUntil } from '../../../../server/web/internal-edge-wait-until' import type { PAGE_TYPES } from '../../../../lib/page-types' import type { NextRequestHint } from '../../../../server/web/adapter' diff --git a/packages/next/src/build/webpack/loaders/next-swc-loader.ts b/packages/next/src/build/webpack/loaders/next-swc-loader.ts index 6ca51b575d..f60acae3dd 100644 --- a/packages/next/src/build/webpack/loaders/next-swc-loader.ts +++ b/packages/next/src/build/webpack/loaders/next-swc-loader.ts @@ -26,7 +26,7 @@ IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import type { NextConfig } from '../../../../types' +import type { NextConfig } from '../../../types' import type { WebpackLayerName } from '../../../lib/constants' import { isWasm, transform } from '../../swc' import { getLoaderSWCOptions } from '../../swc/options' diff --git a/packages/next/src/build/webpack/plugins/next-types-plugin/index.ts b/packages/next/src/build/webpack/plugins/next-types-plugin/index.ts index d1b4854812..de056f7196 100644 --- a/packages/next/src/build/webpack/plugins/next-types-plugin/index.ts +++ b/packages/next/src/build/webpack/plugins/next-types-plugin/index.ts @@ -441,8 +441,8 @@ declare namespace __next_route_internal_types__ { } declare module 'next' { - export { default } from 'next/types/index.js' - export * from 'next/types/index.js' + export { default } from 'next/types.js' + export * from 'next/types.js' export type Route = __next_route_internal_types__.RouteImpl diff --git a/packages/next/src/client/components/router-reducer/ppr-navigations.ts b/packages/next/src/client/components/router-reducer/ppr-navigations.ts index 456fca0657..499b40044f 100644 --- a/packages/next/src/client/components/router-reducer/ppr-navigations.ts +++ b/packages/next/src/client/components/router-reducer/ppr-navigations.ts @@ -528,8 +528,8 @@ function createPendingCacheNode( // Create a deferred promise. This will be fulfilled once the dynamic // response is received from the server. - rsc: createDeferredRsc(), - head: isLeafSegment ? createDeferredRsc() : null, + rsc: createDeferredRsc() as React.ReactNode, + head: isLeafSegment ? (createDeferredRsc() as React.ReactNode) : null, lazyDataResolved: false, } } diff --git a/packages/next/src/lib/constants.ts b/packages/next/src/lib/constants.ts index ed3679d062..40bc8e0fef 100644 --- a/packages/next/src/lib/constants.ts +++ b/packages/next/src/lib/constants.ts @@ -1,4 +1,4 @@ -import type { ServerRuntime } from '../../types' +import type { ServerRuntime } from '../types' export const NEXT_QUERY_PARAM_PREFIX = 'nxtP' diff --git a/packages/next/src/lib/is-edge-runtime.ts b/packages/next/src/lib/is-edge-runtime.ts index 486f73006d..5e3705e230 100644 --- a/packages/next/src/lib/is-edge-runtime.ts +++ b/packages/next/src/lib/is-edge-runtime.ts @@ -1,4 +1,4 @@ -import type { ServerRuntime } from '../../types' +import type { ServerRuntime } from '../types' import { SERVER_RUNTIME } from './constants' export function isEdgeRuntime(value?: string): value is ServerRuntime { diff --git a/packages/next/src/lib/memory/startup.ts b/packages/next/src/lib/memory/startup.ts index b9a5c5fa6a..b18a6a0f4c 100644 --- a/packages/next/src/lib/memory/startup.ts +++ b/packages/next/src/lib/memory/startup.ts @@ -9,7 +9,6 @@ export function enableMemoryDebuggingMode(): void { // memory limit. It does not give any warning to the user though which // can be jarring. If memory is large, this may take a long time. if ('setHeapSnapshotNearHeapLimit' in v8) { - // @ts-expect-error - this method exists since Node 16. v8.setHeapSnapshotNearHeapLimit(1) } diff --git a/packages/next/src/server/api-utils/node/api-resolver.ts b/packages/next/src/server/api-utils/node/api-resolver.ts index 614c8eee43..8f85fb8202 100644 --- a/packages/next/src/server/api-utils/node/api-resolver.ts +++ b/packages/next/src/server/api-utils/node/api-resolver.ts @@ -1,6 +1,6 @@ import type { IncomingMessage, ServerResponse } from 'http' import type { NextApiRequest, NextApiResponse } from '../../../shared/lib/utils' -import type { PageConfig, ResponseLimit } from 'next/types' +import type { PageConfig, ResponseLimit } from '../../../types' import type { __ApiPreviewProps } from '../.' import type { CookieSerializeOptions } from 'next/dist/compiled/cookie' diff --git a/packages/next/src/server/api-utils/node/parse-body.ts b/packages/next/src/server/api-utils/node/parse-body.ts index e63918e463..ac9d46a407 100644 --- a/packages/next/src/server/api-utils/node/parse-body.ts +++ b/packages/next/src/server/api-utils/node/parse-body.ts @@ -1,8 +1,8 @@ import type { IncomingMessage } from 'http' -import type { SizeLimit } from 'next/types' import { parse } from 'next/dist/compiled/content-type' import isError from '../../../lib/is-error' +import type { SizeLimit } from '../../../types' import { ApiError } from '../index' /** diff --git a/packages/next/src/server/api-utils/node/try-get-preview-data.ts b/packages/next/src/server/api-utils/node/try-get-preview-data.ts index ca81d1379e..6140bd2e9f 100644 --- a/packages/next/src/server/api-utils/node/try-get-preview-data.ts +++ b/packages/next/src/server/api-utils/node/try-get-preview-data.ts @@ -3,7 +3,7 @@ import type { NextApiResponse } from '../../../shared/lib/utils' import { checkIsOnDemandRevalidate } from '../.' import type { __ApiPreviewProps } from '../.' import type { BaseNextRequest, BaseNextResponse } from '../../base-http' -import type { PreviewData } from 'next/types' +import type { PreviewData } from '../../../types' import { clearPreviewData, diff --git a/packages/next/src/server/app-render/action-handler.ts b/packages/next/src/server/app-render/action-handler.ts index e668f1b446..b4fd2bdbef 100644 --- a/packages/next/src/server/app-render/action-handler.ts +++ b/packages/next/src/server/app-render/action-handler.ts @@ -1,5 +1,5 @@ import type { IncomingHttpHeaders, OutgoingHttpHeaders } from 'http' -import type { SizeLimit } from '../../../types' +import type { SizeLimit } from '../../types' import type { RequestStore } from '../../client/components/request-async-storage.external' import type { AppRenderContext, GenerateFlight } from './app-render' import type { AppPageModule } from '../../server/future/route-modules/app-page/module' diff --git a/packages/next/src/server/app-render/types.ts b/packages/next/src/server/app-render/types.ts index 4ce45e834b..ac8bced372 100644 --- a/packages/next/src/server/app-render/types.ts +++ b/packages/next/src/server/app-render/types.ts @@ -1,5 +1,5 @@ import type { LoadComponentsReturnType } from '../load-components' -import type { ServerRuntime, SizeLimit } from '../../../types' +import type { ServerRuntime, SizeLimit } from '../../types' import type { NextConfigComplete } from '../../server/config-shared' import type { ClientReferenceManifest } from '../../build/webpack/plugins/flight-manifest-plugin' import type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin' diff --git a/packages/next/src/server/base-server.ts b/packages/next/src/server/base-server.ts index 59974e43be..59d6149a82 100644 --- a/packages/next/src/server/base-server.ts +++ b/packages/next/src/server/base-server.ts @@ -20,7 +20,7 @@ import { normalizeRepeatedSlashes, MissingStaticPage, } from '../shared/lib/utils' -import type { PreviewData } from 'next/types' +import type { PreviewData } from '../types' import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin' import type { BaseNextRequest, BaseNextResponse } from './base-http' import type { diff --git a/packages/next/src/server/config-schema.ts b/packages/next/src/server/config-schema.ts index 6dddc6ae6d..097cb23009 100644 --- a/packages/next/src/server/config-schema.ts +++ b/packages/next/src/server/config-schema.ts @@ -4,7 +4,7 @@ import { VALID_LOADERS } from '../shared/lib/image-config' import { z } from 'next/dist/compiled/zod' import type zod from 'next/dist/compiled/zod' -import type { SizeLimit } from '../../types' +import type { SizeLimit } from '../types' import type { ExportPathMap, TurboLoaderItem, diff --git a/packages/next/src/server/config-shared.ts b/packages/next/src/server/config-shared.ts index 7d2a458d9a..9cd6a925df 100644 --- a/packages/next/src/server/config-shared.ts +++ b/packages/next/src/server/config-shared.ts @@ -9,7 +9,7 @@ import type { import type { SubresourceIntegrityAlgorithm } from '../build/webpack/plugins/subresource-integrity-plugin' import type { WEB_VITALS } from '../shared/lib/utils' import type { NextParsedUrlQuery } from './request-meta' -import type { SizeLimit } from '../../types' +import type { SizeLimit } from '../types' import type { SwrDelta } from './lib/revalidate' export type NextConfigComplete = Required & { diff --git a/packages/next/src/server/config.ts b/packages/next/src/server/config.ts index 5a43ee11aa..cbc1d7068c 100644 --- a/packages/next/src/server/config.ts +++ b/packages/next/src/server/config.ts @@ -1014,7 +1014,7 @@ export default async function loadConfig( require('./config-schema') as typeof import('./config-schema') const state = configSchema.safeParse(userConfig) - if (!state.success) { + if (state.success === false) { // error message header const messages = [`Invalid ${configFileName} options detected: `] diff --git a/packages/next/src/server/future/route-modules/pages-api/module.ts b/packages/next/src/server/future/route-modules/pages-api/module.ts index ac48492c50..a709d2ea87 100644 --- a/packages/next/src/server/future/route-modules/pages-api/module.ts +++ b/packages/next/src/server/future/route-modules/pages-api/module.ts @@ -1,6 +1,6 @@ import type { IncomingMessage, ServerResponse } from 'http' import type { PagesAPIRouteDefinition } from '../../route-definitions/pages-api-route-definition' -import type { PageConfig } from '../../../../../types' +import type { PageConfig } from '../../../../types' import type { ParsedUrlQuery } from 'querystring' import { wrapApiHandler, type __ApiPreviewProps } from '../../../api-utils' import type { RouteModuleOptions } from '../route-module' diff --git a/packages/next/src/server/future/route-modules/pages/module.ts b/packages/next/src/server/future/route-modules/pages/module.ts index c50b9c3eb7..97fc26d411 100644 --- a/packages/next/src/server/future/route-modules/pages/module.ts +++ b/packages/next/src/server/future/route-modules/pages/module.ts @@ -5,7 +5,7 @@ import type { GetStaticProps, NextComponentType, PageConfig, -} from '../../../../../types' +} from '../../../../types' import type { PagesRouteDefinition } from '../../route-definitions/pages-route-definition' import type { NextParsedUrlQuery } from '../../../request-meta' import type { RenderOpts } from '../../../render' diff --git a/packages/next/src/server/lib/router-utils/resolve-routes.ts b/packages/next/src/server/lib/router-utils/resolve-routes.ts index 8b2b7c9606..b9585c9c9c 100644 --- a/packages/next/src/server/lib/router-utils/resolve-routes.ts +++ b/packages/next/src/server/lib/router-utils/resolve-routes.ts @@ -3,7 +3,7 @@ import type { IncomingMessage, ServerResponse } from 'http' import type { NextConfigComplete } from '../../config-shared' import type { RenderServer, initialize } from '../router-server' import type { PatchMatcher } from '../../../shared/lib/router/utils/path-match' -import type { Redirect } from '../../../../types' +import type { Redirect } from '../../../types' import type { Header } from '../../../lib/load-custom-routes' import type { UnwrapPromise } from '../../../lib/coalesced-function' import type { NextUrlWithParsedQuery } from '../../request-meta' diff --git a/packages/next/src/server/load-components.ts b/packages/next/src/server/load-components.ts index 5ad501b35f..3e43beaef8 100644 --- a/packages/next/src/server/load-components.ts +++ b/packages/next/src/server/load-components.ts @@ -9,7 +9,7 @@ import type { GetStaticPaths, GetServerSideProps, GetStaticProps, -} from 'next/types' +} from '../types' import type { RouteModule } from './future/route-modules/route-module' import type { BuildManifest } from './get-page-files' import type { ActionManifest } from '../build/webpack/plugins/flight-client-entry-plugin' diff --git a/packages/next/src/server/load-default-error-components.ts b/packages/next/src/server/load-default-error-components.ts index b57567a5f9..bbd7037090 100644 --- a/packages/next/src/server/load-default-error-components.ts +++ b/packages/next/src/server/load-default-error-components.ts @@ -9,7 +9,7 @@ import type { GetStaticPaths, GetServerSideProps, GetStaticProps, -} from 'next/types' +} from '../types' import type { RouteModule } from './future/route-modules/route-module' import type { BuildManifest } from './get-page-files' diff --git a/packages/next/src/server/render.tsx b/packages/next/src/server/render.tsx index 0130f63eed..c9cd388215 100644 --- a/packages/next/src/server/render.tsx +++ b/packages/next/src/server/render.tsx @@ -29,7 +29,7 @@ import type { PreviewData, ServerRuntime, SizeLimit, -} from 'next/types' +} from '../types' import type { UnwrapPromise } from '../lib/coalesced-function' import type { ReactReadableStream } from './stream-utils/node-web-streams-helper' import type { ClientReferenceManifest } from '../build/webpack/plugins/flight-manifest-plugin' diff --git a/packages/next/src/server/setup-http-agent-env.ts b/packages/next/src/server/setup-http-agent-env.ts index 6c4deea8c2..4e0bea31b0 100644 --- a/packages/next/src/server/setup-http-agent-env.ts +++ b/packages/next/src/server/setup-http-agent-env.ts @@ -1,4 +1,4 @@ -import type { NextConfig } from '../../types' +import type { NextConfig } from '../types' import { Agent as HttpAgent } from 'http' import { Agent as HttpsAgent } from 'https' diff --git a/packages/next/src/shared/lib/get-hostname.test.ts b/packages/next/src/shared/lib/get-hostname.test.ts index 9130f5445d..f8f7dbf8df 100644 --- a/packages/next/src/shared/lib/get-hostname.test.ts +++ b/packages/next/src/shared/lib/get-hostname.test.ts @@ -26,14 +26,17 @@ describe('getHostname', () => { // With headers. expect(getHostname(parsed, { host: parsed.host })).toBe(hostname) // With an empty headers array. + // @ts-expect-error passing an array of strings is not allowed expect(getHostname(parsed, { host: [] })).toBe(hostname) // With a headers array. + // @ts-expect-error passing an array of strings is not allowed expect(getHostname({}, { host: [parsed.host] })).toBe(undefined) }) }) it('should return undefined for empty input', () => { expect(getHostname({})).toBe(undefined) + // @ts-expect-error passing an array of strings is not allowed expect(getHostname({}, { host: [] })).toBe(undefined) }) }) diff --git a/packages/next/src/shared/lib/html-context.shared-runtime.ts b/packages/next/src/shared/lib/html-context.shared-runtime.ts index a1c060ef8f..7b36d909e7 100644 --- a/packages/next/src/shared/lib/html-context.shared-runtime.ts +++ b/packages/next/src/shared/lib/html-context.shared-runtime.ts @@ -1,5 +1,5 @@ import type { BuildManifest } from '../../server/get-page-files' -import type { ServerRuntime } from 'next/types' +import type { ServerRuntime } from '../../types' import type { NEXT_DATA } from './utils' import type { FontConfig } from '../../server/font-utils' import type { NextFontManifest } from '../../build/webpack/plugins/next-font-manifest-plugin' diff --git a/packages/next/src/shared/lib/utils.ts b/packages/next/src/shared/lib/utils.ts index 98098d8128..6e82f21f8e 100644 --- a/packages/next/src/shared/lib/utils.ts +++ b/packages/next/src/shared/lib/utils.ts @@ -5,7 +5,7 @@ import type { Env } from '@next/env' import type { IncomingMessage, ServerResponse } from 'http' import type { NextRouter } from './router/router' import type { ParsedUrlQuery } from 'querystring' -import type { PreviewData } from 'next/types' +import type { PreviewData } from '../../types' import type { COMPILER_NAMES } from './constants' import type fs from 'fs' diff --git a/packages/next/types/index.d.ts b/packages/next/src/types.ts similarity index 94% rename from packages/next/types/index.d.ts rename to packages/next/src/types.ts index 0f60e949d4..2a375309a0 100644 --- a/packages/next/types/index.d.ts +++ b/packages/next/src/types.ts @@ -11,27 +11,22 @@ import type React from 'react' import type { ParsedUrlQuery } from 'querystring' import type { IncomingMessage, ServerResponse } from 'http' -import { +import type { NextPageContext, NextComponentType, NextApiResponse, NextApiRequest, NextApiHandler, - // @ts-ignore This path is generated at build time and conflicts otherwise -} from '../dist/shared/lib/utils' +} from './shared/lib/utils' -import type { - NextApiRequestCookies, - // @ts-ignore This path is generated at build time and conflicts otherwise -} from '../dist/server/api-utils' +import type { NextApiRequestCookies } from './server/api-utils' -// @ts-ignore This path is generated at build time and conflicts otherwise -import next from '../dist/server/next' +import next from './server/next' export type ServerRuntime = 'nodejs' | 'experimental-edge' | 'edge' | undefined // @ts-ignore This path is generated at build time and conflicts otherwise -export { NextConfig } from '../dist/server/config' +export { NextConfig } from './server/config' export type { Metadata, @@ -41,8 +36,7 @@ export type { Viewport, ResolvingViewport, ResolvedViewport, - // @ts-ignore This path is generated at build time and conflicts otherwise -} from '../dist/lib/metadata/types/metadata-interface' +} from './lib/metadata/types/metadata-interface' /** * Stub route type for typedRoutes before `next dev` or `next build` is run @@ -160,7 +154,7 @@ export type PageConfig = { unstable_excludeFiles?: string[] } -export { +export type { NextPageContext, NextComponentType, NextApiResponse, diff --git a/packages/next/taskfile.js b/packages/next/taskfile.js index e8f536d2f5..558e9c0a45 100644 --- a/packages/next/taskfile.js +++ b/packages/next/taskfile.js @@ -2576,7 +2576,10 @@ export async function trace(task, opts) { } export async function build(task, opts) { - await task.serial(['precompile', 'compile', 'generate_types'], opts) + await task.serial( + ['precompile', 'compile', 'generate_types', 'rewrite_compiled_references'], + opts + ) } export async function generate_types(task, opts) { @@ -2585,6 +2588,37 @@ export async function generate_types(task, opts) { }) } +/** + * TypeScript will emit references to the compiled types used to type the implementation. + * The declarations however don't need such detailed types. + * We rewrite the references to reference a more lightweight solution instead. + * @param {import('taskr').Task} task + */ +export async function rewrite_compiled_references(task, opts) { + const declarationDirectory = join(__dirname, 'dist') + const declarationFiles = glob.sync('**/*.d.ts', { cwd: declarationDirectory }) + + for (const declarationFile of declarationFiles) { + const content = await fs.readFile( + join(declarationDirectory, declarationFile), + 'utf8' + ) + // Rewrite + // /// + // to + // /// + if (content.indexOf('/types/$$compiled.internal.d.ts" />') !== -1) { + await fs.writeFile( + join(declarationDirectory, declarationFile), + content.replace( + /\/types\/\$\$compiled\.internal\.d\.ts" \/>/g, + '/types/compiled.d.ts" />' + ) + ) + } + } +} + export default async function (task) { const opts = { dev: true } await task.clear('dist') diff --git a/packages/next/types.d.ts b/packages/next/types.d.ts new file mode 100644 index 0000000000..473727365d --- /dev/null +++ b/packages/next/types.d.ts @@ -0,0 +1,9 @@ +// Triple slash directives are copied from src/types.ts. +// TypeScript currently does not preserve the tripple-slash directives. +// Once https://github.com/microsoft/TypeScript/pull/57681 is released, we can remove the triple slash directives here. +/// +/// +/// +/// +export * from './dist/types' +export { default } from './dist/types' diff --git a/packages/next/types.js b/packages/next/types.js new file mode 100644 index 0000000000..7f55d5d37f --- /dev/null +++ b/packages/next/types.js @@ -0,0 +1 @@ +// types-only diff --git a/packages/next/types/misc.d.ts b/packages/next/types/$$compiled.internal.d.ts similarity index 94% rename from packages/next/types/misc.d.ts rename to packages/next/types/$$compiled.internal.d.ts index 5adefbbac5..17dd16aa9d 100644 --- a/packages/next/types/misc.d.ts +++ b/packages/next/types/$$compiled.internal.d.ts @@ -446,3 +446,33 @@ declare module 'next/dist/compiled/zod' { import * as m from 'zod' export = m } + +declare module 'mini-css-extract-plugin' +declare module 'next/dist/compiled/loader-utils3' + +declare module 'next/dist/compiled/webpack/webpack' { + import type webpackSources from 'webpack-sources1' + export function init(): void + export let BasicEvaluatedExpression: any + export let GraphHelpers: any + export let sources: typeof webpackSources + export let StringXor: any + export { + default as webpack, + Compiler, + Compilation, + Module, + Stats, + Template, + RuntimeModule, + RuntimeGlobals, + NormalModule, + ResolvePluginInstance, + ModuleFilenameHelpers, + } from 'webpack' + export type { + LoaderDefinitionFunction, + LoaderContext, + ModuleGraph, + } from 'webpack' +} diff --git a/packages/next/types/webpack.d.ts b/packages/next/types/webpack.d.ts deleted file mode 100644 index da080ab6d1..0000000000 --- a/packages/next/types/webpack.d.ts +++ /dev/null @@ -1,54 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies, @typescript-eslint/no-unused-vars , no-shadow */ -// Type definitions for webpack 4.39 -// Project: https://github.com/webpack/webpack -// Definitions by: Qubo -// Benjamin Lim -// Boris Cherny -// Tommy Troy Lin -// Mohsen Azimi -// Jonathan Creamer -// Alan Agius -// Spencer Elliott -// Jason Cheatham -// Dennis George -// Christophe Hurpeau -// ZSkycat -// John Reilly -// Ryan Waskiewicz -// Kyle Uehlein -// Grgur Grisogono -// Rubens Pinheiro Gonçalves Cavalcante -// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -// TypeScript Version: 2.3 - -/// - -declare module 'mini-css-extract-plugin' -declare module 'next/dist/compiled/loader-utils3' - -declare module 'next/dist/compiled/webpack/webpack' { - import type webpackSources from 'webpack-sources1' - export function init(): void - export let BasicEvaluatedExpression: any - export let GraphHelpers: any - export let sources: typeof webpackSources - export let StringXor: any - export { - default as webpack, - Compiler, - Compilation, - Module, - Stats, - Template, - RuntimeModule, - RuntimeGlobals, - NormalModule, - ResolvePluginInstance, - ModuleFilenameHelpers, - } from 'webpack' - export type { - LoaderDefinitionFunction, - LoaderContext, - ModuleGraph, - } from 'webpack' -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4d2893af7e..1ebf74c08d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,13 +8,13 @@ overrides: webpack: 5.90.0 browserslist: 4.22.2 caniuse-lite: 1.0.30001579 - '@types/node': 20.2.5 + '@types/node': 20.12.3 '@babel/core': 7.22.5 '@babel/parser': 7.22.5 '@babel/types': 7.22.5 '@babel/traverse': 7.22.5 - '@types/react': 18.2.37 - '@types/react-dom': 18.2.15 + '@types/react': 18.2.74 + '@types/react-dom': 18.2.23 importers: @@ -52,7 +52,7 @@ importers: version: 11.11.0 '@emotion/react': specifier: 11.11.1 - version: 11.11.1(@types/react@18.2.37)(react@18.2.0) + version: 11.11.1(@types/react@18.2.74)(react@18.2.0) '@fullhuman/postcss-purgecss': specifier: 1.3.0 version: 1.3.0 @@ -150,17 +150,17 @@ importers: specifier: 29.5.5 version: 29.5.5 '@types/node': - specifier: 20.2.5 - version: 20.2.5 + specifier: 20.12.3 + version: 20.12.3 '@types/node-fetch': specifier: 2.6.1 version: 2.6.1 '@types/react': - specifier: 18.2.37 - version: 18.2.37 + specifier: 18.2.74 + version: 18.2.74 '@types/react-dom': - specifier: 18.2.15 - version: 18.2.15 + specifier: 18.2.23 + version: 18.2.23 '@types/relay-runtime': specifier: 14.1.13 version: 14.1.13 @@ -178,10 +178,10 @@ importers: version: 2.0.3 '@typescript-eslint/eslint-plugin': specifier: 6.14.0 - version: 6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.56.0)(typescript@5.2.2) + version: 6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/parser': specifier: 6.14.0 - version: 6.14.0(eslint@8.56.0)(typescript@5.2.2) + version: 6.14.0(eslint@8.56.0)(typescript@5.3.3) '@vercel/fetch': specifier: 6.1.1 version: 6.1.1(@types/node-fetch@2.6.1)(node-fetch@2.6.7) @@ -256,7 +256,7 @@ importers: version: 2.29.1(@typescript-eslint/parser@6.14.0)(eslint@8.56.0) eslint-plugin-jest: specifier: 27.6.3 - version: 27.6.3(@typescript-eslint/eslint-plugin@6.14.0)(eslint@8.56.0)(jest@29.7.0)(typescript@5.2.2) + version: 27.6.3(@typescript-eslint/eslint-plugin@6.14.0)(eslint@8.56.0)(jest@29.7.0)(typescript@5.3.3) eslint-plugin-jsdoc: specifier: 48.0.4 version: 48.0.4(eslint@8.56.0) @@ -328,7 +328,7 @@ importers: version: 3.0.0 jest: specifier: 29.7.0 - version: 29.7.0(@types/node@20.2.5) + version: 29.7.0(@types/node@20.12.3) jest-environment-jsdom: specifier: 29.7.0 version: 29.7.0 @@ -535,13 +535,13 @@ importers: version: 1.2.2 tsec: specifier: 0.2.1 - version: 0.2.1(@bazel/bazelisk@1.18.0)(typescript@5.2.2) + version: 0.2.1(@bazel/bazelisk@1.18.0)(typescript@5.3.3) turbo: specifier: 1.12.5 version: 1.12.5 typescript: - specifier: 5.2.2 - version: 5.2.2 + specifier: 5.3.3 + version: 5.3.3 unfetch: specifier: 4.2.0 version: 4.2.0 @@ -690,8 +690,8 @@ importers: specifier: 6.0.0 version: 6.0.0 '@types/node': - specifier: 20.2.5 - version: 20.2.5 + specifier: 20.12.3 + version: 20.12.3 '@types/prompts': specifier: 2.4.2 version: 2.4.2 @@ -1026,14 +1026,14 @@ importers: specifier: 1.3.4 version: 1.3.4 '@types/react': - specifier: 18.2.37 - version: 18.2.37 + specifier: 18.2.74 + version: 18.2.74 '@types/react-dom': - specifier: 18.2.15 - version: 18.2.15 + specifier: 18.2.23 + version: 18.2.23 '@types/react-is': - specifier: 17.0.3 - version: 17.0.3 + specifier: 18.2.4 + version: 18.2.4 '@types/semver': specifier: 7.3.1 version: 7.3.1 @@ -1243,7 +1243,7 @@ importers: version: 2.4.4(webpack@5.90.0) msw: specifier: 1.3.0 - version: 1.3.0(typescript@5.2.2) + version: 1.3.0(typescript@5.3.3) nanoid: specifier: 3.1.32 version: 3.1.32 @@ -3607,7 +3607,7 @@ packages: resolution: {integrity: sha512-W2P2c/VRW1/1tLox0mVUalvnWXxavmv/Oum2aPsRcoDJuob75FC3Y8FbpfLwUegRcxINtGUMPq0tFCvYNTBXNA==} dev: true - /@emotion/react@11.11.1(@types/react@18.2.37)(react@18.2.0): + /@emotion/react@11.11.1(@types/react@18.2.74)(react@18.2.0): resolution: {integrity: sha512-5mlW1DquU5HaxjLkfkGN1GA/fvVGdyHURRiX/0FHl2cfIfRxSOfmxEH5YS43edp0OldZrZ+dkBKbngxcNCdZvA==} peerDependencies: '@types/react': '*' @@ -3623,7 +3623,7 @@ packages: '@emotion/use-insertion-effect-with-fallbacks': 1.0.1(react@18.2.0) '@emotion/utils': 1.2.1 '@emotion/weak-memoize': 0.3.1 - '@types/react': 18.2.37 + '@types/react': 18.2.74 hoist-non-react-statics: 3.3.2 react: 18.2.0 dev: true @@ -4135,7 +4135,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.1.2 jest-message-util: 27.5.1 jest-util: 27.5.1 @@ -4147,7 +4147,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.1.2 jest-message-util: 29.7.0 jest-util: 29.7.0 @@ -4168,14 +4168,14 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 ansi-escapes: 4.3.2 chalk: 4.0.0 ci-info: 3.8.0 exit: 0.1.2 graceful-fs: 4.2.11 jest-changed-files: 29.7.0 - jest-config: 29.7.0(@types/node@20.2.5) + jest-config: 29.7.0(@types/node@20.12.3) jest-haste-map: 29.7.0 jest-message-util: 29.7.0 jest-regex-util: 29.6.3 @@ -4203,7 +4203,7 @@ packages: dependencies: '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-mock: 27.5.1 dev: true @@ -4213,7 +4213,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.5.0 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-mock: 29.7.0 dev: true @@ -4223,7 +4223,7 @@ packages: dependencies: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-mock: 29.7.0 dev: true @@ -4250,7 +4250,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@sinonjs/fake-timers': 8.1.0 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-message-util: 27.5.1 jest-mock: 27.5.1 jest-util: 27.5.1 @@ -4262,7 +4262,7 @@ packages: dependencies: '@jest/types': 29.5.0 '@sinonjs/fake-timers': 10.2.0 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4274,7 +4274,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@sinonjs/fake-timers': 10.2.0 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-message-util: 29.7.0 jest-mock: 29.7.0 jest-util: 29.7.0 @@ -4316,7 +4316,7 @@ packages: '@jest/transform': 29.7.0 '@jest/types': 29.6.3 '@jridgewell/trace-mapping': 0.3.19 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.1.2 collect-v8-coverage: 1.0.1 exit: 0.1.2 @@ -4475,7 +4475,7 @@ packages: dependencies: '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 '@types/yargs': 16.0.9 chalk: 4.1.2 @@ -4486,7 +4486,7 @@ packages: '@jest/schemas': 29.4.3 '@types/istanbul-lib-coverage': 2.0.3 '@types/istanbul-reports': 3.0.0 - '@types/node': 20.2.5 + '@types/node': 20.12.3 '@types/yargs': 17.0.10 chalk: 4.1.2 dev: true @@ -4498,7 +4498,7 @@ packages: '@jest/schemas': 29.6.3 '@types/istanbul-lib-coverage': 2.0.4 '@types/istanbul-reports': 3.0.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 '@types/yargs': 17.0.10 chalk: 4.0.0 dev: true @@ -5305,7 +5305,7 @@ packages: react: '>=16' dependencies: '@types/mdx': 2.0.3 - '@types/react': 18.2.37 + '@types/react': 18.2.74 react: 18.2.0 /@mswjs/cookies@0.2.2: @@ -5880,7 +5880,7 @@ packages: resolution: {integrity: sha512-ZNAy8z77ewKZ5LCX0KaUm4tWdgloWQ6FWJCh06qgahq/MH13sQefIPKSo0dBdPU3bcioltyZUcC0k8oHHfjvnQ==} dependencies: '@octokit/openapi-types': 4.0.2 - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@octokit/webhooks-methods@4.0.0: @@ -6661,7 +6661,7 @@ packages: chalk: 3.0.0 css.escape: 1.5.1 dom-accessibility-api: 0.5.13 - jest: 29.7.0(@types/node@20.2.5) + jest: 29.7.0(@types/node@20.12.3) lodash: 4.17.20 redent: 3.0.0 dev: true @@ -6675,7 +6675,7 @@ packages: dependencies: '@babel/runtime': 7.22.5 '@testing-library/dom': 8.20.0 - '@types/react-dom': 18.2.15 + '@types/react-dom': 18.2.23 react: 18.2.0 react-dom: 18.2.0(react@18.2.0) dev: true @@ -6703,7 +6703,7 @@ packages: /@types/amphtml-validator@1.0.0: resolution: {integrity: sha512-CJOi00fReT1JehItkgTZDI47v9WJxUH/OLX0XzkDgyEed7dGdeUQfXk5CTRM7N9FkHdv3klSjsZxo5sH1oTIGg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/aria-query@5.0.1: @@ -6777,7 +6777,7 @@ packages: resolution: {integrity: sha512-RoX2EZjMiFMjZh9lmYrwgoP9RTpAjSHiJxdp4oidAQVO02T7HER3xj9UKue5534ULWeqVEkujhWcyvUce+d68w==} dependencies: '@types/connect': 3.4.33 - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/btoa-lite@1.0.0: @@ -6791,7 +6791,7 @@ packages: /@types/cheerio@0.22.16: resolution: {integrity: sha512-bSbnU/D4yzFdzLpp3+rcDj0aQQMIRUBNJU7azPxdqMpnexjUSvGJyDuOBQBHeOZh1mMKgsJm6Dy+LLh80Ew4tQ==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/ci-info@2.0.0: @@ -6807,7 +6807,7 @@ packages: /@types/connect@3.4.33: resolution: {integrity: sha512-2+FrkXY4zllzTNfJth7jOqEHC+enpLeGslEhpnTAkg21GkRrWV4SsAtqchtT4YS9/nODBU2/ZfsBY2X4J/dX7A==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/content-disposition@0.5.4: @@ -6829,7 +6829,7 @@ packages: /@types/cross-spawn@6.0.0: resolution: {integrity: sha512-evp2ZGsFw9YKprDbg8ySgC9NA15g3YgiI8ANkGmKKvvi0P2aDGYLPxQIC5qfeKNUOe3TjABVGuah6omPRpIYhg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/debug@4.1.5: @@ -6875,7 +6875,7 @@ packages: /@types/express-serve-static-core@4.17.33: resolution: {integrity: sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 '@types/qs': 6.9.7 '@types/range-parser': 1.2.3 dev: true @@ -6891,7 +6891,7 @@ packages: /@types/fontkit@2.0.0: resolution: {integrity: sha512-Qe+6szpPLTNsqkDFs2MScJyB51d5Hpobyg/T0QoUWO53WuNOTNLsV8fkE4QQPOJbhOMN5wlwmNeDdsh/e6Uqdg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/fresh@0.5.0: @@ -6901,7 +6901,7 @@ packages: /@types/fs-extra@8.1.0: resolution: {integrity: sha512-UoOfVEzAUpeSPmjm7h1uk5MH6KZma2z2O7a75onTGjnNvAvMVrPzPL/vBbT65iIGHWj6rokwfmYcmxmlSf2uwg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/glob@7.1.1: @@ -6909,13 +6909,13 @@ packages: dependencies: '@types/events': 3.0.0 '@types/minimatch': 3.0.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/graceful-fs@4.1.9: resolution: {integrity: sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/hast@2.3.1: @@ -6926,13 +6926,13 @@ packages: /@types/html-validator@5.0.3: resolution: {integrity: sha512-QcKpR0cAWhLy7T3J24dwCuviRyS8xj/gVtFxcfZer9lfRgHdSAUFvE02nI/rsgIxSr71Z/2moXVYvWl2fTAzHQ==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/http-proxy@1.17.3: resolution: {integrity: sha512-wIPqXANye5BbORbuh74exbwNzj+UWCwWyeEFJzUQ7Fq3W2NSAy+7x7nX1fgbEypr2/TdKqpeuxLnXWgzN533/Q==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/inquirer@8.2.9: @@ -6986,7 +6986,7 @@ packages: /@types/jsdom@20.0.1: resolution: {integrity: sha512-d0r18sZPmMQr1eG35u12FZfhIXNrnsPU/g5wvRKCUf/tOGilKKwYMYGqh33BNR6ba+2gkHw1EUiHoN3mn7E5IQ==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 '@types/tough-cookie': 4.0.3 parse5: 7.1.2 dev: true @@ -7000,13 +7000,13 @@ packages: /@types/jsonwebtoken@9.0.0: resolution: {integrity: sha512-mM4TkDpA9oixqg1Fv2vVpOFyIVLJjm5x4k0V+K/rEsizfjD7Tk7LKk3GTtbB7KCfP0FEHQtsZqFxYA0+sijNVg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/keyv@3.1.1: resolution: {integrity: sha512-MPtoySlAZQ37VoLaPcTHCu1RWJ4llDkULYZIzOYxlhxBqYPB0RsRlmMU0R6tahtFe27mIdkHV+551ZWV4PLmVw==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/lodash.curry@4.1.6: @@ -7057,18 +7057,20 @@ packages: /@types/node-fetch@2.3.2: resolution: {integrity: sha512-yW0EOebSsQme9yKu09XbdDfle4/SmWZMK4dfteWcSLCYNQQcF+YOv0kIrvm+9pO11/ghA4E6A+RNQqvYj4Nr3A==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/node-fetch@2.6.1: resolution: {integrity: sha512-oMqjURCaxoSIsHSr1E47QHzbmzNR5rK8McHuNb11BOM9cHcIK3Avy0s/b2JlXHoQGTYS3NsvWzV1M0iK7l0wbA==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 form-data: 3.0.1 dev: true - /@types/node@20.2.5: - resolution: {integrity: sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==} + /@types/node@20.12.3: + resolution: {integrity: sha512-sD+ia2ubTeWrOu+YMF+MTAB7E+O7qsMqAbMfW7DG3K1URwhZ5hN1pLlRVGbf4wDFzSfikL05M17EyorS86jShw==} + dependencies: + undici-types: 5.26.5 /@types/normalize-package-data@2.4.0: resolution: {integrity: sha512-f5j5b/Gf71L+dbqxIpQ4Z2WlmI/mPJ0fOkGGmFgtb6sAu97EPczzbS3/tJKxmcYDj55OX6ssqwDAWOHIYDRDGA==} @@ -7103,7 +7105,7 @@ packages: /@types/prompts@2.4.2: resolution: {integrity: sha512-TwNx7qsjvRIUv/BCx583tqF5IINEVjCNqg9ofKHRlSoUHE62WBHrem4B1HGXcIrG511v29d1kJ9a/t2Esz7MIg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 kleur: 3.0.3 dev: true @@ -7122,23 +7124,22 @@ packages: resolution: {integrity: sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA==} dev: true - /@types/react-dom@18.2.15: - resolution: {integrity: sha512-HWMdW+7r7MR5+PZqJF6YFNSCtjz1T0dsvo/f1BV6HkV+6erD/nA7wd9NM00KVG83zf2nJ7uATPO9ttdIPvi3gg==} + /@types/react-dom@18.2.23: + resolution: {integrity: sha512-ZQ71wgGOTmDYpnav2knkjr3qXdAFu0vsk8Ci5w3pGAIdj7/kKAyn+VsQDhXsmzzzepAiI9leWMmubXz690AI/A==} dependencies: - '@types/react': 18.2.37 + '@types/react': 18.2.74 dev: true - /@types/react-is@17.0.3: - resolution: {integrity: sha512-aBTIWg1emtu95bLTLx0cpkxwGW3ueZv71nE2YFBpL8k/z5czEW8yYpOo8Dp+UUAFAtKwNaOsh/ioSeQnWlZcfw==} + /@types/react-is@18.2.4: + resolution: {integrity: sha512-wBc7HgmbCcrvw0fZjxbgz/xrrlZKzEqmABBMeSvpTvdm25u6KI6xdIi9pRE2G0C1Lw5ETFdcn4UbYZ4/rpqUYw==} dependencies: - '@types/react': 18.2.37 + '@types/react': 18.2.74 dev: true - /@types/react@18.2.37: - resolution: {integrity: sha512-RGAYMi2bhRgEXT3f4B92WTohopH6bIXw05FuGlmJEnv/omEn190+QYEIYxIAuIBdKgboYYdVved2p1AxZVQnaw==} + /@types/react@18.2.74: + resolution: {integrity: sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw==} dependencies: '@types/prop-types': 15.7.8 - '@types/scheduler': 0.16.4 csstype: 3.1.2 /@types/relay-runtime@14.1.13: @@ -7148,22 +7149,19 @@ packages: /@types/resolve@1.17.1: resolution: {integrity: sha512-yy7HuzQhj0dhGpD8RLXSZWEkLsV9ibvxvi6EiJ3bkqLAO1RGo0WbkWQiwpRlSFymTJRz0d3k5LM3kkx8ArDbLw==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/responselike@1.0.0: resolution: {integrity: sha512-85Y2BjiufFzaMIlvJDvTTB8Fxl2xfLo4HgmHzVBz08w4wDePCTjYw66PdrolO0kzli3yam/YCgRufyo1DdQVTA==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/retry@0.12.0: resolution: {integrity: sha512-wWKOClTTiizcZhXnPY4wikVAwmdYHp8q6DmC+EJUzAMsycb7HB32Kh9RN4+0gExjmPmZSAQjgURXIGATPegAvA==} dev: true - /@types/scheduler@0.16.4: - resolution: {integrity: sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==} - /@types/selenium-webdriver@4.0.15: resolution: {integrity: sha512-5760PIZkzhPejy3hsKAdCKe5LJygGdxLKOLxmZL9GEUcFlO5OgzM6G2EbdbvOnaw4xvUSa9Uip6Ipwkih12BPA==} dev: true @@ -7171,7 +7169,7 @@ packages: /@types/semver@7.3.1: resolution: {integrity: sha512-ooD/FJ8EuwlDKOI6D9HWxgIgJjMg2cuziXm/42npDC8y4NjxplBUn9loewZiBNCt44450lHAU0OSb51/UqXeag==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/semver@7.5.0: @@ -7186,7 +7184,7 @@ packages: resolution: {integrity: sha512-SCVCRRjSbpwoKgA34wK8cq14OUPu4qrKigO85/ZH6J04NGws37khLtq7YQr17zyOH01p4T5oy8e1TxEzql01Pg==} dependencies: '@types/mime': 2.0.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/serve-static@1.13.3: @@ -7199,13 +7197,13 @@ packages: /@types/set-cookie-parser@2.4.3: resolution: {integrity: sha512-7QhnH7bi+6KAhBB+Auejz1uV9DHiopZqu7LfR/5gZZTkejJV5nYeZZpgfFoE0N8aDsXuiYpfKyfyMatCwQhyTQ==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/sharp@0.29.3: resolution: {integrity: sha512-83Xp05eK2hvfNnmKLr2Fz0C2A0jrr2TnSLqKRbkLTYuAu+Erj6mKQLoEMGafE73Om8p3q3ryZxtHFM/7hy4Adg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/shell-quote@1.7.1: @@ -7226,7 +7224,7 @@ packages: /@types/tar@6.1.5: resolution: {integrity: sha512-qm2I/RlZij5RofuY7vohTpYNaYcrSQlN2MyjucQc7ZweDwaEWkdN/EeNh6e9zjK6uEm6PwjdMXkcj05BxZdX1Q==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 minipass: 4.2.8 dev: true @@ -7237,7 +7235,7 @@ packages: /@types/through@0.0.30: resolution: {integrity: sha512-FvnCJljyxhPM3gkRgWmxmDZyAQSiBQQWLI0A0VFL0K7W1oRUrPJSqNO0NvTnLkBcotdlp3lKvaT0JrnyRDkzOg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/tough-cookie@4.0.3: @@ -7266,7 +7264,7 @@ packages: /@types/webpack-sources@0.1.5: resolution: {integrity: sha512-zfvjpp7jiafSmrzJ2/i3LqOyTYTuJ7u1KOXlKgDlvsj9Rr0x7ZiYu5lZbXwobL7lmsRNtPXlBfmaUD8eU2Hu8w==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 '@types/source-list-map': 0.1.2 source-map: 0.6.1 dev: true @@ -7274,7 +7272,7 @@ packages: /@types/ws@8.2.0: resolution: {integrity: sha512-cyeefcUCgJlEk+hk2h3N+MqKKsPViQgF5boi9TTHSK+PoR9KWBb/C5ccPcDyAqgsbAYHTwulch725DV84+pSpg==} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /@types/yargs-parser@21.0.0: @@ -7295,10 +7293,10 @@ packages: resolution: {integrity: sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q==} requiresBuild: true dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 optional: true - /@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.56.0)(typescript@5.2.2): + /@typescript-eslint/eslint-plugin@6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -7310,10 +7308,10 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.5.1 - '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/scope-manager': 6.14.0 - '@typescript-eslint/type-utils': 6.14.0(eslint@8.56.0)(typescript@5.2.2) - '@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/type-utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.14.0 debug: 4.3.4 eslint: 8.56.0 @@ -7321,8 +7319,8 @@ packages: ignore: 5.2.4 natural-compare: 1.4.0 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.2.2) - typescript: 5.2.2 + ts-api-utils: 1.0.1(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true @@ -7348,7 +7346,7 @@ packages: - supports-color dev: false - /@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.2.2): + /@typescript-eslint/parser@6.14.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -7360,11 +7358,11 @@ packages: dependencies: '@typescript-eslint/scope-manager': 6.14.0 '@typescript-eslint/types': 6.14.0 - '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.14.0 debug: 4.3.4 eslint: 8.56.0 - typescript: 5.2.2 + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true @@ -7384,7 +7382,7 @@ packages: '@typescript-eslint/types': 6.14.0 '@typescript-eslint/visitor-keys': 6.14.0 - /@typescript-eslint/type-utils@6.14.0(eslint@8.56.0)(typescript@5.2.2): + /@typescript-eslint/type-utils@6.14.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-x6OC9Q7HfYKqjnuNu5a7kffIYs3No30isapRBJl1iCHLitD8O0lFbRcVGiOcuyN837fqXzPZ1NS10maQzZMKqw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -7394,12 +7392,12 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.2.2) - '@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3) + '@typescript-eslint/utils': 6.14.0(eslint@8.56.0)(typescript@5.3.3) debug: 4.3.4 eslint: 8.56.0 - ts-api-utils: 1.0.1(typescript@5.2.2) - typescript: 5.2.2 + ts-api-utils: 1.0.1(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true @@ -7413,7 +7411,7 @@ packages: resolution: {integrity: sha512-uty9H2K4Xs8E47z3SnXEPRNDfsis8JO27amp2GNCnzGETEW3yTqEIVg5+AI7U276oGF/tw6ZA+UesxeQ104ceA==} engines: {node: ^16.0.0 || >=18.0.0} - /@typescript-eslint/typescript-estree@5.62.0(typescript@5.2.2): + /@typescript-eslint/typescript-estree@5.62.0(typescript@5.3.3): resolution: {integrity: sha512-CmcQ6uY7b9y694lKdRB8FEel7JbU/40iSAPomu++SjLMntB+2Leay2LO6i8VnJk58MtE9/nQSFIH6jpyRWyYzA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -7428,8 +7426,8 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.3.7 - tsutils: 3.21.0(typescript@5.2.2) - typescript: 5.2.2 + tsutils: 3.21.0(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true @@ -7455,7 +7453,7 @@ packages: - supports-color dev: false - /@typescript-eslint/typescript-estree@6.14.0(typescript@5.2.2): + /@typescript-eslint/typescript-estree@6.14.0(typescript@5.3.3): resolution: {integrity: sha512-yPkaLwK0yH2mZKFE/bXkPAkkFgOv15GJAUzgUVonAbv0Hr4PK/N2yaA/4XQbTZQdygiDkpt5DkxPELqHguNvyw==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -7470,13 +7468,13 @@ packages: globby: 11.1.0 is-glob: 4.0.3 semver: 7.5.4 - ts-api-utils: 1.0.1(typescript@5.2.2) - typescript: 5.2.2 + ts-api-utils: 1.0.1(typescript@5.3.3) + typescript: 5.3.3 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@5.62.0(eslint@8.56.0)(typescript@5.2.2): + /@typescript-eslint/utils@5.62.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-n8oxjeb5aIbPFEtmQxQYOLI0i9n5ySBEY/ZEHHZqKQSFnxio1rv6dthascc9dLuwrL0RC5mPCxB7vnAVGAYWAQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: @@ -7487,7 +7485,7 @@ packages: '@types/semver': 7.5.6 '@typescript-eslint/scope-manager': 5.62.0 '@typescript-eslint/types': 5.62.0 - '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 5.62.0(typescript@5.3.3) eslint: 8.56.0 eslint-scope: 5.1.1 semver: 7.3.7 @@ -7496,7 +7494,7 @@ packages: - typescript dev: true - /@typescript-eslint/utils@6.14.0(eslint@8.56.0)(typescript@5.2.2): + /@typescript-eslint/utils@6.14.0(eslint@8.56.0)(typescript@5.3.3): resolution: {integrity: sha512-XwRTnbvRr7Ey9a1NT6jqdKX8y/atWG+8fAIu3z73HSP8h06i3r/ClMhmaF/RGWGW1tHJEwij1uEg2GbEmPYvYg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: @@ -7507,7 +7505,7 @@ packages: '@types/semver': 7.5.0 '@typescript-eslint/scope-manager': 6.14.0 '@typescript-eslint/types': 6.14.0 - '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.2.2) + '@typescript-eslint/typescript-estree': 6.14.0(typescript@5.3.3) eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: @@ -7716,7 +7714,7 @@ packages: dependencies: '@types/async-retry': 1.2.1 '@types/lru-cache': 4.1.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 async-retry: 1.2.3 lru-cache: 5.1.1 dev: true @@ -10052,7 +10050,7 @@ packages: sha.js: 2.4.11 dev: true - /create-jest@29.7.0(@types/node@20.2.5): + /create-jest@29.7.0(@types/node@20.12.3): resolution: {integrity: sha512-Adz2bdH0Vq3F53KEMJOoftQFutWCukm6J24wbPWRO4k1kMY7gS7ds/uoJkNuV8wDCtWWnuwGcJwpWcih+zEW1Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -10061,7 +10059,7 @@ packages: chalk: 4.1.2 exit: 0.1.2 graceful-fs: 4.2.11 - jest-config: 29.7.0(@types/node@20.2.5) + jest-config: 29.7.0(@types/node@20.12.3) jest-util: 29.7.0 prompts: 2.4.2 transitivePeerDependencies: @@ -11649,7 +11647,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.3.3) debug: 3.2.7 eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 @@ -11713,7 +11711,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/parser': 6.14.0(eslint@8.56.0)(typescript@5.3.3) array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 array.prototype.flat: 1.3.2 @@ -11738,7 +11736,7 @@ packages: - supports-color dev: true - /eslint-plugin-jest@27.6.3(@typescript-eslint/eslint-plugin@6.14.0)(eslint@8.56.0)(jest@29.7.0)(typescript@5.2.2): + /eslint-plugin-jest@27.6.3(@typescript-eslint/eslint-plugin@6.14.0)(eslint@8.56.0)(jest@29.7.0)(typescript@5.3.3): resolution: {integrity: sha512-+YsJFVH6R+tOiO3gCJon5oqn4KWc+mDq2leudk8mrp8RFubLOo9CVyi3cib4L7XMpxExmkmBZQTPDYVBzgpgOA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: @@ -11751,10 +11749,10 @@ packages: jest: optional: true dependencies: - '@typescript-eslint/eslint-plugin': 6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.56.0)(typescript@5.2.2) - '@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@5.2.2) + '@typescript-eslint/eslint-plugin': 6.14.0(@typescript-eslint/parser@6.14.0)(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 5.62.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 - jest: 29.7.0(@types/node@20.2.5) + jest: 29.7.0(@types/node@20.12.3) transitivePeerDependencies: - supports-color - typescript @@ -15159,7 +15157,7 @@ packages: '@jest/environment': 27.5.1 '@jest/test-result': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.0.0 co: 4.6.0 dedent: 0.7.0 @@ -15187,7 +15185,7 @@ packages: '@jest/expect': 29.7.0 '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.1.2 co: 4.6.0 dedent: 1.5.1 @@ -15208,7 +15206,7 @@ packages: - supports-color dev: true - /jest-cli@29.7.0(@types/node@20.2.5): + /jest-cli@29.7.0(@types/node@20.12.3): resolution: {integrity: sha512-OVVobw2IubN/GSYsxETi+gOe7Ka59EFMR/twOU3Jb2GnKKeMGJB5SGUUrEz3SFVmJASUdZUzy83sLNNQ2gZslg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -15222,10 +15220,10 @@ packages: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 chalk: 4.0.0 - create-jest: 29.7.0(@types/node@20.2.5) + create-jest: 29.7.0(@types/node@20.12.3) exit: 0.1.2 import-local: 3.0.2 - jest-config: 29.7.0(@types/node@20.2.5) + jest-config: 29.7.0(@types/node@20.12.3) jest-util: 29.7.0 jest-validate: 29.7.0 yargs: 17.5.1 @@ -15236,11 +15234,11 @@ packages: - ts-node dev: true - /jest-config@29.7.0(@types/node@20.2.5): + /jest-config@29.7.0(@types/node@20.12.3): resolution: {integrity: sha512-uXbpfeQ7R6TZBqI3/TxCU4q4ttk3u0PJeC+E0zbfSoSjq6bJ7buBPxzQPL0ifrkY4DNu4JUdk0ImlBUYi840eQ==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} peerDependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 ts-node: '>=9.0.0' peerDependenciesMeta: '@types/node': @@ -15251,7 +15249,7 @@ packages: '@babel/core': 7.22.5 '@jest/test-sequencer': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 babel-jest: 29.7.0(@babel/core@7.22.5) chalk: 4.1.2 ci-info: 3.8.0 @@ -15337,7 +15335,7 @@ packages: '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 '@types/jsdom': 20.0.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-mock: 29.7.0 jest-util: 29.7.0 jsdom: 20.0.3 @@ -15354,7 +15352,7 @@ packages: '@jest/environment': 27.5.1 '@jest/fake-timers': 27.5.1 '@jest/types': 27.5.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-mock: 27.5.1 jest-util: 27.5.1 dev: true @@ -15366,7 +15364,7 @@ packages: '@jest/environment': 29.7.0 '@jest/fake-timers': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-mock: 29.7.0 jest-util: 29.7.0 dev: true @@ -15380,7 +15378,7 @@ packages: jest: optional: true dependencies: - jest: 29.7.0(@types/node@20.2.5) + jest: 29.7.0(@types/node@20.12.3) jest-diff: 29.7.0 jest-get-type: 29.6.3 dev: true @@ -15400,7 +15398,7 @@ packages: dependencies: '@jest/types': 27.5.1 '@types/graceful-fs': 4.1.9 - '@types/node': 20.2.5 + '@types/node': 20.12.3 anymatch: 3.1.3 fb-watchman: 2.0.1 graceful-fs: 4.2.11 @@ -15420,7 +15418,7 @@ packages: dependencies: '@jest/types': 29.5.0 '@types/graceful-fs': 4.1.9 - '@types/node': 20.2.5 + '@types/node': 20.12.3 anymatch: 3.1.3 fb-watchman: 2.0.1 graceful-fs: 4.2.11 @@ -15439,7 +15437,7 @@ packages: dependencies: '@jest/types': 29.6.3 '@types/graceful-fs': 4.1.9 - '@types/node': 20.2.5 + '@types/node': 20.12.3 anymatch: 3.1.3 fb-watchman: 2.0.1 graceful-fs: 4.2.11 @@ -15532,7 +15530,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true /jest-mock@29.5.0: @@ -15540,7 +15538,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-util: 29.7.0 dev: true @@ -15549,7 +15547,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-util: 29.7.0 dev: true @@ -15641,7 +15639,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.1.2 emittery: 0.13.1 graceful-fs: 4.2.11 @@ -15702,7 +15700,7 @@ packages: '@jest/test-result': 29.7.0 '@jest/transform': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.1.2 cjs-module-lexer: 1.2.2 collect-v8-coverage: 1.0.1 @@ -15725,7 +15723,7 @@ packages: resolution: {integrity: sha512-jZCyo6iIxO1aqUxpuBlwTDMkzOAJS4a3eYz3YzgxxVQFwLeSA7Jfq5cbqCY+JLvTDrWirgusI/0KwxKMgrdf7w==} engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 graceful-fs: 4.2.11 dev: true @@ -15792,7 +15790,7 @@ packages: engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} dependencies: '@jest/types': 27.5.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.1.2 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -15804,7 +15802,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.5.0 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.0.0 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -15816,7 +15814,7 @@ packages: engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 chalk: 4.0.0 ci-info: 3.8.0 graceful-fs: 4.2.11 @@ -15853,7 +15851,7 @@ packages: dependencies: '@jest/test-result': 29.7.0 '@jest/types': 29.6.3 - '@types/node': 20.2.5 + '@types/node': 20.12.3 ansi-escapes: 4.3.2 chalk: 4.1.2 emittery: 0.13.1 @@ -15865,7 +15863,7 @@ packages: resolution: {integrity: sha512-KWYVV1c4i+jbMpaBC+U++4Va0cp8OisU185o73T1vo99hqi7w8tSJfUXYswwqqrjzwxa6KpRK54WhPvwf5w6PQ==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 merge-stream: 2.0.0 supports-color: 7.2.0 dev: true @@ -15874,7 +15872,7 @@ packages: resolution: {integrity: sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg==} engines: {node: '>= 10.13.0'} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -15882,7 +15880,7 @@ packages: resolution: {integrity: sha512-NcrQnevGoSp4b5kg+akIpthoAFHxPBcb5P6mYPY0fUNT+sSvmtu6jlkEle3anczUKIKEbMxFimk9oTP/tpIPgA==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 @@ -15892,13 +15890,13 @@ packages: resolution: {integrity: sha512-eIz2msL/EzL9UFTFFx7jBTkeZfku0yUAyZZZmJ93H2TYEiroIx2PQjEXcwYtYl8zXCxb+PAmA2hLIt/6ZEkPHw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 jest-util: 29.7.0 merge-stream: 2.0.0 supports-color: 8.1.1 dev: true - /jest@29.7.0(@types/node@20.2.5): + /jest@29.7.0(@types/node@20.12.3): resolution: {integrity: sha512-NIy3oAFp9shda19hy4HK0HRTWKtPJmGdnvywu01nOqNC2vZg+Z+fvJDxpMQA88eb2I9EcafcdjYgsDthnYTvGw==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} hasBin: true @@ -15911,7 +15909,7 @@ packages: '@jest/core': 29.7.0 '@jest/types': 29.6.3 import-local: 3.0.2 - jest-cli: 29.7.0(@types/node@20.2.5) + jest-cli: 29.7.0(@types/node@20.12.3) transitivePeerDependencies: - '@types/node' - babel-plugin-macros @@ -17916,7 +17914,7 @@ packages: isarray: 1.0.0 dev: true - /msw@1.3.0(typescript@5.2.2): + /msw@1.3.0(typescript@5.3.3): resolution: {integrity: sha512-nnWAZlQyQOKeYRblCpseT1kSPt1aF5e/jHz1hn/18IxbsMFreSVV1cJriT0uV+YG6+wvwFRMHXU3zVuMvuwERQ==} engines: {node: '>=14'} hasBin: true @@ -17945,7 +17943,7 @@ packages: path-to-regexp: 6.2.1 strict-event-emitter: 0.4.6 type-fest: 2.19.0 - typescript: 5.2.2 + typescript: 5.3.3 yargs: 17.5.1 transitivePeerDependencies: - encoding @@ -20837,7 +20835,7 @@ packages: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.1 - '@types/node': 20.2.5 + '@types/node': 20.12.3 long: 4.0.0 dev: true @@ -20856,7 +20854,7 @@ packages: '@protobufjs/path': 1.1.2 '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 - '@types/node': 20.2.5 + '@types/node': 20.12.3 long: 5.2.3 dev: true @@ -23960,13 +23958,13 @@ packages: typescript: 4.8.2 dev: false - /ts-api-utils@1.0.1(typescript@5.2.2): + /ts-api-utils@1.0.1(typescript@5.3.3): resolution: {integrity: sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.2.2 + typescript: 5.3.3 dev: true /tsconfig-paths@3.14.2: @@ -23987,7 +23985,7 @@ packages: strip-bom: 3.0.0 dev: true - /tsec@0.2.1(@bazel/bazelisk@1.18.0)(typescript@5.2.2): + /tsec@0.2.1(@bazel/bazelisk@1.18.0)(typescript@5.3.3): resolution: {integrity: sha512-RP9vhbRbRI9VH4CfOlQvo5W9HdfiPKq0gdiUOWI5oKmLaZKNFN8CsPwBfT5ySmhnKNwmmAS/BtY3WoTfABwwig==} hasBin: true peerDependencies: @@ -23997,7 +23995,7 @@ packages: '@bazel/bazelisk': 1.18.0 glob: 7.1.7 minimatch: 3.1.2 - typescript: 5.2.2 + typescript: 5.3.3 dev: true /tslib@1.11.1: @@ -24026,14 +24024,14 @@ packages: /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - /tsutils@3.21.0(typescript@5.2.2): + /tsutils@3.21.0(typescript@5.3.3): resolution: {integrity: sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==} engines: {node: '>= 6'} peerDependencies: typescript: '>=2.8.0 || >= 3.2.0-dev || >= 3.3.0-dev || >= 3.4.0-dev || >= 3.5.0-dev || >= 3.6.0-dev || >= 3.6.0-beta || >= 3.7.0-dev || >= 3.7.0-beta' dependencies: tslib: 1.14.1 - typescript: 5.2.2 + typescript: 5.3.3 dev: true /tty-browserify@0.0.1: @@ -24238,8 +24236,8 @@ packages: engines: {node: '>=4.2.0'} hasBin: true - /typescript@5.2.2: - resolution: {integrity: sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==} + /typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -24276,6 +24274,9 @@ packages: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + /undici@5.26.3: resolution: {integrity: sha512-H7n2zmKEWgOllKkIUkLvFmsJQj062lSm3uA4EYApG8gLuiOM0/go9bIoC3HVaSnfg4xunowDE2i9p8drkXuvDw==} engines: {node: '>=14.0'} @@ -25548,7 +25549,7 @@ packages: name: '@vercel/turbopack-ecmascript-runtime' version: 0.0.0 dependencies: - '@types/node': 20.2.5 + '@types/node': 20.12.3 dev: true github.com/watson/ci-info/f43f6a1cefff47fb361c88cf4b943fdbcaafe540: diff --git a/test/development/basic/next-rs-api.test.ts b/test/development/basic/next-rs-api.test.ts index 04cde12ede..ce1137a931 100644 --- a/test/development/basic/next-rs-api.test.ts +++ b/test/development/basic/next-rs-api.test.ts @@ -1,5 +1,5 @@ import { NextInstance, createNext } from 'e2e-utils' -import { trace } from 'next/src/trace' +import { trace } from 'next/dist/trace' import { PHASE_DEVELOPMENT_SERVER } from 'next/constants' import { createDefineEnv, @@ -11,8 +11,8 @@ import { StyledString, TurbopackResult, UpdateInfo, -} from 'next/src/build/swc' -import loadConfig from 'next/src/server/config' +} from 'next/dist/build/swc' +import loadConfig from 'next/dist/server/config' import path from 'path' function normalizePath(path: string) { diff --git a/test/e2e/ignore-invalid-popstateevent/with-i18n.test.ts b/test/e2e/ignore-invalid-popstateevent/with-i18n.test.ts index abfd106292..a5a3e7bd35 100644 --- a/test/e2e/ignore-invalid-popstateevent/with-i18n.test.ts +++ b/test/e2e/ignore-invalid-popstateevent/with-i18n.test.ts @@ -4,7 +4,7 @@ import { NextInstance } from 'e2e-utils' import { check, waitFor } from 'next-test-utils' import webdriver, { BrowserInterface } from 'next-webdriver' -import type { HistoryState } from '../../../packages/next/src/shared/lib/router/router' +import type { HistoryState } from 'next/dist/shared/lib/router/router' const emitPopsStateEvent = (browser: BrowserInterface, state: HistoryState) => browser.eval( diff --git a/test/e2e/ignore-invalid-popstateevent/without-i18n.test.ts b/test/e2e/ignore-invalid-popstateevent/without-i18n.test.ts index eb44628ae0..0009b7cf2c 100644 --- a/test/e2e/ignore-invalid-popstateevent/without-i18n.test.ts +++ b/test/e2e/ignore-invalid-popstateevent/without-i18n.test.ts @@ -4,7 +4,7 @@ import { NextInstance } from 'e2e-utils' import { check, waitFor } from 'next-test-utils' import webdriver, { BrowserInterface } from 'next-webdriver' -import type { HistoryState } from '../../../packages/next/src/shared/lib/router/router' +import type { HistoryState } from 'next/dist/shared/lib/router/router' const emitPopsStateEvent = (browser: BrowserInterface, state: HistoryState) => browser.eval( diff --git a/test/lib/e2e-utils.ts b/test/lib/e2e-utils.ts index d87e94f79c..76e323f0d6 100644 --- a/test/lib/e2e-utils.ts +++ b/test/lib/e2e-utils.ts @@ -1,6 +1,6 @@ import path from 'path' import assert from 'assert' -import { flushAllTraces, setGlobal, trace } from 'next/src/trace' +import { flushAllTraces, setGlobal, trace } from 'next/dist/trace' import { PHASE_DEVELOPMENT_SERVER } from 'next/constants' import { NextInstance, NextInstanceOpts } from './next-modes/base' import { NextDevInstance } from './next-modes/next-dev' diff --git a/test/lib/next-modes/base.ts b/test/lib/next-modes/base.ts index ec50125d51..77adb45783 100644 --- a/test/lib/next-modes/base.ts +++ b/test/lib/next-modes/base.ts @@ -6,7 +6,7 @@ import type { NextConfig } from 'next' import { FileRef, isNextDeploy, isNextDev } from '../e2e-utils' import { ChildProcess } from 'child_process' import { createNextInstall } from '../create-next-install' -import { Span } from 'next/src/trace' +import { Span } from 'next/dist/trace' import webdriver from '../next-webdriver' import { renderViaHTTP, fetchViaHTTP, waitFor } from 'next-test-utils' import cheerio from 'cheerio' diff --git a/test/lib/next-modes/next-deploy.ts b/test/lib/next-modes/next-deploy.ts index a2e0517c3e..b4153331e8 100644 --- a/test/lib/next-modes/next-deploy.ts +++ b/test/lib/next-modes/next-deploy.ts @@ -9,7 +9,7 @@ import { TEST_TOKEN, } from '../../../scripts/reset-project.mjs' import fetch from 'node-fetch' -import { Span } from 'next/src/trace' +import { Span } from 'next/dist/trace' export class NextDeployInstance extends NextInstance { private _cliOutput: string diff --git a/test/lib/next-modes/next-dev.ts b/test/lib/next-modes/next-dev.ts index 3d206ed8b8..c832480239 100644 --- a/test/lib/next-modes/next-dev.ts +++ b/test/lib/next-modes/next-dev.ts @@ -1,5 +1,5 @@ import spawn from 'cross-spawn' -import { Span } from 'next/src/trace' +import { Span } from 'next/dist/trace' import { NextInstance } from './base' import { getTurbopackFlag } from '../turbo' import stripAnsi from 'strip-ansi' diff --git a/test/lib/next-modes/next-start.ts b/test/lib/next-modes/next-start.ts index 6710255b50..801d69f3e4 100644 --- a/test/lib/next-modes/next-start.ts +++ b/test/lib/next-modes/next-start.ts @@ -2,7 +2,7 @@ import path from 'path' import fs from 'fs-extra' import { NextInstance } from './base' import spawn from 'cross-spawn' -import { Span } from 'next/src/trace' +import { Span } from 'next/dist/trace' import stripAnsi from 'strip-ansi' export class NextStartInstance extends NextInstance { diff --git a/test/tsconfig.json b/test/tsconfig.json deleted file mode 100644 index 1e198fbb8d..0000000000 --- a/test/tsconfig.json +++ /dev/null @@ -1,6 +0,0 @@ -// Make development mode typescript module resolving and jsx parsing correct for all tests. -// We want to apply the compiler options to the testing app, but we don't want to do strict type checking for them. -// e.g. testing app could have import a from '3rd-lib-nextjs-ws-doesnt-have' -{ - "extends": "../tsconfig.base.json" -} diff --git a/test/unit/cssnano-simple/cssnano-simple/basic.test.ts b/test/unit/cssnano-simple/cssnano-simple/basic.test.ts index f53bb61164..b3d38e060f 100644 --- a/test/unit/cssnano-simple/cssnano-simple/basic.test.ts +++ b/test/unit/cssnano-simple/cssnano-simple/basic.test.ts @@ -1,6 +1,6 @@ import postcss from 'postcss' -import mod from 'next/src/bundles/cssnano-simple/index' +import mod from 'next/dist/compiled/cssnano-simple/index' import css from '../noop-template' describe('basic test', () => { diff --git a/test/unit/cssnano-simple/cssnano-simple/exclude-all.test.ts b/test/unit/cssnano-simple/cssnano-simple/exclude-all.test.ts index bddd196dc0..9805572cb3 100644 --- a/test/unit/cssnano-simple/cssnano-simple/exclude-all.test.ts +++ b/test/unit/cssnano-simple/cssnano-simple/exclude-all.test.ts @@ -1,6 +1,6 @@ import postcss from 'postcss' -import mod from 'next/src/bundles/cssnano-simple/index' +import mod from 'next/dist/compiled/cssnano-simple/index' import css from '../noop-template' describe('exclude all test', () => { diff --git a/test/unit/cssnano-simple/cssnano-simple/plugin-config.test.ts b/test/unit/cssnano-simple/cssnano-simple/plugin-config.test.ts index d81657a982..8c103205c3 100644 --- a/test/unit/cssnano-simple/cssnano-simple/plugin-config.test.ts +++ b/test/unit/cssnano-simple/cssnano-simple/plugin-config.test.ts @@ -1,6 +1,6 @@ import postcss from 'postcss' -import mod from 'next/src/bundles/cssnano-simple/index' +import mod from 'next/dist/compiled/cssnano-simple' import css from '../noop-template' describe('accepts plugin configuration', () => { diff --git a/test/unit/web-runtime/next-request.test.ts b/test/unit/web-runtime/next-request.test.ts index 8e1d6549d2..deedeb6b38 100644 --- a/test/unit/web-runtime/next-request.test.ts +++ b/test/unit/web-runtime/next-request.test.ts @@ -3,7 +3,7 @@ */ import { expectTypeOf } from 'expect-type' -import { NextRequest } from 'next/src/server/web/spec-extension/request' +import { NextRequest } from 'next/dist/server/web/spec-extension/request' it('should have 1 required parameter for constructor', () => { expect(NextRequest.length).toBe(1) diff --git a/test/unit/web-runtime/next-response-cookies.test.ts b/test/unit/web-runtime/next-response-cookies.test.ts index d98853198c..838c453509 100644 --- a/test/unit/web-runtime/next-response-cookies.test.ts +++ b/test/unit/web-runtime/next-response-cookies.test.ts @@ -2,7 +2,7 @@ * @jest-environment @edge-runtime/jest-environment */ -import { NextResponse } from 'next/src/server/web/spec-extension/response' +import { NextResponse } from 'next/dist/server/web/spec-extension/response' it('reflect .set into `set-cookie`', async () => { const response = new NextResponse() diff --git a/test/unit/web-runtime/next-response.test.ts b/test/unit/web-runtime/next-response.test.ts index b7689f1426..f37f4a7d37 100644 --- a/test/unit/web-runtime/next-response.test.ts +++ b/test/unit/web-runtime/next-response.test.ts @@ -2,7 +2,7 @@ * @jest-environment @edge-runtime/jest-environment */ -import { NextResponse } from 'next/src/server/web/spec-extension/response' +import { NextResponse } from 'next/dist/server/web/spec-extension/response' const toJSON = async (response: Response) => ({ body: await response.json(),