Skip to content

Use package.json as the single source of truth for CLI version#60

Draft
Copilot wants to merge 1 commit intomainfrom
copilot/fix-ol-versions-return
Draft

Use package.json as the single source of truth for CLI version#60
Copilot wants to merge 1 commit intomainfrom
copilot/fix-ol-versions-return

Conversation

Copy link
Copy Markdown

Copilot AI commented Apr 11, 2026

ol --version was reporting a stale hardcoded value from src/index.ts instead of the package’s actual release version. This caused version output drift whenever package.json was updated.

  • Version source correction

    • Updated CLI program metadata in src/index.ts to read version from package.json rather than a literal string.
    • Aligns runtime version output with published package metadata.
  • Impact

    • ol --version now reflects the current package version consistently across releases.
import packageJson from '../package.json' with { type: 'json' }

program
	.name('ol')
	.version(packageJson.version)

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants