From ea8966ddd71c9b8e9ca4960a05bf52398eadf4c0 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Tue, 27 Aug 2024 11:11:30 +0200 Subject: [PATCH 1/2] Pin tsx 4.15.8 --- sphinx_js/typedoc.py | 2 +- tests/test_paths.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sphinx_js/typedoc.py b/sphinx_js/typedoc.py index ed173c7c..d4e197bc 100644 --- a/sphinx_js/typedoc.py +++ b/sphinx_js/typedoc.py @@ -67,7 +67,7 @@ def typedoc_output( env = os.environ.copy() env["TYPEDOC_NODE_MODULES"] = str(Path(typedoc).parents[3].resolve()) command = Command("npx") - command.add("tsx") + command.add("tsx@4.9.2") dir = Path(__file__).parent.resolve() / "js" command.add("--tsconfig", str(dir / "tsconfig.json")) command.add("--import", str(dir / "registerImportHook.mjs")) diff --git a/tests/test_paths.py b/tests/test_paths.py index 86b5f719..268a2f2b 100644 --- a/tests/test_paths.py +++ b/tests/test_paths.py @@ -94,7 +94,7 @@ def test_global_install(tmp_path_factory, monkeypatch): tmpdir2 = tmp_path_factory.mktemp("blah") monkeypatch.setenv("npm_config_prefix", str(tmpdir)) monkeypatch.setenv("PATH", str(tmpdir / "bin"), prepend=":") - subprocess.run(["npm", "i", "-g", "typedoc", "typescript"]) + subprocess.run(["npm", "i", "-g", "typedoc@0.25", "typescript", "tsx@4.15.8"]) typedoc = search_node_modules("typedoc", "typedoc/bin/typedoc", str(tmpdir2)) monkeypatch.setenv("TYPEDOC_NODE_MODULES", str(Path(typedoc).parents[3])) dir = Path(__file__).parents[1].resolve() / "sphinx_js/js" @@ -102,7 +102,7 @@ def test_global_install(tmp_path_factory, monkeypatch): res = subprocess.run( [ "npx", - "tsx", + "tsx@4.15.8", "--import", dir / "registerImportHook.mjs", dir / "call_typedoc.ts", From bf7126cd9e3f6de9a65e603a57ad0ff2d3d58b92 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Wed, 28 Aug 2024 14:51:05 +0200 Subject: [PATCH 2/2] Pin 4.15.8 --- sphinx_js/typedoc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx_js/typedoc.py b/sphinx_js/typedoc.py index d4e197bc..6810e882 100644 --- a/sphinx_js/typedoc.py +++ b/sphinx_js/typedoc.py @@ -67,7 +67,7 @@ def typedoc_output( env = os.environ.copy() env["TYPEDOC_NODE_MODULES"] = str(Path(typedoc).parents[3].resolve()) command = Command("npx") - command.add("tsx@4.9.2") + command.add("tsx@4.15.8") dir = Path(__file__).parent.resolve() / "js" command.add("--tsconfig", str(dir / "tsconfig.json")) command.add("--import", str(dir / "registerImportHook.mjs"))