Commit graph

665 commits

Author SHA1 Message Date
JJ Kasper
1283270a5b
Update env variable for fonts data workflow (#53701)
Removes temporary token in favor of permanent one also updates diffing logic.

Co-authored-by: Steven <229881+styfle@users.noreply.github.com>
2023-08-07 22:07:50 +00:00
JJ Kasper
86b0081a77
Update fonts workflow env 2023-08-06 17:31:36 -07:00
JJ Kasper
78372424f0
Add node setup for fonts workflow 2023-08-06 17:14:35 -07:00
JJ Kasper
6483903372
Add update fonts workflow (#53645)
This adds a workflow to auto update our fonts data so we can stay up to date easier. 

Closes: https://github.com/vercel/next.js/pull/53246
Closes: https://github.com/vercel/next.js/pull/53510
2023-08-07 00:11:03 +00:00
Leah
542c4fc26a
chore: update to pnpm@8.6.11 (#50923)
https://github.com/pnpm/pnpm/releases/tag/v8.0.0
2023-08-04 19:40:20 +00:00
Balázs Orbán
ca96578f0b
chore: update bug repro links (#53550)
### What?

Follow-up of #53453

### Why?

Forgot to update the link in a few places

---------

Co-authored-by: Zack Tanner <zacktanner@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
2023-08-03 16:18:26 -07:00
Balázs Orbán
3a86b30d68
chore: add GH action to notify about pending PRs (#53541)
Send us daily notifications when approved and open PRs haven't been merged yet. See [Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1690610821861229) for more context.

It queries: https://github.com/search?q=repo%3Avercel%2Fnext.js%20is%3Apr%20is%3Aopen%20review%3Aapproved%20&type=pullrequests for the number of PRs, then posts a message with a link to https://github.com/vercel/next.js/pulls?q=is%3Apr+is%3Aopen+review%3Aapproved
2023-08-03 21:40:28 +00:00
Tobias Koppers
61baae126f
fix Next.rs API (#53456)
### What?

* fixes problems in Next.rs API introduced by #52846 
* adds test infrastructure for experimental turbo testing
* adds two test cases to verify the infrastructure
* add grouping of output logs in run-tests
* simplify template loading

### Why?

### How?
2023-08-02 14:31:52 +02:00
Zack Tanner
3b1ccbf996
additional test runner refactoring (#53406)
This relocates the regex patterns that were being used for `test-dev`, `test-prod`, and `test-integration` actions to be part of `run-tests`. Also fixes e2e tests since they were expected to be found in `e2e` rather than `test/e2e`, and updated it exit with a failure code in case of no tests being found 

Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
2023-08-01 00:04:45 +00:00
Zack Tanner
604681912b
ensure colocated unit tests run in CI & fix various failing tests (#53270)
Colocated unit tests (such as ones in `packages/next` and `packages/font`) weren't running in CI since `run-tests` marks the glob cwd as `<root>/tests`. This modifies the working directory to be the root so the new expanded test pattern will pick up files outside of `test/`.

Several of these tests were failing so there are updates in here to fix them. Specifically:

- Source Sans Pro font was renamed to Source Sans 3
- `fillCacheWithDataProperty` test was hitting the `bailOptimistic` code path
- `resolve-metadata` had an invalid assertion (`rel: icon` gets added as part of `IconsMetadata`)
- `resolve-opengraph` wasn't handling undefined images
- `server-patch-reducer` now use inline snapshots as one was failing since it now has a prefetchCache
2023-07-28 13:54:15 +00:00
JJ Kasper
70039c984b
Remove arbitrary timeout in pr/release stats (#53194)
Removes our arbitrary 3 minute timeout on commands in next-stats-action
which may be contributing to the recent failures for release stats to
run

x-ref:
https://github.com/vercel/next.js/actions/runs/5664570067/job/15348170497
x-ref:
https://github.com/vercel/next.js/actions/runs/5650726841/job/15307909184
x-ref:
https://github.com/vercel/next.js/actions/runs/5658309370/job/15329650002
2023-07-27 11:58:41 -07:00
JJ Kasper
e4573a0513
Add CI label (#53229)
x-ref: [slack
thread](https://vercel.slack.com/archives/C053824BELQ/p1690401578968429?thread_ts=1689880792.600909&cid=C053824BELQ)
2023-07-26 14:50:04 -07:00
Steven
48375e492b
chore(ci): fix validate-docs-links for non-PR (#53129)
This PR fixes an issue when `validate-docs-links` is run on a branch
like `canary` instead of a branch from a PR.

Example error message:


https://github.com/vercel/next.js/actions/runs/5649063425/job/15302604957
2023-07-24 14:34:45 -07:00
Steven
8729550522
chore(ci): make validate-docs-links required (#53123)
This moves the [validate-docs-links.yml](https://github.com/vercel/next.js/blob/canary/.github/workflows/validate-docs-links.yml) file into the [build_and_test.yml](https://github.com/vercel/next.js/blob/canary/.github/workflows/build_and_test.yml) file so we can mark it as required by using the `needs` property.
2023-07-24 19:35:21 +00:00
Steven
bc9d69dea4
chore(ci): always run validate-docs-links action (#53022)
We should unconditionally run this action so we can mark it as "required".

It only takes about 13 seconds for each PR so it shouldn't put too much additional load on our CI infra.

<img width="811" alt="image" src="https://github.com/vercel/next.js/assets/229881/5c8596e1-71be-4f09-ac29-e0c4a9f12253">

- Depends on the fix from https://github.com/vercel/next.js/pull/53021
2023-07-22 05:41:53 +00:00
Zack Tanner
e4b6c4e0b0
update CODEOWNERS config (#53017) 2023-07-21 18:13:47 +00:00
Steven
032e8d0eb0
chore(ci): add pnpm workspace for github actions (#52976)
This creates a monorepo for each github action and ensures they all use pnpm.

You can install and build all with the following:

```
cd .github
pnpm i
pnpm -r build
```
2023-07-21 14:29:31 +00:00
JJ Kasper
728fd7572a
Update to latest version of turborepo (#52979)
x-ref: [slack
thread](https://vercel.slack.com/archives/C03LMQZL205/p1689895062566699?thread_ts=1688753294.342269&cid=C03LMQZL205)
2023-07-21 10:04:06 +02:00
Balázs Orbán
df0330f72e
chore: add GitHub Action to manage "+1" comments (#52866)
### What?

Adds a GitHub Action that automatically marks unhelpful comments as "off-topic".

You can test it by adding off-topic comments to this issue: https://github.com/balazsorban44/next.js/issues/21

17e3ec3068/.github/actions/minus-one/src/index.mjs (L6)

### Why?

A common problem is when an issue thread receives "+1" comments, it usually encourages others to do the same. This makes the thread harder and harder for maintainers to read, without adding value to the discussion.

### How?

When an issue receives a comment, we compare it to a list that we determine as off-topic. If it matches, we hide the comment.

See: https://docs.github.com/en/graphql/reference/mutations#minimizecomment
2023-07-20 09:34:29 +00:00
JJ Kasper
ec7f6f7f0c
Update runs-on tags 2023-07-19 13:20:44 -07:00
Jiachi Liu
31453fa20e
Lock node version to 18.16 (#52894)
As we're using nodejs with latest version of 18.x on CI, there's a new behavior change of `url.fileURLToPath` that didn't join the paths as expected

locally with node 16.x or 18.16
```
/private/var/folders/mh/y8kwzkls6v3_w3_k6q384cw80000gn/T/next-install-b033b516612809c6fb0a0de77c6e50f7d7f8af34dfd3d01812b99345352dc992/node_modules/.pnpm/file+..+next-repo-7e52b07043e986127273a2d951e5c412b0dd45fb24eb34001bd372e2afff79db+packages+n_vyqu6i4c4i3efp5pqsaeaoe5s4/node_modules/next/dist/compiled/@vercel/og/noto-sans-v27-latin-regular.ttf
```

in the actions runner with node 18.17 it's
```
/tmp/next-install-8efaa47c1546bed07990d8f130decceb6536e1a36146e7885cb68e3c3dea21f7/node_modules/.pnpm/file+..+next-repo-9679355e05341947e7aa0b42c994e3ac_krcuriy4thl7zawouf7sswlrgy/node_modules/next/dist/compiled/@vercel/og/index.node.js/../noto-sans-v27-latin-regular.ttf
```

You can see that `index.node.js` is still present in the path as a folder which is unexpected
```
index.node.js/../
```

x-ref: https://github.com/vercel/next.js/actions/runs/5600417148/jobs/10242827739?pr=52790
2023-07-19 16:15:58 +00:00
JJ Kasper
fc86c4123b
Update labeler config (#52844) 2023-07-18 18:12:26 +00:00
Tobias Koppers
9c055dbf33
update job concurrency (#52788)
### What?

Scale up concurrency on integration tests to be ~10min each

### Why?

This should bring down the total runtime of the CI

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Steven <steven@ceriously.com>
2023-07-17 18:19:35 +02:00
Balázs Orbán
81dd7f8077
chore: add "please simplify reproduction" comment (#52631)
### What?

Adding a new label comment for "please simplify reproduction".

### Why?

During triaging, a lot of time is gone into trying to isolate the actual bug being reported. Reproductions sometimes contain unrelated code - that sometimes can be the actual cause of an issue, reported as a bug in Next.js, or require third-party services, secrets, setting up databases, and other tasks that take up much of the resources before the issue can even be verified.

### How?

Similar to the `please add a complete reproduction` and `please verify canary` labels, if a maintainer adds the `please simplify reproduction` label, an automatic comment will appear on the issue, asking for a minimal reproduction

[Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1685527818400339)
2023-07-14 23:30:42 +00:00
OJ Kwon
e1baffcec2
feat(turbopack): support native webp (#52285)
### What?

Closes WEB-1157. PR enables turbopack to support native webp encode / decode. There is one platform we can't support this (aarch64-linux-gnu) which disables those.
2023-07-12 19:42:41 +00:00
Jiachi Liu
bcd9136b98
ci: skip build-native for docs only change (#52571) 2023-07-12 00:08:22 +00:00
Josh Story
6839ef379b
use npm pack instead of yarn pack (#52563)
`yarn pack` does not pack the same way that `npm pack` does. There is at least one bug with how files are treated where node_modules are ignored even inside folders defined by the files config. While this is not currently used in next.js an upcoming change will rely on it. The reason this change makes sense otherwise is we use npm to publish next and during a publish the pack from npm is used. For consistency we should use the same pack for our actions and other code that does repo setup such as `create-next-install` which is used for tests

The implementation is slightly more complicated than just replacing the pack command however. `npm pack` respects gitignore files whereas `yarn pack` does not (or at least not nested ones). For some packages the `"files"` property in package.json is set which overrides any gitignore rules however the `@next/swc` package uses a gitignore to prevent the committing of native binaries but does not use files and thus npm pack does not includes native binaries when yarn pack does. To address this the PR adds a temporary rename of the `next-swc/native/.gitignore` file which allows npm pack to mimic the yarn pack behavior. The reason I did not just add `"files"` is that this package actually publishes to many different package names on npm for each architecture and I was unsure about making changes to the package.json that would potentially affect this codepath.

In addition to those changes there are 2 `.gitignore` files that appear to be outdated and unnecessary. I removed them.
2023-07-11 23:36:07 +00:00
Balázs Orbán
4ddb6fc794
chore: add label to locked threads (#52497)
[Slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1688975623048229)

Docs: https://github.com/dessant/lock-threads#inputs

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-10 14:59:23 +02:00
Steven
27a252b953
chore(ci): update logging for release (#52357)
```
Error: Command failed: git clone https://github.com/vercel/next.js --single-branch --branch v13.4.NaN --depth=20 /tmp/next-statsmIAdTr/main-repo
Cloning into '/tmp/next-statsmIAdTr/main-repo'...
warning: Could not find remote branch v13.4.NaN to clone.
fatal: Remote branch v13.4.NaN not found in upstream origin
```


https://github.com/vercel/next.js/actions/runs/5480032198/jobs/9982817862#step:7:1658

---------

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
2023-07-07 13:46:00 +02:00
Jiachi Liu
0048908078
Remove legacy head.js in examples (#52292)
* Remove legacy `head.js` from examples and use `metadata` exports
instead
* Update the report template

---------
2023-07-05 16:42:36 -07:00
Steven
e27832665a
chore: update issue template option to "App Router" (#52287)
https://nextjs.org/docs/app
2023-07-05 22:56:43 +00:00
JJ Kasper
9151362c07
Make tests result check more accurate (#52273)
This ensures we check all statuses properly as previously only one
success was required.

x-ref: https://github.com/vercel/next.js/pull/52272
x-ref: [slack
thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1688573457803739)
2023-07-05 10:41:22 -07:00
Delba de Oliveira
44d1a1cb15
docs: Migrate error messages to MDX and App Router. (#52038)
This PR is part of a larger effort to migrate error messages to MDX and
use App Router: https://github.com/vercel/front/pull/23459
2023-07-05 06:11:16 -07:00
Tobias Koppers
6cb6092e17
fix workflow needs (#52180)
### What?

I forgot to update the `needs` in the workflow
2023-07-04 15:01:33 +02:00
Tobias Koppers
b8ae8d210a
update tests list to include all passing tests (#52026)
### What?

Add all passing tests

### Why?

We enforced that they all run turbopack and these are passing.
If any of these tests would become red, that indicated a problem.
2023-07-04 07:40:50 +00:00
JJ Kasper
b4b98e84d9
Update result job condition (#52155)
Ensures when the cancelled status occurs we don't mark it as passed.
2023-07-03 16:33:22 -07:00
JJ Kasper
e477e01dbe
Update test result step (#52154)
Removes usage of custom runner on final step as it's not necessary
2023-07-03 23:07:28 +00:00
Delba de Oliveira
cc04b62f61
[Docs] link validator: log broken links for PRs from forks (#51963) 2023-07-01 19:41:46 +00:00
Delba de Oliveira
18406adf9c
Make sure DevEx can approve docs PRs / Remove Spaces (#51996) 2023-06-29 17:10:53 +00:00
Jiachi Liu
e7b9b9a816
Update codeowners (#51935)
revert to the previous version of codeowners before vercel spaces is
applied
2023-06-28 12:17:41 -07:00
JJ Kasper
1033a03d86
Update needs for build and deploy (#51731)
These don't need to wait for the build step so we can remove the "needs"
step from them to allow them to start earlier.
2023-06-23 17:14:22 -07:00
Delba de Oliveira
bb38fe5f08
[Docs] Update link validator: use checks, fail on PR from forked repo (#51706) 2023-06-23 14:39:29 +00:00
Delba de Oliveira
82abde8dd9
Revert "[Docs] Fix validator action breaking when PRs originate from … (#51674)
Nvm, it doesn't work.
2023-06-22 19:50:14 +00:00
Delba de Oliveira
487f5d6b6f
[Docs] Fix validator action breaking when PRs originate from forks (#51668) 2023-06-22 19:22:29 +00:00
Delba de Oliveira
0d7412ccc9
Move the Next.js team back to github codeowners (#51657)
Bring back the previous setting so specific team members get tagged on all PRs.
2023-06-22 17:24:09 +00:00
Alex Kirszenberg
c6313606c9
Next Build Turbo POC (2) (#51546)
Another attempt at getting https://github.com/vercel/next.js/pull/49942 in.

This time, the mold install step is gated to Linux.
2023-06-22 08:03:44 +00:00
Delba de Oliveira
a43b9ed601
[Docs] Update broken link validator (#51586)
- Add some basic error handling to the link validator action.
- Avoid unnecessarily creating a new bot comment when the validation is successful.
- Only scan .mdx files modified in the current PR for broken links.
2023-06-21 15:31:20 +00:00
Tobias Koppers
36a7aff6d6
use env var to switch next.js to turbopack mode (#51353)
### What?

this forces all tests to use turbopack independent of the way they invoke next dev

### Why?

some tests were not running turbopack

fixes WEB-1187
2023-06-21 13:52:14 +00:00
Delba de Oliveira
20047fcdbd
Migrate validate links script from next-site and setup GitHub action (#51365)
This PR migrates and adapts the [validate docs links script from `next-site`](https://github.com/vercel/front/pull/23185). This script is triggered by a GitHub action whenever a file in the `/docs` folder is updated. If broken links are found in the docs, the check fails and we post a comment on the PR with a list of broken links.

Co-authored-by: Michael Novotny <446260+manovotny@users.noreply.github.com>
2023-06-20 13:19:06 +00:00
JJ Kasper
056ab7918f
Revert "Fix pnpm ERR_INVALID_THIS on Node 20" (#51539)
Reverts vercel/next.js#51406

This pnpm bump seems to be causing lockfile issues with the react
versions which causes context issues since we need to share the same
react version in the monorepo.
2023-06-19 23:38:15 -07:00