-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(turbo-utils): support old workspace format (#4682)
### Description Support old workspace format (workspaces.packages) in our find config util used by codemod and the eslint plugin Fixes #4469 and #4085
- Loading branch information
Showing
12 changed files
with
115 additions
and
4 deletions.
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
packages/turbo-utils/__fixtures__/common/old-workspace-config/apps/docs/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default function docs() { | ||
if (!process.env.ENV_1) { | ||
return "bar"; | ||
} | ||
return "foo"; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/turbo-utils/__fixtures__/common/old-workspace-config/apps/docs/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "docs", | ||
"version": "1.0.0" | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/turbo-utils/__fixtures__/common/old-workspace-config/apps/web/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default function web() { | ||
if (!process.env.ENV_2) { | ||
return "bar"; | ||
} | ||
return "foo"; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/turbo-utils/__fixtures__/common/old-workspace-config/apps/web/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "web", | ||
"version": "1.0.0" | ||
} |
16 changes: 16 additions & 0 deletions
16
packages/turbo-utils/__fixtures__/common/old-workspace-config/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"private": true, | ||
"workspaces": { | ||
"packages": [ | ||
"apps/*", | ||
"packages/*" | ||
] | ||
}, | ||
"scripts": { | ||
"build": "turbo run build" | ||
}, | ||
"devDependencies": { | ||
"turbo": "latest" | ||
}, | ||
"packageManager": "yarn@1.22.19" | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/turbo-utils/__fixtures__/common/old-workspace-config/packages/ui/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default function foo() { | ||
if (!process.env.IS_SERVER) { | ||
return "bar"; | ||
} | ||
return "foo"; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/turbo-utils/__fixtures__/common/old-workspace-config/packages/ui/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "ui", | ||
"version": "1.0.0" | ||
} |
6 changes: 6 additions & 0 deletions
6
packages/turbo-utils/__fixtures__/common/old-workspace-config/packages/utils/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
export default function foo() { | ||
if (!process.env.IS_SERVER) { | ||
return "bar"; | ||
} | ||
return "foo"; | ||
} |
4 changes: 4 additions & 0 deletions
4
packages/turbo-utils/__fixtures__/common/old-workspace-config/packages/utils/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"name": "utils", | ||
"version": "1.0.0" | ||
} |
14 changes: 14 additions & 0 deletions
14
packages/turbo-utils/__fixtures__/common/old-workspace-config/turbo.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"globalDependencies": ["**/.env.*local"], | ||
"pipeline": { | ||
"build": { | ||
"outputs": [".next/**", "!.next/cache/**"] | ||
}, | ||
"lint": {}, | ||
"dev": { | ||
"cache": false, | ||
"persistent": true | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters