Skip to content

Commit 93a2c88

Browse files
authored
docs: Update $schema recommendation to use versioned subdomain (#11519)
## Summary - Recommends versioned subdomain schema URLs (`https://v<version>.turborepo.dev/schema.json`) as the primary approach - Notes this format is available from v2.5.7+ - Adds callout for unversioned fallback (`https://turborepo.dev/schema.json`) for older versions
1 parent d0ffc92 commit 93a2c88

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

docs/site/content/docs/getting-started/editor-integration.mdx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,25 @@ To get the best experience with `turbo`, Turborepo provides a few utilities for
88
## JSON Schema for `turbo.json`
99

1010
Turborepo uses [JSON Schema](https://json-schema.org/) to give you auto-complete in your
11-
`turbo.json` file. By including the `$schema` key in your `turbo.json`, your editor is able to
12-
provide full documentation and linting in case you have invalid shapes or missing keys.
11+
`turbo.json` files. By including the `$schema` key in your `turbo.json`, your editor is able to
12+
provide full documentation and linting for invalid configuration.
1313

14-
### Sourcing from the web
14+
### Sourcing from web
1515

16-
A `schema.json` is accessible at the URL shown below. This has the advantage of not needing to run your package manager's install command to see in-editor validation.
16+
Starting with Turborepo 2.5.7, versioned schemas are available via subdomain, following the format `https://v<version>.turborepo.dev/schema.json`. The version uses a dash separator.
1717

1818
```json title="./turbo.json"
1919
{
20-
"$schema": "https://turborepo.dev/schema.json"
20+
"$schema": "https://v2-5-7.turborepo.dev/schema.json"
2121
}
2222
```
2323

24-
There is also a major versioned `schema.json` available, following the format of `https://turborepo.dev/schema.<version>.json`.
24+
This has the advantage of not needing to run your package manager's install command to see in-editor validation, while also ensuring you're using the schema that matches your installed version of `turbo`.
2525

26-
```json title="./turbo.json"
27-
{
28-
"$schema": "https://turborepo.dev/schema.v1.json"
29-
}
30-
```
26+
<Callout type="info" title="Unversioned schema">
27+
If you're using a version of Turborepo older than 2.5.7 or prefer an
28+
unversioned schema, you can use `https://turborepo.dev/schema.json` instead.
29+
</Callout>
3130

3231
### Sourcing from `node_modules`
3332

0 commit comments

Comments
 (0)