Skip to content

Commit

Permalink
Merge branch 'canary' into feedthejim/fix-import-map
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] authored Sep 18, 2023
2 parents 5b80027 + 1105501 commit e24481f
Show file tree
Hide file tree
Showing 37 changed files with 113 additions and 92 deletions.
4 changes: 1 addition & 3 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@ body:
- Ask a question on the [Next.js Discord](https://discord.com/invite/nextjs) server
- type: input
attributes:
label: Link to the code that reproduces this issue or a replay of the bug
label: Link to the code that reproduces this issue
description: |
A link to a **public** [GitHub repository](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) or a [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template) minimal reproduction. Minimal reproductions should be created from our [bug report template with `npx create-next-app -e reproduction-template`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) and should include only changes that contribute to the issue. To report a Pages Router related issue, you can use these templates: [`npx create-next-app -e reproduction-template-pages`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-pages) or [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template-pages)
If a minimal reproduction can't be created, please share a [replay](https://www.replay.io/) of the bug which doesn't require sharing a private repo.
**Skipping this/providing an invalid link will result in the issue being closed**
placeholder: 'https://github.com/user/my-minimal-nextjs-issue-reproduction'
validations:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/issue-validator/repro-link/index.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .github/actions/issue-validator/repro-link/invalid-link.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ We could not detect a valid reproduction link. **Make sure to follow the bug rep

To be able to investigate, we need access to a reproduction to identify what triggered the issue. We need a link to a **public** GitHub repository ([template for App Router](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template), [template for Pages Router](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-pages)), but you can also use these templates: [CodeSandbox: App Router](https://codesandbox.io/s/github/vercel/next.js/tree/canary/examples/reproduction-template) or [CodeSandbox: Pages Router](https://codesandbox.io/s/github/vercel/next.js/tree/canary/examples/reproduction-template-pages).

The bug template that you filled out has a section called "Link to the code that reproduces this issue or a replay of the bug", which is where you should provide the link to the reproduction.
The bug template that you filled out has a section called "Link to the code that reproduces this issue", which is where you should provide the link to the reproduction.

- If you did not provide a link or the link you provided is not valid, we will close the issue.
- If you provide a link to a private repository, we will close the issue.
Expand Down
8 changes: 2 additions & 6 deletions .github/actions/issue-validator/src/repro-link.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ async function run() {

// https://github.com/vercel/next.js/blob/canary/.github/ISSUE_TEMPLATE/1.bug_report.yml?plain=1

const start =
'### Link to the code that reproduces this issue or a replay of the bug'
const start = '### Link to the code that reproduces this issue'
const end = '### To Reproduce'
const linkRe = new RegExp(`${start}(.*)${end}`, 'is')
const match = issue_body.match(linkRe)?.[1]?.trim()
Expand Down Expand Up @@ -78,10 +77,7 @@ async function hasRepro(link) {
if (!link) return false
try {
const url = new URL(link)
if (
!['github.com', 'codesandbox.io', 'app.replay.io'].includes(url.hostname)
)
return false
if (!['github.com', 'codesandbox.io'].includes(url.hostname)) return false
const { status } = await fetch(link)
// Verify that it's not a private repo/sandbox
// We allow 500, in case it's downtime on one of the services
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ jobs:
build: >-
set -e &&
apt update &&
apt install -y pkg-config xz-utils &&
apt install -y pkg-config xz-utils dav1d libdav1d-dev &&
rustup toolchain install "${RUST_TOOLCHAIN}" &&
rustup default "${RUST_TOOLCHAIN}" &&
rustup target add x86_64-unknown-linux-gnu &&
Expand All @@ -177,7 +177,7 @@ jobs:
build: >-
set -e &&
apk update &&
apk add --no-cache libc6-compat pkgconfig &&
apk add --no-cache libc6-compat pkgconfig dav1d libdav1d dav1d-dev &&
rustup toolchain install "${RUST_TOOLCHAIN}" &&
rustup default "${RUST_TOOLCHAIN}" &&
rustup target add x86_64-unknown-linux-musl &&
Expand All @@ -196,7 +196,7 @@ jobs:
build: >-
set -e &&
apt update &&
apt install -y pkg-config xz-utils &&
apt install -y pkg-config xz-utils dav1d libdav1d-dev &&
export JEMALLOC_SYS_WITH_LG_PAGE=16 &&
rustup toolchain install "${RUST_TOOLCHAIN}" &&
rustup default "${RUST_TOOLCHAIN}" &&
Expand All @@ -218,7 +218,7 @@ jobs:
build: >-
set -e &&
apk update &&
apk add --no-cache libc6-compat pkgconfig &&
apk add --no-cache libc6-compat pkgconfig dav1d libdav1d dav1d-dev &&
export JEMALLOC_SYS_WITH_LG_PAGE=16 &&
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" &&
rustup toolchain install "${RUST_TOOLCHAIN}" &&
Expand Down
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.4.20-canary.36"
"version": "13.4.20-canary.37"
}
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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"description": "ESLint configuration used by Next.js.",
"main": "index.js",
"license": "MIT",
Expand All @@ -10,7 +10,7 @@
},
"homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config",
"dependencies": {
"@next/eslint-plugin-next": "13.4.20-canary.36",
"@next/eslint-plugin-next": "13.4.20-canary.37",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/next-swc/crates/napi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ native-tls = ["next-dev/native-tls"]
rustls-tls = ["next-dev/rustls-tls"]
serializable = ["next-dev/serializable"]
image-webp = ["next-core/image-webp"]
image-avif = ["next-core/image-avif"]
# Enable all the available image codec support.
# Currently this is identical to `image-webp`, as we are not able to build
# other codecs easily yet.
image-extended = [
"image-webp",
]

# Enable dhat profiling allocator for heap profiling.
__internal_dhat-heap = ["dhat"]
Expand Down
1 change: 1 addition & 0 deletions packages/next-swc/crates/next-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ native-tls = ["turbopack-binding/__turbo_tasks_fetch_native-tls"]
rustls-tls = ["turbopack-binding/__turbo_tasks_fetch_rustls-tls"]
plugin = ["turbopack-binding/__swc_core_binding_napi_plugin"]
image-webp = ["turbopack-binding/__turbopack_image_webp"]
image-avif = ["turbopack-binding/__turbopack_image_avif"]

# enable "HMR" for embedded assets
dynamic_embed_contents = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,16 @@ pub fn get_next_image_rule() -> ModuleRule {
ModuleRuleCondition::ResourcePathEndsWith(".jpg".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".jpeg".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".png".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".webp".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".avif".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".apng".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".gif".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".svg".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".bmp".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".ico".to_string()),
// These images may not be encoded by turbopack depends on the feature availability
// As turbopack-image returns raw bytes if compile time codec support is not enabled:
// ref:https://github.com/vercel/turbo/pull/5967
ModuleRuleCondition::ResourcePathEndsWith(".webp".to_string()),
ModuleRuleCondition::ResourcePathEndsWith(".avif".to_string()),
]),
vec![ModuleRuleEffect::ModuleType(ModuleType::Custom(
Vc::upcast(StructuredImageModuleType::new(Value::new(
Expand Down
6 changes: 3 additions & 3 deletions packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "@next/swc",
"version": "13.4.20-canary.36",
"version": "13.4.20-canary.37",
"private": true,
"scripts": {
"clean": "node ../../scripts/rm.mjs native",
"build-native": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features plugin,rustls-tls,image-webp --js false native",
"build-native-release": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --features plugin,rustls-tls,image-webp,tracing/release_max_level_info --js false native",
"build-native": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features plugin,rustls-tls,image-extended --js false native",
"build-native-release": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --features plugin,rustls-tls,image-extended,tracing/release_max_level_info --js false native",
"build-native-no-plugin": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --features image-webp --js false native",
"build-native-no-plugin-woa": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --cargo-flags=--no-default-features --features native-tls,image-webp --js false native",
"build-native-no-plugin-woa-release": "napi build --platform -p next-swc-napi --cargo-cwd ../../ --cargo-name next_swc_napi --release --cargo-flags=--no-default-features --features native-tls,image-webp,tracing/release_max_level_info --js false 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.4.20-canary.36",
"version": "13.4.20-canary.37",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -90,7 +90,7 @@
]
},
"dependencies": {
"@next/env": "13.4.20-canary.36",
"@next/env": "13.4.20-canary.37",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -145,11 +145,11 @@
"@mswjs/interceptors": "0.23.0",
"@napi-rs/cli": "2.16.2",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "13.4.20-canary.36",
"@next/polyfill-nomodule": "13.4.20-canary.36",
"@next/react-dev-overlay": "13.4.20-canary.36",
"@next/react-refresh-utils": "13.4.20-canary.36",
"@next/swc": "13.4.20-canary.36",
"@next/polyfill-module": "13.4.20-canary.37",
"@next/polyfill-nomodule": "13.4.20-canary.37",
"@next/react-dev-overlay": "13.4.20-canary.37",
"@next/react-refresh-utils": "13.4.20-canary.37",
"@next/swc": "13.4.20-canary.37",
"@opentelemetry/api": "1.4.1",
"@playwright/test": "^1.35.1",
"@segment/ajv-human-errors": "2.1.2",
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.4.20-canary.36",
"version": "13.4.20-canary.37",
"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.4.20-canary.36",
"version": "13.4.20-canary.37",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/third-parties/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/third-parties",
"version": "13.4.20-canary.36",
"version": "13.4.20-canary.37",
"private": true,
"repository": {
"url": "vercel/next.js",
Expand All @@ -23,7 +23,7 @@
"third-party-capital": "1.0.20"
},
"devDependencies": {
"next": "13.4.20-canary.36",
"next": "13.4.20-canary.37",
"outdent": "0.8.0",
"prettier": "2.5.1"
},
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion test/development/basic/barrel-optimization.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { join } from 'path'
import { createNext, FileRef } from 'e2e-utils'
import { NextInstance } from 'test/lib/next-modes/base'
import { shouldRunTurboDevTest } from '../../lib/next-test-utils'

describe('optimizePackageImports', () => {
let next: NextInstance
Expand All @@ -27,7 +28,9 @@ describe('optimizePackageImports', () => {
scripts: {
setup: `cp -r ./node_modules_bak/* ./node_modules`,
build: `yarn setup && next build`,
dev: `yarn setup && next dev`,
dev: `yarn setup && next ${
shouldRunTurboDevTest() ? 'dev --turbo' : 'dev'
}`,
start: 'next start',
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
import { createNextDescribe } from 'e2e-utils'
import https from 'https'
import { renderViaHTTP } from 'next-test-utils'
import { renderViaHTTP, shouldRunTurboDevTest } from 'next-test-utils'

createNextDescribe(
'experimental-https-server (generated certificate)',
{
files: __dirname,
startCommand: 'yarn next dev --experimental-https',
startCommand: `yarn next ${
shouldRunTurboDevTest() ? 'dev --turbo' : 'dev'
} --experimental-https`,
skipStart: !process.env.CI,
},
({ next }) => {
Expand Down
Loading

0 comments on commit e24481f

Please sign in to comment.