Skip to content

Commit 1c989c9

Browse files
authoredFeb 23, 2024··
Fix knip --version command (#519)
1 parent fabacab commit 1c989c9

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed
 

‎packages/knip/src/version.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const version = '4.4.0';
1+
export const version = '5.0.1';

‎packages/knip/test/cli.test.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import assert from 'node:assert/strict';
22
import test from 'node:test';
33
import { helpText } from '../src/util/cli-arguments.js';
4+
import { loadJSON } from '../src/util/fs.js';
45
import { resolve } from '../src/util/path.js';
56
import { version } from '../src/version.js';
67
import { execFactory } from './helpers/exec.js';
@@ -9,8 +10,11 @@ const cwd = resolve('fixtures/cli');
910

1011
const exec = execFactory(cwd);
1112

12-
test('knip --version', () => {
13+
test('knip --version', async () => {
1314
assert.equal(exec('knip --version').stdout, version);
15+
16+
const contents = await loadJSON(resolve('package.json'));
17+
assert.equal(version, contents.version);
1418
});
1519

1620
test('knip --help', () => {

0 commit comments

Comments
 (0)
Please sign in to comment.