Skip to content
This repository was archived by the owner on Mar 8, 2022. It is now read-only.

Commit 4318c50

Browse files
committed
Dont import package.json
1 parent d934def commit 4318c50

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/Cli.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { GraphQLClient } from "graphql-request";
44
import ora from "ora";
55
import os from "os";
66
import path from "path";
7-
import pkg from "../package.json";
87
import SettingsManager from "./SettingsManager";
98

109
export default abstract class CLI {
@@ -49,7 +48,7 @@ export default abstract class CLI {
4948
this.OS_USERNAME = os.userInfo().username;
5049
this.NODE_VERSION = process.versions.node;
5150
this.NODE_PATH = process.env.NODE;
52-
this.PKG_VERSION = pkg.version || "unknown";
51+
this.PKG_VERSION = "unknown";
5352
this.LANG = process.env.LANG;
5453
this.KMDR_PATH = path.join(this.OS_HOME_PATH, ".kmdr");
5554
this.KMDR_AUTH_FILE = path.join(this.KMDR_PATH, "auth");

src/kmdr.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ class KMDR {
1313
private welcomeMsg = `The CLI tool for learning commands from your terminal\n\nLearn more at https://kmdr.sh/`;
1414

1515
public init() {
16-
this.arg
17-
.description(this.welcomeMsg)
18-
.version(process.env.npm_package_version || "unknown", "-v, --version");
16+
this.arg.description(this.welcomeMsg).version("unknown", "-v, --version");
1917
// this.cli.command("config").alias("c").description("Configure kmdr-cli").action(this.config);
2018
this.arg
2119
.command("explain")

0 commit comments

Comments
 (0)