Skip to content

Commit ca334a7

Browse files
authored
chore: upgrade all dependencies; migrate to TypeScript 7, Bun and Biome (#13)
* chore: upgrade all dependencies; migrate to TypeScript 7, Bun and Biome - typescript 4.9 -> 7.0 (module/moduleResolution node16, target ES2022) - @types/node 16 -> 26, @types/vscode 1.93 -> 1.146 - engines.vscode raised from ^1.70.0 to ^1.146.0 - ignore, mocha, @vscode/vsce patch/minor updates - overrides for glob and minimatch to clear audit advisories - Bun replaces npm for installs and scripts (bun.lock replaces package-lock.json) - Biome added for linting and formatting; sources formatted and lint fixes applied - CI, Dependabot and docs updated accordingly * chore: let Biome accept platform line endings
1 parent ae129eb commit ca334a7

34 files changed

Lines changed: 1593 additions & 3040 deletions

‎.github/dependabot.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
3+
- package-ecosystem: bun
44
directory: /
55
schedule:
66
interval: monthly

‎.github/workflows/ci.yml‎

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,21 @@ jobs:
2525
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
2626
with:
2727
node-version: 24
28-
cache: npm
29-
- run: npm ci
30-
- run: npm test
28+
package-manager-cache: false
29+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
30+
with:
31+
bun-version: 1.4.3
32+
- run: bun install --frozen-lockfile
33+
- run: bun run lint
34+
- run: bun run test
3135
- name: Extension host (Linux)
3236
if: runner.os == 'Linux'
33-
run: xvfb-run -a npm run test:integration
37+
run: xvfb-run -a bun run test:integration
3438
- name: Extension host (Windows)
3539
if: runner.os == 'Windows'
36-
run: npm run test:integration
37-
- run: npm audit --audit-level=low
38-
- run: npm run package
40+
run: bun run test:integration
41+
- run: bun audit --audit-level=low
42+
- run: bun run package
3943
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
4044
with:
4145
name: vsix-${{ matrix.os }}
@@ -58,8 +62,11 @@ jobs:
5862
with:
5963
node-version: 24
6064
package-manager-cache: false
61-
- run: npm ci
62-
- run: npm run package
65+
- uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
66+
with:
67+
bun-version: 1.4.3
68+
- run: bun install --frozen-lockfile
69+
- run: bun run package
6370
- name: Create draft, attach assets, and publish
6471
env:
6572
GH_TOKEN: ${{ github.token }}

‎.vscodeignore‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ integration-test.log
1111
.github/**
1212
scripts/**
1313
*.sha256
14+
biome.json
15+
bun.lock

‎CONTRIBUTING.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,25 @@ git checkout -b feature/my-new-feature
3333

3434
### 5. Compile and Test Your Changes
3535

36-
Use Node.js 22.12+ (Node 24 recommended) and Git. Install dependencies and compile the TypeScript sources:
36+
Use [Bun](https://bun.sh) 1.4+, Node.js 22.12+ (Node 24 recommended) and Git. Bun installs dependencies and runs scripts; Node is still needed for packaging and the extension-host tests. Install dependencies and compile the TypeScript sources:
3737

3838
```
39-
npm ci
40-
npm run compile
39+
bun install --frozen-lockfile
40+
bun run compile
4141
```
4242

43-
If you made significant changes, also run tests to ensure everything works correctly:
43+
If you made significant changes, also run the linter and tests to ensure everything works correctly:
4444

4545
```
46-
npm test
46+
bun run lint
47+
bun run test
4748
```
4849

49-
Unit tests exercise production modules and use temporary Git repositories (Git must be installed). Run `npm run test:integration` for VS Code extension-host tests and `npm run package` to build a VSIX. Compiled output lives in `out/`; do not add generated JavaScript under `src/`.
50+
Unit tests exercise production modules and use temporary Git repositories (Git must be installed). Run `bun run test:integration` for VS Code extension-host tests and `bun run package` to build a VSIX. Formatting and linting use Biome (`bun run lint:fix` applies fixes). Compiled output lives in `out/`; do not add generated JavaScript under `src/`.
5051

5152
### Release maintainers
5253

53-
Update `package.json`, the lockfile, changelog, README and `releases/RELEASE-NOTES-<version>.md`. A commit on `main` whose message starts with `release:` triggers publication **only after both Windows and Linux CI jobs pass**. The release job packages the verified commit, creates a draft with the VSIX and SHA-256 checksum, and publishes it as the latest GitHub release. Ordinary commits and pull requests cannot publish. Existing release tags are not overwritten. Marketplace publication remains a separate explicit action.
54+
Update `package.json`, `bun.lock`, changelog, README and `releases/RELEASE-NOTES-<version>.md`. A commit on `main` whose message starts with `release:` triggers publication **only after both Windows and Linux CI jobs pass**. The release job packages the verified commit, creates a draft with the VSIX and SHA-256 checksum, and publishes it as the latest GitHub release. Ordinary commits and pull requests cannot publish. Existing release tags are not overwritten. Marketplace publication remains a separate explicit action.
5455

5556
### 6. Commit Your Changes
5657

‎README.md‎

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CodebaseMD runs locally. It does not upload your source code or call an AI provi
2020
3. Open a local workspace and run **CodebaseMD: Export Wizard** from the Command Palette.
2121
4. Choose your scope, content mode, output format, and destination.
2222

23-
The Marketplace has its own publication schedule; use the GitHub VSIX for this release. VS Code 1.70 or later is required. Git is needed only for Git exports.
23+
The Marketplace has its own publication schedule; use the GitHub VSIX for this release. VS Code 1.146 or later is required. Git is needed only for Git exports.
2424

2525
## What's new in version 3.0.0
2626

@@ -94,16 +94,17 @@ These rules also apply to explicit selections. See [configuration examples](docs
9494

9595
## Development
9696

97-
Use Node.js 22.12+ (Node 24 recommended) and Git:
97+
Use [Bun](https://bun.sh) 1.4+, Node.js 22.12+ (Node 24 recommended) and Git:
9898

9999
```sh
100-
npm ci
101-
npm test
102-
npm run test:integration
103-
npm run package
100+
bun install --frozen-lockfile
101+
bun run lint
102+
bun run test
103+
bun run test:integration
104+
bun run package
104105
```
105106

106-
Unit tests import production modules and create temporary Git repositories. Integration tests launch a VS Code host and verify commands, clipboard output, and unsaved content. Linux integration tests require a display (`xvfb-run -a npm run test:integration` in CI). The CI workflow tests Windows and Linux and retains the built VSIX as an artifact.
107+
Unit tests import production modules and create temporary Git repositories. Integration tests launch a VS Code host and verify commands, clipboard output, and unsaved content. Linux integration tests require a display (`xvfb-run -a bun run test:integration` in CI). The CI workflow tests Windows and Linux and retains the built VSIX as an artifact.
107108

108109
See [contributing](CONTRIBUTING.md), the [developer module reference](docs/api-reference.md), and the [research and implementation plan](docs/v3-plan.md). The separate [web prototype](CodebaseMD-Web/README.md) is not part of this extension release.
109110

‎biome.json‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/2.6.6/schema.json",
3+
"vcs": {
4+
"enabled": true,
5+
"clientKind": "git",
6+
"useIgnoreFile": true
7+
},
8+
"files": {
9+
"ignoreUnknown": true,
10+
"includes": ["src/**", "scripts/**", "*.json"]
11+
},
12+
"formatter": {
13+
"enabled": true,
14+
"indentStyle": "space",
15+
"indentWidth": 2,
16+
"lineWidth": 120,
17+
"lineEnding": "auto"
18+
},
19+
"linter": {
20+
"enabled": true,
21+
"rules": {
22+
"preset": "recommended"
23+
}
24+
},
25+
"javascript": {
26+
"formatter": {
27+
"quoteStyle": "single"
28+
}
29+
},
30+
"assist": {
31+
"enabled": true,
32+
"actions": {
33+
"source": {
34+
"organizeImports": "on"
35+
}
36+
}
37+
}
38+
}

0 commit comments

Comments
 (0)