From 36d890255ac2df6f1b98b62251a46cc9003e637a Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Sat, 4 May 2024 16:36:17 +0200 Subject: [PATCH] Fix CI: Pin tsx to 4.9.0 tsx just released v4.9.1 which seems to break us --- package.json | 1 + sphinx_js/typedoc.py | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 180224b1..7ab67baf 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "sphinx_js", "type": "module", "dependencies": { + "tsx": "^4.9.0", "typedoc": "^0.25.13" }, "devDependencies": { diff --git a/sphinx_js/typedoc.py b/sphinx_js/typedoc.py index 0af969b0..f25528dd 100644 --- a/sphinx_js/typedoc.py +++ b/sphinx_js/typedoc.py @@ -67,7 +67,9 @@ def typedoc_output( env = os.environ.copy() env["TYPEDOC_NODE_MODULES"] = str(Path(typedoc).parents[3].resolve()) command = Command("npx") - command.add("tsx") + # tsx v4.9.1 seems to break us for some reason. + # TODO: figure out why + command.add("tsx@4.9.0") dir = Path(__file__).parent.resolve() / "js" command.add("--import", str(dir / "registerImportHook.mjs")) command.add(str(dir / "call_typedoc.ts"))