diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b720cae..a5859836 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,21 +19,20 @@ jobs: run: | npm install - - name: Install TypeScript and ts-node + - name: Install TypeScript run: | - npm install -g typescript ts-node + npm install -g typescript - name: Build Common package run: | - ts-node .build/build_and_prepare.ts common && npm pack + npx tsx .build/build_and_prepare.ts common && npm pack - name: Build Node.js package run: | - ts-node .build/build_and_prepare.ts node && npm pack - + npx tsx .build/build_and_prepare.ts node && npm pack - name: Build Web package run: | - ts-node .build/build_and_prepare.ts web && npm pack + npx tsx .build/build_and_prepare.ts web && npm pack - name: Rename artifacts run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5d60a641..130f428c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -218,19 +218,19 @@ We prefer to keep versions the same across the packages, and release all at once Common package manual release: ```bash -ts-node .build/build_and_prepare.ts common && npm pack && npm publish +npx tsx .build/build_and_prepare.ts common && npm pack && npm publish ``` Node.js client manual release: ```bash -ts-node .build/build_and_prepare.ts node && npm pack && npm publish +npx tsx .build/build_and_prepare.ts node && npm pack && npm publish ``` Web client manual release: ```bash -ts-node .build/build_and_prepare.ts web && npm pack && npm publish +npx tsx .build/build_and_prepare.ts web && npm pack && npm publish ``` For simplicity, `build_and_prepare.ts` just overrides the root `package.json`, diff --git a/benchmarks/leaks/README.md b/benchmarks/leaks/README.md index 68de8625..126d176f 100644 --- a/benchmarks/leaks/README.md +++ b/benchmarks/leaks/README.md @@ -5,7 +5,7 @@ The goal is to determine whether we have any memory leaks in the client implementation. For that, we can have various tests with periodical memory usage logging such as random data or predefined file streaming. -NB: we supposedly avoid using `ts-node` as it adds some runtime overhead. +NB: we supposedly avoid using `tsx` as it adds some runtime overhead. Every test requires a local ClickHouse instance running. diff --git a/benchmarks/tsconfig.json b/benchmarks/tsconfig.json index a05b5630..069f5d32 100644 --- a/benchmarks/tsconfig.json +++ b/benchmarks/tsconfig.json @@ -11,8 +11,5 @@ "@clickhouse/client": ["../packages/client-node/src/index.ts"], "@clickhouse/client/*": ["../packages/client-node/src/*"] } - }, - "ts-node": { - "require": ["tsconfig-paths/register"] } } diff --git a/examples/README.md b/examples/README.md index 8901595e..9094a48b 100644 --- a/examples/README.md +++ b/examples/README.md @@ -103,7 +103,7 @@ npm i Then, you should be able to run the sample programs, for example: ```sh -ts-node --transpile-only array_json_each_row.ts +npx tsx --transpile-only array_json_each_row.ts ``` ### TLS examples @@ -119,8 +119,8 @@ sudo -- sh -c "echo 127.0.0.1 server.clickhouseconnect.test >> /etc/hosts" After that, you should be able to run the examples: ```bash -ts-node --transpile-only node/basic_tls.ts -ts-node --transpile-only node/mutual_tls.ts +npx tsx --transpile-only node/basic_tls.ts +npx tsx --transpile-only node/mutual_tls.ts ``` ### On-premise cluster examples @@ -136,7 +136,7 @@ docker-compose -f docker-compose.cluster.yml up -d Now, you should be able to run the example: ``` -ts-node --transpile-only create_table_on_premise_cluster.ts +npx tsx --transpile-only create_table_on_premise_cluster.ts ``` ### ClickHouse Cloud examples @@ -155,5 +155,5 @@ Cloud examples assume that you are using the `default` user and database. Run one of the Cloud examples: ``` -ts-node --transpile-only create_table_cloud.ts +npx tsx --transpile-only create_table_cloud.ts ``` diff --git a/examples/package.json b/examples/package.json index b121230c..bd0bc757 100644 --- a/examples/package.json +++ b/examples/package.json @@ -18,6 +18,6 @@ "avsc": "^5.7.7", "set-interval-async": "^3.0.3", "split2": "^4.2.0", - "ts-node": "^10.9.1" + "tsx": "^4.21.0" } } diff --git a/package.json b/package.json index 8a344d4e..0dce1450 100644 --- a/package.json +++ b/package.json @@ -78,9 +78,9 @@ "split2": "^4.2.0", "terser-webpack-plugin": "^5.3.14", "ts-loader": "^9.5.2", - "ts-node": "^10.9.2", "tsconfig-paths": "^4.2.0", "tsconfig-paths-webpack-plugin": "^4.2.0", + "tsx": "^4.21.0", "typescript": "^5.9.3", "typescript-eslint": "^8.46.4", "uuid": "^13.0.0", diff --git a/tsconfig.all.json b/tsconfig.all.json index 1181706c..db72f3fb 100644 --- a/tsconfig.all.json +++ b/tsconfig.all.json @@ -21,8 +21,5 @@ "@clickhouse/client": ["packages/client-node/src/index.ts"], "@clickhouse/client/*": ["packages/client-node/src/*"] } - }, - "ts-node": { - "require": ["tsconfig-paths/register"] } } diff --git a/tsconfig.dev.json b/tsconfig.dev.json index 49144782..cd682114 100644 --- a/tsconfig.dev.json +++ b/tsconfig.dev.json @@ -12,8 +12,5 @@ "@test/*": ["packages/client-common/__tests__/*"], "@clickhouse/client-common": ["packages/client-common/src/index.ts"] } - }, - "ts-node": { - "require": ["tsconfig-paths/register"] } }