Update bundled JSON schemas (2026-04-29) (#58948)

./script/update-json-schemas 16c22767

- Improved `script/update-json-schemas`
  - Fix paths to match new locations of schemas
  - Add support for specifying an explicit commit
  - Use sed to replace `json.` links with `www.` in schemas
- Updated JSON schemas to
[SchemaStore/schemastore@16c2276](https://github.com/SchemaStore/schemastore/tree/16c227677c1cb71864593f63382705e8c7390810)
(2026-04-29; last updated 2025-02-28)
-
[tsconfig.json](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/tsconfig.json)
@
[16c2276](https://raw.githubusercontent.com/SchemaStore/schemastore/16c227677c1cb71864593f63382705e8c7390810/src/schemas/json/tsconfig.json)
-
[changes](https://github.com/SchemaStore/schemastore/commits/16c227677c1cb71864593f63382705e8c7390810/src/schemas/json/tsconfig.json)
-
[package.json](https://github.com/SchemaStore/schemastore/commits/master/src/schemas/json/package.json)
@
[16c2276](https://raw.githubusercontent.com/SchemaStore/schemastore/16c227677c1cb71864593f63382705e8c7390810/src/schemas/json/package.json)
-
[changes](https://github.com/SchemaStore/schemastore/commits/16c227677c1cb71864593f63382705e8c7390810/src/schemas/json/package.json)
- Updates tsconfig.json to support ES2025 stuff.
- Updates package.json to support `nodemonConfig`

Note, this is pinned to an old commit
(https://github.com/SchemaStore/schemastore/commit/16c22767) because
anything after https://github.com/SchemaStore/schemastore/pull/5631 will
result in errors for all referenced schemas in package.json. This occurs
as they are all now relative links, which cannot be resolved for the
schema injected via config. This is also a hint that the current method
of bundling of package.json schema in practice triggers json-language
fetching 8 other nested schemas. Probably worth revisiting that.

CC: @probably-neb as someone who recently worked on the schemastore
stuff.

Self-Review Checklist:

- [Yes] I've reviewed my own diff for quality, security, and reliability
- [N/A] Unsafe blocks (if any) have justifying comments
- [N/A] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [N/A] Tests cover the new/changed behavior
- [N/A] Performance impact has been considered and is acceptable

Release Notes:

- Update bundled tsconfig.json and package.json schemas

---------

Co-authored-by: Ben Kunkle <ben.kunkle@gmail.com>
This commit is contained in:
Peter Tripp
2026-06-25 13:30:12 -04:00
committed by GitHub
parent dae3e574e4
commit e0f77d16fb
4 changed files with 502 additions and 429 deletions
@@ -797,7 +797,14 @@
"packageManager": {
"description": "Defines which package manager is expected to be used when working on the current project. This field is currently experimental and needs to be opted-in; see https://nodejs.org/api/corepack.html",
"type": "string",
"pattern": "(npm|pnpm|yarn|bun)@\\d+\\.\\d+\\.\\d+(-.+)?"
"oneOf": [
{
"pattern": "(npm|pnpm|yarn|bun)@\\d+\\.\\d+\\.\\d+(-.+)?"
},
{
"const": "bun"
}
]
},
"engines": {
"type": "object",
@@ -1047,6 +1054,9 @@
"jscpd": {
"$ref": "https://www.schemastore.org/jscpd.json"
},
"nodemonConfig": {
"$ref": "https://www.schemastore.org/nodemon.json"
},
"pnpm": {
"description": "Defines pnpm specific configuration.",
"type": "object",
File diff suppressed because one or more lines are too long
+19 -4
View File
@@ -3,18 +3,33 @@
set -euo pipefail
cd "$(dirname "$0")/.." || exit 1
cd crates/languages/src/json/schemas
cd crates/json_schema_store/src/schemas
if [[ $# -gt 1 ]]; then
echo "Usage: script/update-json-schemas [schemastore-commit]" >&2
exit 1
fi
UPSTREAM_REF="${1:-master}"
COMMIT="$(curl -sL "https://api.github.com/repos/SchemaStore/schemastore/commits/$UPSTREAM_REF")"
HASH="$(jq -r '.sha' <<< "$COMMIT")"
if [[ -z "$HASH" || "$HASH" == "null" ]]; then
echo "Failed to resolve SchemaStore/schemastore commit: $UPSTREAM_REF" >&2
exit 1
fi
files=(
"tsconfig.json"
"package.json"
)
for file in "${files[@]}"; do
curl -sL -o "$file" "https://raw.githubusercontent.com/SchemaStore/schemastore/master/src/schemas/json/$file"
curl -sL "https://raw.githubusercontent.com/SchemaStore/schemastore/$HASH/src/schemas/json/$file" |
sed 's|https://json\.schemastore\.org|https://www.schemastore.org|g' > "$file"
done
HASH="$(curl -s 'https://api.github.com/repos/SchemaStore/schemastore/commits/HEAD' | jq -r '.sha')"
SHORT_HASH="${HASH:0:7}"
DATE="$(curl -s 'https://api.github.com/repos/SchemaStore/schemastore/commits/HEAD' |jq -r .commit.author.date | cut -c1-10)"
DATE="$(jq -r .commit.author.date <<< "$COMMIT" | cut -c1-10)"
echo
echo "Updated JSON schemas to [SchemaStore/schemastore@$SHORT_HASH](https://github.com/SchemaStore/schemastore/tree/$HASH) ($DATE)"
echo
+3
View File
@@ -20,6 +20,9 @@ extend-exclude = [
# Suppress false positives in database schema.
"crates/collab/migrations/20251208000000_test_schema.sql",
# Vendored JSON schemas from SchemaStore.
"crates/json_schema_store/src/schemas/",
# Not our typos.
"crates/livekit_api/",
# Vim makes heavy use of partial typing tables.