Skip to content

Commit d496858

Browse files
sigmachiralityclaudecursoragent
authored
refactor!: [ENG-2327] move from deno to node runtime (#239)
Co-authored-by: danieltaox <danieltaox@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent ddb1e37 commit d496858

80 files changed

Lines changed: 9553 additions & 9526 deletions

Some content is hidden

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

.github/workflows/ci.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,14 @@ on:
77
branches: [main]
88

99
jobs:
10-
# run format, lint, and test
1110
test:
1211
runs-on: ubuntu-latest
1312

1413
steps:
15-
- uses: actions/checkout@v2
16-
- uses: denoland/setup-deno@v2
17-
with:
18-
deno-version-file: .tool-versions
19-
- run: deno install
20-
- run: deno fmt --check
21-
- run: deno lint
22-
- run: deno check --config deno.json .
23-
- run: deno test --allow-all
14+
- uses: actions/checkout@v4
15+
- uses: oven-sh/setup-bun@v2
16+
- uses: biomejs/setup-biome@v2
17+
- run: bun install
18+
- run: biome ci .
19+
- run: bun run check
20+
- run: bun run test

.github/workflows/release.yml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,20 @@ jobs:
2929
fetch-depth: 0
3030
token: ${{ secrets.GITHUB_TOKEN }}
3131

32-
- name: Setup Deno
33-
uses: denoland/setup-deno@v2
34-
with:
35-
deno-version-file: .tool-versions
32+
- name: Setup Bun
33+
uses: oven-sh/setup-bun@v2
3634

37-
- name: Check formatting
38-
run: deno fmt --check
35+
- name: Install dependencies
36+
run: bun install
3937

40-
- name: Run linter
41-
run: deno lint
38+
- name: Lint
39+
run: bun run lint
4240

4341
- name: Type check
44-
run: deno check --config deno.json ./src/index.ts
42+
run: bun run check
4543

4644
- name: Run tests
47-
run: deno test --allow-all
45+
run: bun test
4846

4947
- name: Configure Git
5048
run: |
@@ -55,4 +53,4 @@ jobs:
5553
env:
5654
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5755
run: |
58-
deno run --allow-all src/scripts/release.ts ${{ inputs.version_type }}
56+
bun run src/scripts/release.ts ${{ inputs.version_type }}

.tool-versions

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
nodejs 20.19.0
2-
deno 2.4.2
1+
nodejs 22.22.0

.vscode/extensions.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"recommendations": ["denoland.vscode-deno"]
2+
"recommendations": ["biomejs.biome"]
33
}

.vscode/settings.json

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
{
2-
"deno.enable": true,
3-
"deno.lint": true,
42
"editor.formatOnSave": true,
5-
"editor.defaultFormatter": "denoland.vscode-deno",
6-
"[typescriptreact]": {
7-
"editor.defaultFormatter": "denoland.vscode-deno"
3+
"editor.defaultFormatter": "biomejs.biome",
4+
"editor.codeActionsOnSave": {
5+
"source.fixAll.biome": "explicit"
86
},
97
"[typescript]": {
10-
"editor.defaultFormatter": "denoland.vscode-deno"
8+
"editor.defaultFormatter": "biomejs.biome"
9+
},
10+
"[typescriptreact]": {
11+
"editor.defaultFormatter": "biomejs.biome"
1112
},
1213
"[javascript]": {
13-
"editor.defaultFormatter": "denoland.vscode-deno"
14+
"editor.defaultFormatter": "biomejs.biome"
1415
},
1516
"[javascriptreact]": {
16-
"editor.defaultFormatter": "denoland.vscode-deno"
17-
}
17+
"editor.defaultFormatter": "biomejs.biome"
18+
},
19+
"[json]": {
20+
"editor.defaultFormatter": "biomejs.biome"
21+
},
22+
"typescript.tsdk": "node_modules/typescript/lib",
23+
"typescript.enablePromptUseWorkspaceTsdk": true
1824
}

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,21 +20,19 @@ sf --version # 0.1.0
2020

2121
### Setup
2222

23-
- Install [Deno](https://docs.deno.com/runtime/)
24-
- `2.2.3`
25-
- Install dependencies `deno install`
26-
- Use same mental model as `npm install`
27-
- Auth your CLI with `deno run prod login`
23+
- Install [Node.js](https://nodejs.org/) (v22 or later) - used as the runtime
24+
- Install [Bun](https://bun.sh/) - used as the package manager
25+
- Install dependencies: `bun install`
26+
- Auth your CLI with `bun run prod login`
2827

2928
### Development Loop
3029

3130
- Make code changes
3231
- Test changes with
33-
- `deno run devv` to test against local API
34-
- `deno run prod` to test against production API
35-
- The `deno run <env>` is an alias to the user facing `sf` command. So if you
36-
wanted to run `sf login` locally against the local API, run
37-
`deno run devv login`
32+
- `bun run dev` to test against local API
33+
- `bun run prod` to test against production API
34+
- These are aliases to the user facing `sf` command. So if you wanted to run
35+
`sf login` locally against the local API, run `bun run dev login`
3836

3937
## New Release
4038

@@ -78,10 +76,9 @@ Releases are managed through GitHub Actions. To create a new release:
7876
The workflow will:
7977

8078
- Run quality checks:
81-
- Format checking with `deno fmt`
82-
- Linting with `deno lint`
83-
- Type checking with `deno check`
84-
- Run all tests with `deno test --allow-all`
79+
- Linting with `biome ci`
80+
- Type checking with `tsc --noEmit`
81+
- Run all tests with `vitest`
8582
- Bump the version in package.json
8683
- Create a new GitHub release with compiled binaries
8784
- Push the version bump commit back to main

biome.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.3.11/schema.json",
3+
"assist": { "actions": { "source": { "organizeImports": "on" } } },
4+
"formatter": {
5+
"indentStyle": "space",
6+
"indentWidth": 2
7+
},
8+
"linter": {
9+
"enabled": true,
10+
"rules": {
11+
"correctness": {
12+
"noUnusedImports": "warn"
13+
},
14+
"suspicious": {
15+
"noExplicitAny": "warn"
16+
},
17+
"style": {
18+
"noUselessElse": "off",
19+
"useTemplate": "off"
20+
},
21+
"recommended": true
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)