Skip to content

Commit 28dea8d

Browse files
committed
use node --strip-types instead of tsx
1 parent a70ac52 commit 28dea8d

File tree

12 files changed

+147
-184
lines changed

12 files changed

+147
-184
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,37 +22,26 @@ jobs:
2222
- name: Install pnpm
2323
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
2424

25-
- name: Install Node 22
25+
- name: Install Node 24
2626
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
2727
with:
28-
node-version: 22
28+
node-version: 24
2929
cache: 'pnpm'
3030

3131
- name: Install dependencies
3232
run: pnpm install --frozen-lockfile
3333

34-
- name: Create empty .dev.vars file
35-
run: touch .dev.vars
36-
3734
- name: Deploy commands to Discord
3835
run: node --run deploy-commands
3936
env:
4037
APPLICATION_ID: ${{ secrets.APPLICATION_ID }}
4138
DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }}
4239

43-
# The wrangler action normally installs a hardcoded version of wrangler.
44-
# This step gets the version we use from package.json.
45-
# See https://github.com/cloudflare/wrangler-action/issues/231#issuecomment-1976018383.
46-
- name: Set wrangler version
47-
id: wrangler
48-
run: echo "version=$(jq -r .devDependencies.wrangler package.json | cut -c2-)" >> "$GITHUB_OUTPUT"
49-
5040
- name: Build & Deploy Worker
5141
uses: cloudflare/wrangler-action@da0e0dfe58b7a431659754fdf3f186c529afbe65 # v3.14.1
5242
with:
5343
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
5444
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
55-
wranglerVersion: ${{ steps.wrangler.outputs.version }}
5645
secrets: |
5746
DISCORD_WEBHOOK
5847
PUBLIC_KEY

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ jobs:
2828
- name: Install pnpm
2929
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
3030

31-
- name: Install Node 22
31+
- name: Install Node 24
3232
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
3333
with:
34-
node-version: 22
34+
node-version: 24
3535
cache: 'pnpm'
3636

3737
- name: Install dependencies

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
### Installation
1515

16-
If you haven't already, install [Node.js](https://nodejs.org) `22.0.0` or later.
16+
If you haven't already, install [Node.js](https://nodejs.org) `24.0.0` or later.
1717

1818
Afterwards, install `pnpm` by running `corepack enable`.
1919

@@ -54,7 +54,7 @@ Create a new file in the `src/commands` directory, with the following structure
5454
```ts
5555
import { SlashCommandBuilder } from '@discordjs/builders';
5656
import { type APIApplicationCommandInteraction, InteractionResponseType } from 'discord-api-types/v10';
57-
import { reply } from '../reply.js';
57+
import { reply } from '../reply.ts';
5858

5959
export async function onXSlashCommand(interaction: APIApplicationCommandInteraction) {
6060
return reply(InteractionResponseType.ChannelMessageWithSource, {

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"scripts": {
88
"dev": "wrangler dev",
99
"start": "wrangler dev",
10-
"deploy-commands": "tsx --env-file=.dev.vars scripts/deploy-commands.ts",
10+
"deploy-commands": "node --env-file-if-exists=.dev.vars scripts/deploy-commands.ts",
1111
"check": "biome check",
1212
"check:apply": "biome check --fix --unsafe",
1313
"format": "biome format --write",
@@ -17,7 +17,6 @@
1717
"devDependencies": {
1818
"@biomejs/biome": "^2.0.0",
1919
"@cloudflare/workers-types": "^4.20250617.0",
20-
"tsx": "^4.20.3",
2120
"typescript": "^5.8.3",
2221
"wrangler": "^4.20.0"
2322
},
@@ -29,7 +28,7 @@
2928
"discord-verify": "^1.2.0"
3029
},
3130
"engines": {
32-
"node": ">=22.0.0"
31+
"node": ">=24.0.0"
3332
},
3433
"packageManager": "[email protected]"
3534
}

0 commit comments

Comments
 (0)