Skip to content

Commit

Permalink
Upgrade to turbo v2 (#7076)
Browse files Browse the repository at this point in the history
* Upgrade to turbo v2

* fix tests

* rebase
  • Loading branch information
penalosa authored Oct 25, 2024
1 parent eec2a70 commit fa8cc0d
Show file tree
Hide file tree
Showing 24 changed files with 58 additions and 59 deletions.
2 changes: 1 addition & 1 deletion fixtures/additional-modules/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion fixtures/nodejs-als-app/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion fixtures/nodejs-hybrid-app/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-plugin-example/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-proxy-app/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion fixtures/pages-ws-app/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion lint-turbo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ for (const p of paths) {
console.log("Failed to read turbo.json for", pkg.name);
process.exit(1);
}
const buildOutputs = turboConfig.pipeline.build.outputs;
const buildOutputs = turboConfig.tasks.build.outputs;
assert(buildOutputs.length > 0);
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"prettier-plugin-packagejson": "^2.2.18",
"rimraf": "^5.0.1",
"tree-kill": "^1.2.2",
"turbo": "^1.13.4",
"turbo": "^2.2.3",
"typescript": "^5.5.2",
"vite": "^5.0.12",
"vitest": "catalog:default"
Expand Down
3 changes: 1 addition & 2 deletions packages/cli/turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],

"pipeline": {}
"tasks": {}
}
5 changes: 3 additions & 2 deletions packages/create-cloudflare/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"env": [
"TEST_PM",
Expand All @@ -23,7 +23,8 @@
"E2E_PROJECT_PATH",
"E2E_RETRIES",
"E2E_NO_DEPLOY",
"E2E_EXPERIMENTAL"
"E2E_EXPERIMENTAL",
"TEST_PM"
],
"dependsOn": ["build"]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/format-errors/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/kv-asset-handler/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/miniflare/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"inputs": ["src/**", "scripts/**", "types/**", "*.mjs", "*.js", "*.json"],
"outputs": ["dist/**", "bootstrap.js", "worker-metafiles/**"],
Expand Down
2 changes: 1 addition & 1 deletion packages/prerelease-registry/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/turbo-r2-archive/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"],
"inputs": ["src/**"]
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest-pool-workers/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"]
}
Expand Down
2 changes: 1 addition & 1 deletion packages/workers-editor-shared/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"],
"env": ["NODE_ENV"]
Expand Down
2 changes: 1 addition & 1 deletion packages/workers-playground/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"outputs": ["dist/**"],
"env": ["NODE_ENV", "VITE_PLAYGROUND_PREVIEW", "VITE_PLAYGROUND_ROOT"]
Expand Down
2 changes: 1 addition & 1 deletion packages/workers-shared/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"inputs": [
"asset-worker/**",
Expand Down
2 changes: 1 addition & 1 deletion packages/workflows-shared/turbo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"inputs": ["src/**", "*.js", "*.ts", "*.json"],
"outputs": ["dist/**"]
Expand Down
8 changes: 4 additions & 4 deletions packages/wrangler/turbo.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],
"pipeline": {
"tasks": {
"build": {
"inputs": [
"!**/__tests__/**",
"!**/.wrangler/**",
"!*/**/__tests__/**",
"!*/**/.wrangler/**",
"bin/**",
"src/**",
"scripts/**",
Expand Down Expand Up @@ -61,7 +61,7 @@
]
},
"test:ci": {
"inputs": ["!**/.wrangler/**", "**/__tests__/**"],
"inputs": ["!*/**/.wrangler/**", "**/__tests__/**"],
"dependsOn": ["build"]
},
"test:e2e": {
Expand Down
60 changes: 30 additions & 30 deletions pnpm-lock.yaml

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

3 changes: 1 addition & 2 deletions tools/turbo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"$schema": "http://turbo.build/schema.json",
"extends": ["//"],

"pipeline": {
"tasks": {
"test:ci": {
"inputs": ["../packages/*/package.json"],
"dependsOn": ["build"]
Expand Down
2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"signature": true
},
"globalEnv": ["CI_OS", "NODE_VERSION", "VITEST"],
"pipeline": {
"tasks": {
"dev": {
"persistent": true,
"cache": false
Expand Down

0 comments on commit fa8cc0d

Please sign in to comment.