You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Copy file name to clipboardExpand all lines: docs/site/content/docs/getting-started/editor-integration.mdx
+10-11Lines changed: 10 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,26 +8,25 @@ To get the best experience with `turbo`, Turborepo provides a few utilities for
8
8
## JSON Schema for `turbo.json`
9
9
10
10
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.
13
13
14
-
### Sourcing from the web
14
+
### Sourcing from web
15
15
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.
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`.
25
25
26
-
```json title="./turbo.json"
27
-
{
28
-
"$schema": "https://turborepo.dev/schema.v1.json"
29
-
}
30
-
```
26
+
<Callouttype="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.
0 commit comments