mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Update SchemaStore script (#5024)
## Summary Small mistakes I noticed while running. ## Test Plan `python scripts/update_schemastore.py`
This commit is contained in:
parent
26d8879c3a
commit
6a6168ec78
1 changed files with 4 additions and 3 deletions
|
@ -46,8 +46,9 @@ def update_schemastore(schemastore: Path, *, root: Path) -> None:
|
|||
)
|
||||
|
||||
# Run npm install
|
||||
check_call(["npm", "install"], cwd=schemastore)
|
||||
|
||||
src = schemastore.joinpath("src")
|
||||
check_call(["npm", "install"], cwd=src)
|
||||
|
||||
# Update the schema and format appropriately
|
||||
schema = json.loads(root.joinpath("uv.schema.json").read_text())
|
||||
|
@ -57,7 +58,7 @@ def update_schemastore(schemastore: Path, *, root: Path) -> None:
|
|||
)
|
||||
check_call(
|
||||
[
|
||||
"node_modules/.bin/prettier",
|
||||
"../node_modules/.bin/prettier",
|
||||
"--plugin",
|
||||
"prettier-plugin-sort-json",
|
||||
"--write",
|
||||
|
@ -104,7 +105,7 @@ def main() -> None:
|
|||
update_schemastore(schemastore, root=root)
|
||||
else:
|
||||
with TemporaryDirectory() as temp_dir:
|
||||
update_schemastore(Path(temp_dir).joinpath("schemastore"))
|
||||
update_schemastore(Path(temp_dir).joinpath("schemastore"), root=root)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue