Commit graph

234 commits

Author SHA1 Message Date
JJ Kasper
d22da49b49
Revert "chore: bump turbo to 2.0.3" (#66775)
Seems the latest turbo version is causing issues with our rust
compilation so reverting for now

Reverts vercel/next.js#66762
2024-06-11 18:17:06 -07:00
Sam Ko
561dcf6c43
chore: bump turbo to 2.0.3 (#66762)
## Why?

This pull request bumps turborepo from 1.13.3-canary.2 to
[2.0.3](https://github.com/vercel/turbo/releases/tag/v2.0.3) across
multiple GitHub workflows and configuration files.
2024-06-11 22:28:01 +00:00
JJ Kasper
46d3066c98
Log stdio for pull-turbo-cache script (#66759)
Gives us more context when this fails as it is here
https://github.com/vercel/next.js/actions/runs/9469195858/job/26087290365#step:15:23
2024-06-11 10:30:56 -07:00
Sebastian Silbermann
b6a45eba45
Fix sync-react changelog (#66532) 2024-06-05 18:57:33 +02:00
Sebastian Silbermann
3445a562aa
Add hint that sync-react doesn't automate everything (#66531) 2024-06-05 16:50:32 +00:00
JJ Kasper
913bf03af0
Handle premajor version for canary (#66336)
Ensures we can cut premajors for canary the same as release-candidate
tags.
2024-05-29 08:26:51 -07:00
JJ Kasper
f6db3b79b1 add missing -y to start-release 2024-05-23 08:09:29 -07:00
JJ Kasper
11c19cfbf6 Fix validate externals docs 2024-05-23 06:56:52 -07:00
JJ Kasper
188b37d11d
Add release candidate handling to start release (#66107)
This adds support for a new `rc` publish tag to our start release
workflow.
2024-05-22 23:52:56 -05:00
Sebastian Silbermann
f7c5480b1c
React sync: Handle React PRs landed via ghstack (#66069) 2024-05-22 23:59:29 +02:00
Sebastian Silbermann
fa42f0dba7
React sync: Reduce manual tasks (#66095) 2024-05-22 23:49:56 +02:00
Sebastian Silbermann
a25e7d2fe9
Update React from 04b058868c to 81c5ff2e04 (#65869) 2024-05-22 14:46:57 +02:00
Sebastian Silbermann
99f59438c3
Improve sync-react changelog generator (#66051) 2024-05-21 21:10:08 +00:00
Sebastian Silbermann
e7065a951c
Include base commit in changes included by a React sync (#65868)
Include the base commit in the generated changelog for React syncs.
2024-05-21 11:16:22 +02:00
Tim Neutkens
aae77765e1
Fix send-trace-to-jaeger boolean span values (#65920)
Jaeger does not support booleans as span values and will throw an error.
This ensures the boolean values are turned into strings.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2024-05-18 18:46:24 +02:00
hrmny
64b718c661
chore: update prettier to 3.2.5 (#65092) 2024-05-08 21:47:14 +02:00
Ethan Arrowood
d0d22ac625
Promote and rename server bundling options serverComponentsExternalPackages and bundlePagesExternals (#65421)
This PR promotes and renames experimental configuration options related
to server bundling:
- `serverComponentsExternalPackages` -> `serverExternalPackages`
- `bundlePagesExternals` -> `bundlePagesRouterDependencies`

Existing docs for `serverComponentsExternalPackages` was changed. 
New docs for `bundlePagesRouterDependencies` were added.

Closes NEXT-3332
2024-05-07 11:19:35 -06:00
Sebastian Silbermann
2c31c79ac8
Support React 19 in App and Pages router (#65058)
Closes NEXT-3218

---------

Co-authored-by: Jiachi Liu <inbox@huozhi.im>
2024-05-07 18:18:32 +02:00
Steven
a6a6117197
feat(next/image)!: remove squoosh in favor of sharp as optional dependency (#63321)
## History

Previously, we added support for `squoosh` because it was a wasm
implementation that "just worked" on all platforms when running `next
dev` for the first time. However, it was slow so we always recommended
manually installing `sharp` for production use cases running `next
build` and `next start`.

Now that [`sharp` supports
webassembly](https://sharp.pixelplumbing.com/install#webassembly), we no
longer need to maintain `squoosh`, so it can be removed. We also don't
need to make the user install sharp manually because it can be installed
under `optionalDependencies`. I left it optional in case there was some
platform that still needed to manually install the wasm variant with
`npm install --cpu=wasm32 sharp` such as codesandbox/stackblitz (I don't
believe sharp has any fallback built in yet).

Since we can guarantee `sharp`, we can also remove `get-orientation` dep
and upgrade `image-size` dep.

I also moved an [existing `sharp`
test](https://github.com/vercel/next.js/pull/56674) into its own fixture
since it was unrelated to image optimization.

## Related Issues
- Fixes https://github.com/vercel/next.js/issues/41417
- Related https://github.com/vercel/next.js/pull/54670
- Related https://github.com/vercel/next.js/issues/54708
- Related https://github.com/vercel/next.js/issues/44804
- Related https://github.com/vercel/next.js/issues/48820
- Related https://github.com/vercel/next.js/pull/61810
- Related https://github.com/vercel/next.js/pull/61696
- Related https://github.com/vercel/next.js/issues/44685
- Closes https://github.com/vercel/next.js/issues/64362

## Breaking Change

This is a breaking change because newer versions of `sharp` no longer
support `yarn@1`.

- https://github.com/lovell/sharp/issues/3750

The workaround is to install with `yarn --ignore-engines` flag.

Also note that Vercel no longer defaults to yarn when no lockfile is
found

- https://github.com/vercel/vercel/pull/11131
- https://github.com/vercel/vercel/pull/11242

Closes NEXT-2823
2024-04-25 14:01:56 -04:00
Sebastian Silbermann
04571f39be
Update React from 14898b6a9 to c3048aab4 (#64798) 2024-04-25 12:35:35 +02:00
Balázs Orbán
a532e32eca
Reapply "chore(test): run related E2E deploy tests on PRs" (#64682) (#64712) 2024-04-19 11:02:43 +02:00
JJ Kasper
3aa3f51f2d
Revert "chore(test): run related E2E deploy tests on PRs" (#64682)
Reverting for now as this is failing on all PRs 

Reverts vercel/next.js#63763

Closes NEXT-3147

x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1713391373933249)
x-ref: [slack
thread](https://vercel.slack.com/archives/C04KC8A53T7/p1713385017892539)
2024-04-17 22:40:21 +00:00
Balázs Orbán
3192172898
chore(test): run related E2E deploy tests on PRs (#63763) 2024-04-17 11:06:23 +00:00
hrmny
ce69d02cf9
chore: remove unused rust dependencies (#62176)
### What?

Toolchain is updated as well.

Should improve compile times marginally, also added the new parallel
frontend.

Depends on https://github.com/vercel/turbo/pull/7409

Closes PACK-2526
2024-04-16 17:48:06 +02:00
Tobias Koppers
2766ebc8d3
improve turborepo caching (#64493)
### What?

There is a race condition in the `pull-build-cache` script. When the
remote cache entry was removed between the dry run and the real run, it
will run the command and caches whatever is in the native folder.

Seems like there are some very old leftover files there which lead to an
broken publish.

This changes the command to fail when there are no files and empties the
folder before running the script. This should lead to pull-build-cache
to failing instead.

Closes PACK-2957
Fixes #64468
2024-04-15 12:42:28 +02:00
Balázs Orbán
b93ead0c9c
chore: add test mapping script (#63757)
### What?

This adds a script that first gets a list of changed files compared to
our base branch (`canary`) in PRs and identifies related test files by
looking them up from a `related-tests-manifest.json`, then runs them.

### Why?

We would like to be able to run related E2E tests when certain files
change, so we can test deployment stability.

NOTE: We still want to run all E2E tests on PRs, but this script can be
used to also test deployments for hot paths. Since these tests can take
up to [3-4
hours](https://github.com/vercel/next.js/actions/workflows/test_e2e_deploy.yml),
we aim to run a subset of these tests first.


Closes NEXT-2947
2024-04-11 09:44:47 +02:00
Will Binns-Smith
3d3311b150
Update rust-toolchain to nightly-2024-04-03 (#64048)
Depends on https://github.com/vercel/turbo/pull/7874, which should be
merged first.

Test Plan: `cargo check`


Closes PACK-2903
2024-04-04 23:28:02 +00:00
JJ Kasper
53d017d3f1
Parallelize dev/start flake detection (#63954)
Since we're re-running tests a few times and in both modes this can take
a while ([related
run](https://github.com/vercel/next.js/actions/runs/8514892757/job/23321431099?pr=56995)),
so this parallelizes by separating dev/prod into separate jobs.

Closes NEXT-2975
2024-04-02 11:40:27 -07:00
JJ Kasper
2359d3d275
Add job to test flakiness of added/changed tests (#63943)
To help detect when newly added/changed assertions are flakey this adds
a job to our build and test workflow to re-run them 3 times. If the
changed test is an E2E test it will re-run in both development and
production mode to ensure it's not flakey specifically in one of those
modes.

Test run with changed test can be seen here
https://github.com/vercel/next.js/actions/runs/8511797725/job/23312158523?pr=63943

Closes NEXT-2973
2024-04-01 20:15:43 +00:00
Tim Neutkens
5a1409179c
Ensure automated-update-workflow fails on errors (#63807)
## What?

Ensure that test runs like this one fail:
https://github.com/vercel/next.js/actions/runs/8463659474/job/23186935591

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-2953
2024-03-28 12:29:45 +01:00
JJ Kasper
bc6598f95a
Add tarball deployments for each build (#62969)
This adds automatic tarball deployments for each build so that we don't
have to trigger a canary release whenever we want to create a full
tarball with all `next-swc` builds.

Example tarball
https://github.com/vercel/next.js/actions/runs/8239762627/job/22534810077#step:9:34

Closes NEXT-2735
2024-03-13 11:39:44 -07:00
Zack Tanner
e5ac6aeea8
fix broken create-next-app tests (#63019)
#62980 migrated `examples/basic-css` to use app router. A handful of our
create-next-app tests use this example when asserting the correct
project files are created, so we were asserting on a pages file existing
rather than an app dir page. This PR updates those tests.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->


Closes NEXT-2754
2024-03-07 22:21:12 +00:00
JJ Kasper
80fa841c7c
Add CI check to validate externals doc (#62968)
This avoids the need to manually check when these get out of sync by
having an automated check to keep them in sync when one or the other is
updated.

x-ref: https://github.com/vercel/next.js/pull/62966

Closes NEXT-2734
2024-03-06 17:00:25 -08:00
JJ Kasper
9f38cfee3d
Update to only use preminor when configured (#62904)
Ensures we don't use preminor every time only when we manually specify
to

x-ref:
https://github.com/vercel/next.js/actions/runs/8161338410/job/22309868382

Closes NEXT-2716
2024-03-05 12:34:51 -08:00
JJ Kasper
9547635bf7
Update canary semver handling (#62852)
As discussed this updates our canary semver bumping to use `preminor`
instead of `prerelease` to avoid overlap with patches/backports and make
it more clear for users which versions go along together.

x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1709583075769789)

Closes NEXT-2701
2024-03-04 16:48:55 -08:00
JJ Kasper
e5a4e82f30
Update start release handling (#62851)
This removes the hacky handling for executing lerna with using the
official commands directly, this also removes the legacy package.json
scripts we had for publishing.

Closes NEXT-2700

---------

Co-authored-by: Zack Tanner <zacktanner@gmail.com>
2024-03-04 16:28:22 -08:00
JJ Kasper
04b13f52a5
Update error handling in publish scripts (#62754)
Seems we aren't ignoring the already published error correctly.

x-ref:
https://github.com/vercel/next.js/actions/runs/8118349923/job/22192598805

Closes NEXT-2668
2024-03-02 00:40:51 +00:00
JJ Kasper
d0fc16defe
Revert "chore: drop npm-run-all" (#62700)
Reverts vercel/next.js#62642

Closes NEXT-2650
2024-02-29 13:59:24 -08:00
Balázs Orbán
340125a74d
chore: drop npm-run-all (#62642)
Closes #62627, Closes #62610

Closes NEXT-2638
2024-02-28 09:42:19 -05:00
OJ Kwon
00633f1774
docs(turbopack): move docs to separate (#62069)
### What

For better organization, extracting docs into separate location.

Closes PACK-2494
2024-02-15 08:05:48 -08:00
OJ Kwon
8b4005e792
docs(turbopack): reduce documentation size (#62016)
### What

next_core unexpectedly reexports everything, makes documentation size
too large.

Closes PACK-2480
2024-02-13 14:36:11 -08:00
OJ Kwon
1dc3c01030
docs(turbopack): build more docs (#61977)
### What

This PR changes setup for the turbopack documentation.

Long story in short, we want to 2 types of documentation: one for high
level description (archtecture, etcs) and another for the api doc.
rustdoc / cargo doc unfortunately doesn't support to integrate both
easily.

PR adds mdbook setup to workaround those - instead of using rustdoc's
index as entrypoint, mdbook becomes an entrypoint to rustdoc. This
allows to host plain text document, and also able to access full rustdoc
pages.


preview: https://turbopack-rust-docs-b6qta4xdq.vercel.sh/
rustdoc:
https://turbopack-rust-docs-b6qta4xdq.vercel.sh/rustdoc/index.html


Closes PACK-2475
Closes PACK-2468
2024-02-13 12:17:25 -08:00
OJ Kwon
b04c70335d
ci(workflow): deploy rustdocs for turbopack (#61958)
### What

We'd like to deploy generated rustdocs from turbopack & related packages
(next-swc), setting up a CI workflow to automate those.

Since we need next.js side packages to build docs, this CI sets up
things in this repo.

Closes PACK-2375.
2024-02-12 15:14:36 -08:00
Jimmy Lai
feb27ad621
Revert "feat(next/image)!: remove squoosh in favor of sharp as optional dep" (#61810)
Reverts vercel/next.js#61696

Closes NEXT-2401
2024-02-08 11:00:34 +00:00
Steven
07c4ec052e
feat(next/image)!: remove squoosh in favor of sharp as optional dep (#61696)
## History

Previously, we added support for `squoosh` because it was a wasm
implementation that "just worked" on all platforms when running `next
dev` for the first time. However, it was slow so we always recommended
manually installing `sharp` for production use cases running `next
build` and `next start`.

Now that [`sharp` supports
webassembly](https://sharp.pixelplumbing.com/install#webassembly), we no
longer need to maintain `squoosh`, so it can be removed. We also don't
need to make the user install sharp manually because it can be installed
under `optionalDependencies`. I left it optional in case there was some
platform that still needed to manually install the wasm variant with
`npm install --cpu=wasm32 sharp` such as codesandbox/stackblitz (I don't
believe sharp has any fallback built in yet).

Since we can guarantee `sharp`, we can also remove `get-orientation` dep
and upgrade `image-size` dep.

I also moved an [existing `sharp`
test](https://github.com/vercel/next.js/pull/56674) into its own fixture
since it was unrelated to image optimization.

## Related Issues
- Fixes https://github.com/vercel/next.js/issues/41417
- Closes https://github.com/vercel/next.js/pull/54670
- Related https://github.com/vercel/next.js/issues/54708
- Related https://github.com/vercel/next.js/issues/44804
- Related https://github.com/vercel/next.js/issues/48820
2024-02-06 14:17:07 -05:00
JJ Kasper
2a824e97db
Ensure publish job has correct status on fail (#61645)
This ensures we show the job as failed correctly when any of the
packages didn't publish successfully.

x-ref:
https://github.com/vercel/next.js/actions/runs/7777481701/job/21205867173

Closes NEXT-2355
2024-02-05 00:06:16 +00:00
Steven
1662362d12
chore: fix postinstall when using tarball (#60443)
The postinstall script was failing In the case when you download [a
zip](https://codeload.github.com/vercel/next.js/zip/refs/heads/canary)
of the repo.

This PR fixes it so that `git config` can fail silently in that case
when the repo is not using git.

- Related to https://github.com/nodejs/citgm/pull/1044

Closes NEXT-2036
2024-01-09 17:37:49 -05:00
OJ Kwon
bb25edfdd4
ci(workflow): restore publish wasm binary (#59414) 2023-12-08 11:44:24 -08:00
Leah
7ce4a02bdc
ci: don't try to upload to datadog for docs only changes (#59068) 2023-11-29 19:25:01 +01:00
Zack Tanner
0cb1c40400
ci: disable deployment protection for e2e test project (#58830)
Since we reset the test project on every e2e CI run, deployment protection is automatically enabled by default.

This adds an option to the reset project workflow to disable deployment protection. Our test runners need to be able to hit these pages from an unauthenticated browser in order for the tests to work. 

Verified tests are running properly in [this run](https://github.com/vercel/next.js/actions/runs/6971348806/job/18971225559) (fixing any failing tests themselves are out of scope for this PR; will evaluate once the run finishes)

Closes NEXT-1732
2023-11-23 09:41:34 -08:00