Skip to content

Commit

Permalink
Merge branch 'canary' into nabsul/typo/fetchType
Browse files Browse the repository at this point in the history
  • Loading branch information
nabsul authored Apr 21, 2023
2 parents 2ff1c8d + e952160 commit 6c531b9
Show file tree
Hide file tree
Showing 46 changed files with 141 additions and 360 deletions.
77 changes: 15 additions & 62 deletions examples/with-mux-video/public/mux.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "13.3.1-canary.15"
"version": "13.3.1-canary.17"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
"@next/eslint-plugin-next": "13.3.1-canary.15",
"@next/eslint-plugin-next": "13.3.1-canary.17",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.0",
"eslint-import-resolver-node": "^0.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"description": "ESLint plugin for NextJS.",
"main": "dist/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/font",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"private": true,
"scripts": {
"clean": "rm -rf ./native/*",
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -81,7 +81,7 @@
]
},
"dependencies": {
"@next/env": "13.3.1-canary.15",
"@next/env": "13.3.1-canary.17",
"@swc/helpers": "0.5.0",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -140,11 +140,11 @@
"@jest/types": "29.5.0",
"@napi-rs/cli": "2.14.7",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "13.3.1-canary.15",
"@next/polyfill-nomodule": "13.3.1-canary.15",
"@next/react-dev-overlay": "13.3.1-canary.15",
"@next/react-refresh-utils": "13.3.1-canary.15",
"@next/swc": "13.3.1-canary.15",
"@next/polyfill-module": "13.3.1-canary.17",
"@next/polyfill-nomodule": "13.3.1-canary.17",
"@next/react-dev-overlay": "13.3.1-canary.17",
"@next/react-refresh-utils": "13.3.1-canary.17",
"@next/swc": "13.3.1-canary.17",
"@opentelemetry/api": "1.4.1",
"@segment/ajv-human-errors": "2.1.2",
"@taskr/clear": "1.1.0",
Expand Down
13 changes: 6 additions & 7 deletions packages/next/src/build/analysis/get-page-static-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ function warnAboutUnsupportedValue(
* Related discussion: https://github.com/vercel/next.js/discussions/34179
*/
export async function getPageStaticInfo(params: {
nextConfig: Partial<NextConfig>
pageFilePath: string
nextConfig: Partial<NextConfig>
isDev?: boolean
page?: string
pageType: 'pages' | 'app' | 'root'
Expand Down Expand Up @@ -382,11 +382,10 @@ export async function getPageStaticInfo(params: {

const isAnAPIRoute = isAPIRoute(page?.replace(/^(?:\/src)?\/pages\//, '/'))

resolvedRuntime = isEdgeRuntime(resolvedRuntime)
? resolvedRuntime
: requiresServerRuntime
? resolvedRuntime || nextConfig.experimental?.runtime
: undefined
resolvedRuntime =
isEdgeRuntime(resolvedRuntime) || requiresServerRuntime
? resolvedRuntime
: undefined

if (resolvedRuntime === SERVER_RUNTIME.experimentalEdge) {
warnAboutExperimentalEdge(isAnAPIRoute ? page! : null)
Expand Down Expand Up @@ -425,6 +424,6 @@ export async function getPageStaticInfo(params: {
ssr: false,
ssg: false,
rsc: RSC_MODULE_TYPES.server,
runtime: nextConfig.experimental?.runtime,
runtime: undefined,
}
}
5 changes: 4 additions & 1 deletion packages/next/src/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,10 @@ export default async function getBaseWebpackConfig(
const enableTypedRoutes = !!config.experimental.typedRoutes && hasAppDir

if (isClient) {
if (isEdgeRuntime(config.experimental.runtime)) {
if (
// @ts-expect-error: experimental.runtime is deprecated
isEdgeRuntime(config.experimental.runtime)
) {
Log.warn(
'You are using `experimental.runtime` which was removed. Check https://nextjs.org/docs/api-routes/edge-api-routes on how to use edge runtime.'
)
Expand Down
6 changes: 0 additions & 6 deletions packages/next/src/server/config-schema.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { NextConfig } from './config'
import type { JSONSchemaType } from 'ajv'
import { VALID_LOADERS } from '../shared/lib/image-config'
import { SERVER_RUNTIME } from '../lib/constants'

const configSchema = {
type: 'object',
Expand Down Expand Up @@ -373,11 +372,6 @@ const configSchema = {
minimum: 0,
type: 'number',
},
runtime: {
// automatic typing doesn't like enum
enum: Object.values(SERVER_RUNTIME) as any,
type: 'string',
},
serverComponentsExternalPackages: {
items: {
type: 'string',
Expand Down
3 changes: 0 additions & 3 deletions packages/next/src/server/config-shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
ImageConfigComplete,
imageConfigDefault,
} from '../shared/lib/image-config'
import { ServerRuntime } from 'next/types'
import { SubresourceIntegrityAlgorithm } from '../build/webpack/plugins/subresource-integrity-plugin'
import { WEB_VITALS } from '../shared/lib/utils'
import type { NextParsedUrlQuery } from './request-meta'
Expand Down Expand Up @@ -195,7 +194,6 @@ export interface ExperimentalConfig {
craCompat?: boolean
esmExternals?: boolean | 'loose'
isrMemoryCacheSize?: number
runtime?: Exclude<ServerRuntime, undefined>
fullySpecified?: boolean
urlImports?: NonNullable<webpack.Configuration['experiments']>['buildHttp']
outputFileTracingRoot?: string
Expand Down Expand Up @@ -662,7 +660,6 @@ export const defaultConfig: NextConfig = {
fetchCacheKeyPrefix: '',
middlewarePrefetch: 'flexible',
optimisticClientCache: true,
runtime: undefined,
manualClientBasePath: false,
legacyBrowsers: false,
newNextLinkBehavior: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/react-dev-overlay",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"description": "A development-only overlay for developing React applications.",
"repository": {
"url": "vercel/next.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-refresh-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/react-refresh-utils",
"version": "13.3.1-canary.15",
"version": "13.3.1-canary.17",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down
Loading

0 comments on commit 6c531b9

Please sign in to comment.