Skip to content

feat(turbo): add support for turbo 2 configuration#11680

Merged
chris-olszewski merged 2 commits intomainfrom
chrisolszewski/turbo-3322-update-vercel-to-support-pipeline-and-tasks
Jun 4, 2024
Merged

feat(turbo): add support for turbo 2 configuration#11680
chris-olszewski merged 2 commits intomainfrom
chrisolszewski/turbo-3322-update-vercel-to-support-pipeline-and-tasks

Conversation

@chris-olszewski
Copy link
Contributor

@chris-olszewski chris-olszewski commented May 31, 2024

With the release of Turborepo 2 we're renaming pipeline to tasks.

This PR updates the default settings logic to look in tasks for a build task definition in addition to looking at pipeline. It also updates the message to no longer mention Turbo configuration in package.json as this is fully ignored in Turborepo 2.

Added a quick unit test to verify build task definitions are found in the tasks section of turbo.json.

Please let me know if there are other tests/places I should update.

@changeset-bot
Copy link

changeset-bot bot commented May 31, 2024

🦋 Changeset detected

Latest commit: 5133646

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@vercel/fs-detectors Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@chris-olszewski chris-olszewski force-pushed the chrisolszewski/turbo-3322-update-vercel-to-support-pipeline-and-tasks branch from 8373986 to fece185 Compare May 31, 2024 20:25
@chris-olszewski chris-olszewski marked this pull request as ready for review May 31, 2024 20:33
Copy link
Contributor

@jeffsee55 jeffsee55 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

(non-blocking): My only thought was whether or not it'd be appropriate to display a message that pipeline has been renamed or if there's a codemod available.

@chris-olszewski
Copy link
Contributor Author

My only thought was whether or not it'd be appropriate to display a message that pipeline has been renamed or if there's a codemod available.

We have that messaging available if someone attempts to use a turbo 1 config with turbo 2 so we'll display that info a little bit later in the build process.

@chris-olszewski chris-olszewski merged commit 5dedc7b into main Jun 4, 2024
@chris-olszewski chris-olszewski deleted the chrisolszewski/turbo-3322-update-vercel-to-support-pipeline-and-tasks branch June 4, 2024 17:36
ztanner pushed a commit that referenced this pull request Jun 4, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## vercel@34.2.5

### Patch Changes

- Adds a route for the `.rsc` pathname as well when app has ppr enabled
but not all routes.
([#11681](#11681))

- Updated dependencies
\[[`7457767a7`](7457767),
[`4337ea065`](4337ea0)]:
    -   @vercel/next@4.2.15

## @vercel/fs-detectors@5.2.4

### Patch Changes

- Add support for detecting Turborepo 2
([#11680](#11680))

## @vercel/next@4.2.15

### Patch Changes

- ensure unmatched action rewrites are routed to correct handler
([#11686](#11686))

- Adds a route for the `.rsc` pathname as well when app has ppr enabled
but not all routes.
([#11681](#11681))

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@kduprey
Copy link

kduprey commented Jun 5, 2024

@chris-olszewski - I'm getting build errors currently when attempting to update to Turbo 2.0 myself, specifically with the turbo.json config.

00:36:46.478 |  
00:36:46.478 | x failed to parse turbo json
00:36:46.478 |  
00:36:46.479 | Error: turbo_json_parse_error
00:36:46.479 |  
00:36:46.479 | x Found an unknown key `tasks`.
00:36:46.479 | ,-[3:1]
00:36:46.479 | 3 \|   "globalDependencies": [".env"],
00:36:46.479 | 4 \|   "tasks": {
00:36:46.479 | :   ^^^^^^^
00:36:46.480 | 5 \|     "build": {
00:36:46.480 | `----
00:36:46.480 |  
00:36:46.496 | Error: Command "cd ../.. && turbo run build --filter={apps/cms}..." exited with 1
00:36:47.040

Is there an issue that has been opened for this?

@kevsjh
Copy link

kevsjh commented Jun 6, 2024

seeing the same issue as well on vercel build.

Error: turbo_json_parse_error

--
01:58:18.881 |  
01:58:18.881 | x Found an unknown key `tasks`.
01:58:18.881 | ,-[4:1]

no issue on local build

@wernst
Copy link

wernst commented Jun 7, 2024

Seeing the same issue that @kduprey and @kevsjh have noted above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants