Skip to content

CLI reports version 0.1.2 — .version() hardcoded in packages/cli/src/index.ts, diverged from package.json 0.3.0 #24

Description

@Seitbekovvaa

skillx --version prints 0.1.2 on a freshly installed skillx-sh@0.3.0. The Commander .version() call is a hardcoded literal that release tooling never updates, so it has been frozen since 0.1.2 while the package moved through 0.1.3 → 0.2.0 → 0.3.0.

Source

packages/cli/src/index.ts:15

  .version('0.1.2');

packages/cli/package.json is at "version": "0.3.0", matching dist-tags.latest on npm and the top entry of packages/cli/CHANGELOG.md.

Repro

npm install -g skillx-sh
skillx --version          # -> 0.1.2
npm ls -g skillx-sh       # -> skillx-sh@0.3.0

Confirmed in the published artifact too — dist/index.js contains version("0.1.2").

Why it matters

--version is the first thing anyone is asked for in a bug report, so every report against the CLI will carry a version string two minors stale. It also makes "are you on the latest?" unanswerable without inspecting node_modules.

Suggested fix

Read it from the manifest instead of restating it, so release-please stays the single source of truth:

import pkg from '../package.json' with { type: 'json' };
// ...
  .version(pkg.version);

(or inject it at build time from process.env.npm_package_version, whichever fits the existing bundling setup). A CI assertion that .version() matches package.json would keep it from drifting again.

Found while installing and exercising the CLI; verified against npm and the repo at main.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions