Skip to content

Commit 8aac4ef

Browse files
[AI] Remove legacy query subcommand alias
1 parent b8de1de commit 8aac4ef

4 files changed

Lines changed: 11 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ jobs:
117117
)
118118
119119
if [ "${{ matrix.runtime }}" = "bun" ]; then
120-
bun run src/cli.ts query --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
120+
bun run src/cli.ts --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
121121
elif [ "${{ matrix.runtime }}" = "node" ]; then
122-
node dist/cli.js query --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
122+
node dist/cli.js --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
123123
else
124-
deno run -A dist/cli.js query --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
124+
deno run -A dist/cli.js --yaml "$QUERY_YAML" --dir fixtures/vaults/basic --format json >/tmp/mdbase-output.json
125125
fi
126126
127127
- name: Validate output

README.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,18 +30,12 @@ mdbasequery --help
3030

3131
### Command Model
3232

33-
Primary form:
33+
Command form:
3434

3535
```bash
3636
mdbasequery [options]
3737
```
3838

39-
Compatibility alias (also supported):
40-
41-
```bash
42-
mdbasequery query [options]
43-
```
44-
4539
There is one command surface; all behavior is controlled through options.
4640

4741
### Query Input Modes

src/cli.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ function parseCli(argv: string[]): CliOptions {
103103

104104
const args = [...argv];
105105

106-
if (args[0] === "query") {
107-
args.shift();
108-
}
109-
110106
for (let index = 0; index < args.length; index += 1) {
111107
const token = args[index];
112108

tests/cli.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,11 @@ describe("cli integration", () => {
7575
expect(result.status).toBe(1);
7676
expect(result.stderr).toContain("view not found");
7777
});
78+
79+
test("rejects deprecated query subcommand", () => {
80+
const result = runCli(["query", "--help"]);
81+
82+
expect(result.status).toBe(1);
83+
expect(result.stderr).toContain("unknown option: query");
84+
});
7885
});

0 commit comments

Comments
 (0)