Skip to content

Commit ea180b4

Browse files
feat(root): migrate ts-node -> tsx
ts-node is no longer maintained, and as such introduces friction with newer versions of nodejs. [Example](nodejs/node#59364) This commit moves to an actively maintained alternative. TICKET: WP-5599 TICKET: WP-5599
1 parent fe888dc commit ea180b4

File tree

124 files changed

+615
-457
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

124 files changed

+615
-457
lines changed

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
run: |
5454
rm -rfd ./modules/web-demo
5555
rm -rfd ./modules/express
56-
npx ts-node ./scripts/prepare-release.ts ${{ env.preid }}
56+
npx tsx ./scripts/prepare-release.ts ${{ env.preid }}
5757
5858
- name: Rebuild packages
5959
run: yarn
@@ -65,4 +65,4 @@ jobs:
6565
run: yarn lerna publish from-package --preid ${{ env.preid }} --dist-tag ${{ env.preid }} --force-publish --yes --loglevel silly
6666

6767
- name: Verify Publish
68-
run: npx ts-node ./scripts/verify-release.ts ${{ env.preid }}
68+
run: npx tsx ./scripts/verify-release.ts ${{ env.preid }}

examples/docs/get-fee-estimate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ This script, when run, will log a transaction hex. You can then pass this value
2323

2424
First, run `yarn install` from the root directory of the repository.
2525

26-
Then change into the `examples/ts/sui` directory and use `npx ts-node` to run it:
26+
Then change into the `examples/ts/sui` directory and use `npx tsx` to run it:
2727

2828
```
2929
$ cd examples/ts/sui/
30-
$ npx ts-node get-transaction-hex.ts
30+
$ npx tsx get-transaction-hex.ts
3131
```
3232

3333
### Note

examples/docs/multiple-recipients-transfer-for-non-erc20-tokens.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ TESTNET_ACCESS_TOKEN=your_access_token_here
1616

1717
First, run `yarn install` from the root directory of the repository.
1818

19-
Then change into the `examples/ts/sol/utils/nonce-account-creation` directory and use `npx ts-node` to run the desired example:
19+
Then change into the `examples/ts/sol/utils/nonce-account-creation` directory and use `npx tsx` to run the desired example:
2020

2121
```
2222
$ cd examples/ts/sol/utils/nonce-account-creation
23-
$ npx ts-node multi-recipient-pay-transaction.ts
23+
$ npx tsx multi-recipient-pay-transaction.ts
2424
```
2525

2626

examples/ts/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ You will need node and npm installed locally. You can find information on how to
88

99
First, run `yarn install` from the root directory of the repository.
1010

11-
Then change into the `examples/ts` directory and use `npx ts-node` to run the desired example:
11+
Then change into the `examples/ts` directory and use `npx tsx` to run the desired example:
1212

1313
```
1414
$ cd examples/ts
15-
$ npx ts-node get-wallet.ts
15+
$ npx tsx get-wallet.ts
1616
```
1717

1818
Copy `.env.example` to `.env` and provide the given values if you would like to use the same variables for multiple examples.

examples/ts/btc/changeAddress/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ async function getWallet() {
1616
}
1717

1818
/*
19-
* Usage: npx ts-node btc/externalChange/index.ts
19+
* Usage: npx tsx btc/externalChange/index.ts
2020
* */
2121
async function main() {
2222
console.log('Starting...');

examples/ts/btc/legacySafe/recover.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { unspents } from './fixtures/unspents';
55
const destination = '2MyGxrhLC4kRfuVjLqCVYFtC7DchhgMCiNz';
66

77
/*
8-
* Usage: npx ts-node btc/legacySafe/recover.ts
8+
* Usage: npx tsx btc/legacySafe/recover.ts
99
* */
1010
const recoveryTransaction = async () => {
1111
const coin = legacySafeConfig.sdk.coin(legacySafeConfig.coin) as AbstractUtxoCoin;

examples/ts/btc/legacySafe/sweep.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { unspents } from './fixtures/unspents';
55
const destination = '2MyGxrhLC4kRfuVjLqCVYFtC7DchhgMCiNz';
66

77
/*
8-
* Usage: npx ts-node btc/legacySafe/sweep.ts
8+
* Usage: npx tsx btc/legacySafe/sweep.ts
99
* */
1010
const sweepTransaction = async () => {
1111
const coin = legacySafeConfig.sdk.coin(legacySafeConfig.coin) as AbstractUtxoCoin;

examples/ts/btc/omni/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ async function sendOmniAsset(
9494
}
9595

9696
/*
97-
* Usage: npx ts-node btc/omni/index.ts
97+
* Usage: npx tsx btc/omni/index.ts
9898
* */
9999
async function main() {
100100
console.log('Starting...');

examples/ts/btc/v1/wallet-recovery-validation.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* the user's keycard information (Box D). It helps recover the original wallet password for V1 Wallets Only.
77
*
88
* Usage:
9-
* ts-node wallet-recovery-validation.ts
9+
* tsx wallet-recovery-validation.ts
1010
*
1111
* The script will prompt for:
1212
* - BitGo credentials (username, password, OTP)

examples/ts/http-proxy/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@ Please take the time to review your use case as you choose between these options
1111
## Setup + Usage
1212
- Acquire a test environment account, enterprise and access token
1313
- Fill in the `TODO` sections with the relevant credentials
14-
- `npm install`
15-
- `ts-node server.ts`
16-
- In a separate shell: `ts-node create-wallet.ts`
14+
- `yarn install`
15+
- `yarn run start:server`
16+
- In a separate shell: `yarn run start:create-wallet`

0 commit comments

Comments
 (0)