From d0e82fd4528a2bccb267e0089b96d8767c9988a6 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Thu, 16 Jan 2025 14:36:35 -0500 Subject: [PATCH 1/2] switch typespec-python over to js --- packages/typespec-python/package.json | 13 ++++++------- packages/typespec-python/scripts/run-python3.ts | 2 +- pnpm-lock.yaml | 3 --- 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/packages/typespec-python/package.json b/packages/typespec-python/package.json index ea0a71cea89..896243ce57a 100644 --- a/packages/typespec-python/package.json +++ b/packages/typespec-python/package.json @@ -30,13 +30,13 @@ "clean": "rimraf ./dist ./temp ./venv ./node_modules", "build": "tsc -p .", "watch": "tsc -p . --watch", - "install": "tsx ./scripts/run-python3.ts ./scripts/install.py", - "prepare": "tsx ./scripts/run-python3.ts ./scripts/prepare.py", - "lint": "tsx ./scripts/eng/lint.ts", + "install": "node ./dist/scripts/run-python3.js ./scripts/install.py", + "prepare": "node ./dist/scripts/run-python3.js ./scripts/prepare.py", + "lint": "node ./dist/scripts/eng/lint.js", "lint:fix": "eslint . --fix --ext .ts", - "format": "npx prettier **/*.ts --write && tsx ./scripts/eng/format.ts", - "regenerate": "tsx ./scripts/eng/regenerate.ts", - "test": "tsx ./scripts/eng/run-tests.ts" + "format": "npx prettier **/*.ts --write && node ./dist/scripts/eng/format.js", + "regenerate": "node ./dist/scripts/eng/regenerate.js", + "test": "node ./dist/scripts/eng/run-tests.js" }, "files": [ "dist/**", @@ -59,7 +59,6 @@ "dependencies": { "js-yaml": "~4.1.0", "semver": "~7.6.2", - "tsx": "~4.19.1", "@typespec/http-client-python": "~0.6.5", "fs-extra": "~11.2.0" }, diff --git a/packages/typespec-python/scripts/run-python3.ts b/packages/typespec-python/scripts/run-python3.ts index 11497fbe538..02d7f6c8604 100644 --- a/packages/typespec-python/scripts/run-python3.ts +++ b/packages/typespec-python/scripts/run-python3.ts @@ -4,7 +4,7 @@ // path resolution algorithm as AutoRest so that the behavior // is fully consistent (and also supports AUTOREST_PYTHON_EXE). // -// Invoke it like so: "tsx run-python3.ts script.py" +// Invoke it like so: "node ./dist/scripts/run-python3.ts script.py" import cp from "child_process"; import { patchPythonPath } from "./system-requirements.js"; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 88dc0e72922..a5b75db6a03 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -90,9 +90,6 @@ importers: semver: specifier: ~7.6.2 version: 7.6.3 - tsx: - specifier: ~4.19.1 - version: 4.19.2 devDependencies: '@azure-tools/azure-http-specs': specifier: 0.1.0-alpha.5 From 01d105d10d8439b5207ceec4cbf94d2e89d9e163 Mon Sep 17 00:00:00 2001 From: iscai-msft Date: Thu, 16 Jan 2025 14:52:44 -0500 Subject: [PATCH 2/2] add changeset --- .chronus/changes/remove_tsx-2025-0-16-14-52-40.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .chronus/changes/remove_tsx-2025-0-16-14-52-40.md diff --git a/.chronus/changes/remove_tsx-2025-0-16-14-52-40.md b/.chronus/changes/remove_tsx-2025-0-16-14-52-40.md new file mode 100644 index 00000000000..feffe61a2c1 --- /dev/null +++ b/.chronus/changes/remove_tsx-2025-0-16-14-52-40.md @@ -0,0 +1,7 @@ +--- +changeKind: fix +packages: + - "@azure-tools/typespec-python" +--- + +Remove tsx from `@azure-tools/typespec-python` \ No newline at end of file