Skip to content

Commit

Permalink
Merge branch 'canary' into chore/upgrade-jest
Browse files Browse the repository at this point in the history
  • Loading branch information
balazsorban44 committed Oct 18, 2023
2 parents fc115a0 + 2c8606e commit 2d4162b
Show file tree
Hide file tree
Showing 141 changed files with 4,128 additions and 3,228 deletions.
2 changes: 1 addition & 1 deletion .github/actions/next-stats-action/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN apt install unzip wget curl nano htop screen build-essential pkg-config libs

RUN ln $(which python3) /usr/bin/python

RUN curl -sfLS https://install-node.vercel.app/v18.18.2 | bash -s -- -f
RUN curl -sfLS https://install-node.vercel.app/v18.17.0 | bash -s -- -f
RUN corepack enable

WORKDIR /next-stats
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/next-stats-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"typescript": "5.1.6"
},
"engines": {
"node": ">=18.18.2",
"node": ">=18.17.0",
"pnpm": "8.9.0"
},
"packageManager": "pnpm@8.9.0"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ jobs:
group: [1, 2, 3, 4, 5]
uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 18.17.0
skipForDocsOnly: 'yes'
afterBuild: RUST_BACKTRACE=0 NEXT_EXTERNAL_TESTS_FILTERS="$(pwd)/test/turbopack-tests-manifest.json" TURBOPACK=1 node run-tests.js --timings -g ${{ matrix.group }}/5 -c ${TEST_CONCURRENCY} --type integration
secrets: inherit
Expand Down Expand Up @@ -211,7 +211,7 @@ jobs:

uses: ./.github/workflows/build_reusable.yml
with:
nodeVersion: 18.18.2
nodeVersion: 18.17.0
skipForDocsOnly: 'yes'
afterBuild: node run-tests.js --timings -g ${{ matrix.group }}/12 -c ${TEST_CONCURRENCY} --type integration
secrets: inherit
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ pr:
variables:
PNPM_CACHE_FOLDER: $(Pipeline.Workspace)/.pnpm-store
NEXT_TELEMETRY_DISABLED: '1'
node_version: ^18.18.2
node_version: ^18.17.0

stages:
- stage: Test
Expand Down
44 changes: 23 additions & 21 deletions docs/02-app/02-api-reference/01-components/image.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,24 +40,24 @@ export default function Page() {
Here's a summary of the props available for the Image Component:

<div style={{ overflowX: 'auto', width: '100%' }}>
| Prop | Example | Type | Required |
| ----------------------------------------- | ------------------------------------ | --------------- | -------- |
| [`src`](#src) | `src="/profile.png"` | String | Yes |
| [`width`](#width) | `width={500}` | Integer (px) | Yes |
| [`height`](#height) | `height={500}` | Integer (px) | Yes |
| [`alt`](#alt) | `alt="Picture of the author"` | String | Yes |
| [`loader`](#loader) | `loader={imageLoader}` | Function | - |
| [`fill`](#fill) | `fill={true}` | Boolean | - |
| [`sizes`](#sizes) | `sizes="(max-width: 768px) 100vw"` | String | - |
| [`quality`](#quality) | `quality={80}` | Integer (1-100) | - |
| [`priority`](#priority) | `priority={true}` | Boolean | - |
| [`placeholder`](#placeholder) | `placeholder="blur"` | String | - |
| [`style`](#style) | `style={{objectFit: "contain"}}` | Object | - |
| [`onLoadingComplete`](#onloadingcomplete) | `onLoadingComplete={img => done())}` | Function | - |
| [`onLoad`](#onload) | `onLoad={event => done())}` | Function | - |
| [`onError`](#onerror) | `onError(event => fail()}` | Function | - |
| [`loading`](#loading) | `loading="lazy"` | String | - |
| [`blurDataURL`](#blurdataurl) | `blurDataURL="data:image/jpeg..."` | String | - |
| Prop | Example | Type | Status |
| ----------------------------------------- | ------------------------------------ | --------------- | ---------- |
| [`src`](#src) | `src="/profile.png"` | String | Required |
| [`width`](#width) | `width={500}` | Integer (px) | Required |
| [`height`](#height) | `height={500}` | Integer (px) | Required |
| [`alt`](#alt) | `alt="Picture of the author"` | String | Required |
| [`loader`](#loader) | `loader={imageLoader}` | Function | - |
| [`fill`](#fill) | `fill={true}` | Boolean | - |
| [`sizes`](#sizes) | `sizes="(max-width: 768px) 100vw"` | String | - |
| [`quality`](#quality) | `quality={80}` | Integer (1-100) | - |
| [`priority`](#priority) | `priority={true}` | Boolean | - |
| [`placeholder`](#placeholder) | `placeholder="blur"` | String | - |
| [`style`](#style) | `style={{objectFit: "contain"}}` | Object | - |
| [`onLoadingComplete`](#onloadingcomplete) | `onLoadingComplete={img => done())}` | Function | Deprecated |
| [`onLoad`](#onload) | `onLoad={event => done())}` | Function | - |
| [`onError`](#onerror) | `onError(event => fail()}` | Function | - |
| [`loading`](#loading) | `loading="lazy"` | String | - |
| [`blurDataURL`](#blurdataurl) | `blurDataURL="data:image/jpeg..."` | String | - |
</div>

## Required Props
Expand Down Expand Up @@ -286,6 +286,8 @@ Remember that the required width and height props can interact with your styling
<Image onLoadingComplete={(img) => console.log(img.naturalWidth)} />
```

> **Warning**: Deprecated since Next.js 14 in favor of [`onLoad`](#onload).
A callback function that is invoked once the image is completely loaded and the [placeholder](#placeholder) has been removed.

The callback function will be called with one argument, a reference to the underlying `<img>` element.
Expand All @@ -302,9 +304,9 @@ The callback function will be called with one argument, a reference to the under
<Image onLoad={(e) => console.log(e.target.naturalWidth)} />
```

A callback function that is invoked when the image is loaded.
A callback function that is invoked once the image is completely loaded and the [placeholder](#placeholder) has been removed.

The load event might occur before the image placeholder is removed and the image is fully decoded. If you want to wait until the image has fully loaded, use [`onLoadingComplete`](#onloadingcomplete) instead.
The callback function will be called with one argument, the Event which has a `target` that references the underlying `<img>` element.

<AppOnly>

Expand Down Expand Up @@ -445,7 +447,7 @@ The `**` syntax does not work in the middle of the pattern.

### `domains`

> **Warning**: We recommend configuring strict [`remotePatterns`](#remotepatterns) instead of `domains` in order to protect your application from malicious users. Only use `domains` if you own all the content served from the domain.
> **Warning**: Deprecated since Next.js 14. We recommend configuring strict [`remotePatterns`](#remotepatterns) instead of `domains` in order to protect your application from malicious users. Only use `domains` if you own all the content served from the domain.
Similar to [`remotePatterns`](#remotepatterns), the `domains` configuration can be used to provide a list of allowed hostnames for external images.

Expand Down
2 changes: 1 addition & 1 deletion examples/auth-with-stytch/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Stytch + Next.js example app on Vercel

This is a [Stytch](https://stytch.com) + [Next.js](https://nextjs.org/) project that showcases how to enable elegant authentication in your applicaiton.
This is a [Stytch](https://stytch.com) + [Next.js](https://nextjs.org/) project that showcases how to enable elegant authentication in your application.

<p align="center"><img src="./public/example-app-image.png" alt="stytch" width="50%"/></p>

Expand Down
2 changes: 1 addition & 1 deletion examples/with-cloudinary/components/SharedModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function SharedModal({
height={navigation ? 853 : 1280}
priority
alt="Next.js Conf image"
onLoadingComplete={() => setLoaded(true)}
onLoad={() => setLoaded(true)}
/>
</motion.div>
</AnimatePresence>
Expand Down
2 changes: 1 addition & 1 deletion examples/with-sfcc/components/ProductCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export default function ProductCard({ product }) {
? 'scale-110 blur-2xl grayscale'
: 'scale-100 blur-0 grayscale-0'
)}
onLoadingComplete={() => setLoading(false)}
onLoad={() => setLoading(false)}
/>
</div>
<div className="mt-4 flex items-center justify-between text-base font-medium text-gray-900">
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.5.6-canary.2"
"version": "13.5.6-canary.6"
}
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -194,16 +194,16 @@
"random-seed": "0.3.0",
"react": "18.2.0",
"react-17": "npm:react@17.0.2",
"react-builtin": "npm:react@18.3.0-canary-09fbee89d-20231013",
"react-builtin": "npm:react@18.3.0-canary-a41957507-20231017",
"react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@18.3.0-canary-09fbee89d-20231013",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-09fbee89d-20231013",
"react-experimental-builtin": "npm:react@0.0.0-experimental-09fbee89d-20231013",
"react-server-dom-turbopack": "18.3.0-canary-09fbee89d-20231013",
"react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-09fbee89d-20231013",
"react-server-dom-webpack": "18.3.0-canary-09fbee89d-20231013",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-09fbee89d-20231013",
"react-dom-builtin": "npm:react-dom@18.3.0-canary-a41957507-20231017",
"react-dom-experimental-builtin": "npm:react-dom@0.0.0-experimental-a41957507-20231017",
"react-experimental-builtin": "npm:react@0.0.0-experimental-a41957507-20231017",
"react-server-dom-turbopack": "18.3.0-canary-a41957507-20231017",
"react-server-dom-turbopack-experimental": "npm:react-server-dom-turbopack@0.0.0-experimental-a41957507-20231017",
"react-server-dom-webpack": "18.3.0-canary-a41957507-20231017",
"react-server-dom-webpack-experimental": "npm:react-server-dom-webpack@0.0.0-experimental-a41957507-20231017",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand All @@ -213,8 +213,8 @@
"resolve-from": "5.0.0",
"sass": "1.54.0",
"satori": "0.10.6",
"scheduler-builtin": "npm:scheduler@0.24.0-canary-09fbee89d-20231013",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-09fbee89d-20231013",
"scheduler-builtin": "npm:scheduler@0.24.0-canary-a41957507-20231017",
"scheduler-experimental-builtin": "npm:scheduler@0.0.0-experimental-a41957507-20231017",
"seedrandom": "3.0.5",
"selenium-webdriver": "4.0.0-beta.4",
"semver": "7.3.7",
Expand Down Expand Up @@ -250,7 +250,7 @@
"@types/react-dom": "18.2.13"
},
"engines": {
"node": ">=18.18.2",
"node": ">=18.17.0",
"pnpm": "8.9.0"
},
"packageManager": "pnpm@8.9.0"
Expand Down
4 changes: 2 additions & 2 deletions 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.5.6-canary.2",
"version": "13.5.6-canary.6",
"keywords": [
"react",
"next",
Expand Down Expand Up @@ -52,6 +52,6 @@
"validate-npm-package-name": "3.0.0"
},
"engines": {
"node": ">=18.18.2"
"node": ">=18.17.0"
}
}
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.5.6-canary.2",
"version": "13.5.6-canary.6",
"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.5.6-canary.2",
"@next/eslint-plugin-next": "13.5.6-canary.6",
"@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.5.6-canary.2",
"version": "13.5.6-canary.6",
"description": "ESLint plugin for Next.js.",
"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.5.6-canary.2",
"version": "13.5.6-canary.6",
"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.5.6-canary.2",
"version": "13.5.6-canary.6",
"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.5.6-canary.2",
"version": "13.5.6-canary.6",
"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.5.6-canary.2",
"version": "13.5.6-canary.6",
"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.5.6-canary.2",
"version": "13.5.6-canary.6",
"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.5.6-canary.2",
"version": "13.5.6-canary.6",
"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.5.6-canary.2",
"version": "13.5.6-canary.6",
"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.5.6-canary.2",
"version": "13.5.6-canary.6",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
4 changes: 3 additions & 1 deletion packages/next-swc/crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ either = "1"
fxhash = "0.2.1"
hex = "0.4.3"
once_cell = { workspace = true }
next-transform-font = {workspace = true}
pathdiff = "0.2.0"
regex = "1.5"
rustc-hash = "1"
Expand All @@ -24,6 +23,9 @@ serde_json = "1"
sha1 = "0.10.1"
tracing = { version = "0.1.37" }

next-transform-dynamic = { workspace = true }
next-transform-font = { workspace = true }

turbopack-binding = { workspace = true, features = [
"__swc_core",
"__swc_core_next_core",
Expand Down
5 changes: 3 additions & 2 deletions packages/next-swc/crates/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use std::{cell::RefCell, path::PathBuf, rc::Rc, sync::Arc};
use auto_cjs::contains_cjs;
use either::Either;
use fxhash::FxHashSet;
use next_transform_dynamic::{next_dynamic, NextDynamicMode};
use next_transform_font::next_font_loaders;
use serde::Deserialize;
use turbopack_binding::swc::{
Expand All @@ -58,7 +59,6 @@ mod auto_cjs;
pub mod cjs_optimizer;
pub mod disallow_re_export_all_in_page;
pub mod named_import_transform;
pub mod next_dynamic;
pub mod next_ssg;
pub mod optimize_barrel;
pub mod optimize_server_react;
Expand Down Expand Up @@ -226,7 +226,7 @@ where
!opts.disable_next_ssg
),
amp_attributes::amp_attributes(),
next_dynamic::next_dynamic(
next_dynamic(
opts.is_development,
opts.is_server,
match &opts.server_components {
Expand All @@ -238,6 +238,7 @@ where
},
_ => false,
},
NextDynamicMode::Webpack,
file.name.clone(),
opts.pages_dir.clone()
),
Expand Down

0 comments on commit 2d4162b

Please sign in to comment.