Skip to content

Commit 6a4c779

Browse files
EndangeredMassaonsclom
andauthoredFeb 10, 2025··
[next][tests][examples] pin fixtures and set up auto updates (#12979)
Having these tests run against `next@canary` and `react@latest` allows changes in those projects to break the tests unpredictably. This happens somewhat often, disrupting other work in this repo that happens to touch the builder interface or some other global invalidation of the turbo cache. In order to bring those breaks to a predictable (and singular) place, this PR pins the Next versions to their current resolved values. There is already a cron set up to update these, which has been fixed in this PR to work more completely. After this merges, when a new version of `next@canary` is published, a new PR will be opened to this repo with that change, scoping any breaks to that PR. --- **Key Changes:** - split out the cron updated into two parts - .github/workflows/cron-update-next-canary.yml: update all of the `packages/next` canary fixtures - .github/workflows/cron-update-next-latest.yml: update the uses in other packages to latest - utils/update-next.js - fixed a bug that prevented deep traversal when looking for fixtures to update - generalized to allow for canary or latest updates - ran this updated script to produce most of the fixture changes in this PR - removed `ignoreNextjsUpdates` from most next fixtures, but left it where it appeared we wanted to test specific old versions --- **Considerations:** - should this cron also pin `react@latest` to its resolved value? - see the author's comments in this PR --------- Co-authored-by: Austin Merrick <onsclom@onsclom.net>
1 parent d6751dd commit 6a4c779

File tree

132 files changed

+765
-632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+765
-632
lines changed
 

‎.changeset/tender-dancers-peel.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vercel/next": patch
3+
---
4+
5+
pin fixtures and set up auto updates
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Cron Update Next
2+
3+
on:
4+
# Allow manual runs
5+
workflow_dispatch:
6+
# Run every 10 minutes https://crontab.guru/every-10-minutes
7+
schedule:
8+
- cron: '*/10 * * * *'
9+
10+
jobs:
11+
create-pull-request:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
# 0 means fetch all commits so we can commit and push in the script below
17+
with:
18+
fetch-depth: 0
19+
- name: Enable corepack
20+
run: corepack enable pnpm
21+
- name: Create Pull Request
22+
uses: actions/github-script@v7
23+
env:
24+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
25+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
26+
# See https://github.com/actions/github-script#run-a-separate-file-with-an-async-function
27+
with:
28+
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }}
29+
script: |
30+
const script = require('./utils/update-next.js')
31+
await script({ github, context, tag: 'canary' })

0 commit comments

Comments
 (0)
Please sign in to comment.