Skip to content

Commit ab30fb8

Browse files
committed
Fix the linux cli and add a test to ensure it doesn't break again in the future.
1 parent 729d318 commit ab30fb8

File tree

5 files changed

+20
-5
lines changed

5 files changed

+20
-5
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# mycoder
22

3+
## 0.0.17
4+
5+
### Patch Changes
6+
7+
- Fix the linux cli and add a test to ensure it doesn't break again.
8+
39
## 0.0.16
410

511
### Patch Changes

bin/cli.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#!/usr/bin/env node --no-deprecation
2-
import "../dist/index.js";
1+
#!/usr/bin/env node
2+
import "../dist/index.js";

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "mycoder",
33
"description": "A command line tool using agent that can do arbitrary tasks, including coding tasks",
4-
"version": "0.0.16",
4+
"version": "0.0.17",
55
"type": "module",
66
"bin": "./bin/cli.js",
77
"main": "./dist/index.js",
@@ -53,7 +53,6 @@
5353
"chalk": "^5",
5454
"dotenv": "^16",
5555
"playwright": "^1.50.1",
56-
5756
"source-map-support": "^0.5",
5857
"uuid": "^11",
5958
"yargs": "^17",

tests/cli.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import { expect, test, describe } from 'vitest'
2+
import { execSync } from 'child_process'
3+
import { version } from '../package.json'
4+
5+
describe('CLI', () => {
6+
test('version command outputs correct version', () => {
7+
const output = execSync('node ./bin/cli.js --version').toString()
8+
expect(output.trim()).toContain(version)
9+
})
10+
})

vitest.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { defineConfig } from "vitest/config";
22

33
export default defineConfig({
44
test: {
5-
include: ["src/**/*.test.ts"],
5+
include: ["src/**/*.test.ts", "tests/**/*.test.ts"],
66
environment: "node",
77
globals: true,
88
},

0 commit comments

Comments
 (0)