Skip to content

Commit

Permalink
Remove references to baseBranch (#1681)
Browse files Browse the repository at this point in the history
  • Loading branch information
mehulkar committed Aug 12, 2022
1 parent 97320af commit ca3b50a
Show file tree
Hide file tree
Showing 18 changed files with 1 addition and 36 deletions.
2 changes: 0 additions & 2 deletions cli/internal/fs/turbo_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import (

// TurboJSON is the root turborepo configuration
type TurboJSON struct {
// Base Git branch
Base string `json:"baseBranch,omitempty"`
// Global root filesystem dependencies
GlobalDependencies []string `json:"globalDependencies,omitempty"`
// Pipeline is a map of Turbo pipeline entries which define the task graph
Expand Down
2 changes: 0 additions & 2 deletions cli/scripts/generate.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@ turbo-linux
path.join(root, "turbo.json"),
JSON.stringify(
{
// This is required because our base branch is `main` and not `master`.
baseBranch: "origin/main",
npmClient: "yarn",
cacheStorageConfig: {
provider: "local",
Expand Down
1 change: 0 additions & 1 deletion cli/scripts/monorepo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ importers:
},
},
"turbo.json": {
baseBranch: "origin/main",
...turboConfig,
},
});
Expand Down
1 change: 0 additions & 1 deletion docs/pages/blog/turbo-1-1-0.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ You can now control `turbo`'s [cache fingerprinting (a.k.a. hashing)](https://tu
"outputs": [".next/**"],
}
},
"baseBranch": "origin/main",
"globalDependencies": [
"$GITHUB_TOKEN"// env var that will impact the hashes of all tasks,
"tsconfig.json" // file contents will impact the hashes of all tasks,
Expand Down
1 change: 0 additions & 1 deletion docs/pages/docs/ci/circleci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ And a `turbo.json`:
```json
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"build": {
"dependsOn": ["^build"],
Expand Down
1 change: 0 additions & 1 deletion docs/pages/docs/ci/github-actions.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ And a `turbo.json`:
```json
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"build": {
"dependsOn": ["^build"],
Expand Down
1 change: 0 additions & 1 deletion docs/pages/docs/ci/gitlabci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ And a `turbo.json`:
```json
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"build": {
"dependsOn": ["^build"],
Expand Down
1 change: 0 additions & 1 deletion docs/pages/docs/ci/travisci.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ And a `turbo.json`:
```json
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"build": {
"dependsOn": ["^build"],
Expand Down
1 change: 0 additions & 1 deletion docs/pages/docs/core-concepts/caching.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ Luckily, you can control `turbo`'s cache fingerprinting (a.k.a. hashing) behavio
"outputs": [".next/**"],
}
},
"baseBranch": "origin/main",
"globalDependencies": [
"$GITHUB_TOKEN",// env var that will impact the hashes of all tasks,
"tsconfig.json", // file contents will impact the hashes of all tasks,
Expand Down
5 changes: 1 addition & 4 deletions docs/pages/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,9 @@ The `turbo` package is a little shell that will install the proper `turbo-<os>-<

In the root of your monorepo, create an empty file named `turbo.json`. This will hold the configuration for Turborepo.

If your git repo's base branch is not `origin/master`, then you need to specify a `baseBranch` too. For example, `origin/main`.

```json filename="./turbo.json"
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main"
"$schema": "https://turborepo.org/schema.json"
}
```

Expand Down
2 changes: 0 additions & 2 deletions docs/pages/docs/reference/codemods.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ For example:
"name": "Monorepo root",
"private": true,
"turbo": {
"baseBranch": "origin/main",
"pipeline": {
...
}
Expand All @@ -104,7 +103,6 @@ For example:
// After, turbo.json
{
"$schema": "https://turborepo.org/schema.json",
"baseBranch": "origin/main",
"pipeline": {
...
}
Expand Down
6 changes: 0 additions & 6 deletions docs/pages/docs/reference/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,6 @@ description: Learn how to configure Turborepo through `turbo.json`.

You can configure the behavior of `turbo` by adding a `turbo.json` file in your monorepo's root (i.e. the same one you specify your `workspaces` key is set for Yarn and npm users).

## `baseBranch`

`type: string`

Defaults to `origin/master`. The base branch or your git repository. Git is used by `turbo` in its [hashing algorithm](../core-concepts/caching#hashing-1) and [`--since` CLI flag](./command-line-reference#--since-1).

## `globalDependencies`

`type: string[]`
Expand Down
8 changes: 0 additions & 8 deletions docs/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ export interface Schema {
/** @default https://turborepo.org/schema.json */
$schema?: string;

/**
* The base branch or your git repository. Git is used by turbo in its hashing algorithm
* and --since CLI flag.
*
* @default origin/master
*/
baseBranch?: string;

/**
* A list of globs and environment variables for implicit global hash dependencies.
* Environment variables should be prefixed with $ (e.g. $GITHUB_TOKEN).
Expand Down
1 change: 0 additions & 1 deletion examples/design-system/.changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@acme/docs"]
}
1 change: 0 additions & 1 deletion examples/with-changesets/.changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@acme/docs"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ const ruleTester = new RuleTester({
const getTestTurboConfig = () => {
return {
$schema: "./docs/public/schema.json",
baseBranch: "origin/main",
globalDependencies: ["$GLOBAL_ENV_KEY"],
pipeline: {
test: {
Expand Down
1 change: 0 additions & 1 deletion packages/eslint-plugin-turbo/lib/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export interface Pipeline {
}

export interface TurboConfig {
baseBranch?: string;
globalDependencies?: Array<string>;
pipeline?: Record<string, Pipeline>;
}
1 change: 0 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"$schema": "./docs/public/schema.json",
"baseBranch": "origin/main",
"pipeline": {
"test": {
"outputs": ["coverage/**/*"],
Expand Down

1 comment on commit ca3b50a

@vercel
Copy link

@vercel vercel bot commented on ca3b50a Aug 12, 2022

Choose a reason for hiding this comment

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

Please sign in to comment.