Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/cli-version-from-package.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@maple-dev/changesets": patch
---

`changeset --version` reports the installed version instead of a hardcoded 0.1.0.
4 changes: 2 additions & 2 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { shouldSkipPackage, skipOptions } from "./config.ts"
import { CommandExit, UnsupportedFeatureError } from "./errors.ts"
import { lessThan, type BumpType } from "./semver.ts"
import type { ComprehensiveRelease, Package, Release } from "./types.ts"

const version = "0.1.0"
// Inlined at build time, so `--version` always matches the published version.
import { version } from "../package.json" with { type: "json" }

const listFlag = (name: string, description: string) =>
Flag.String(name).pipe(
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"lib": ["ES2023"],
"types": ["node"],
"moduleResolution": "bundler",
"resolveJsonModule": true,
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"erasableSyntaxOnly": true,
Expand Down
Loading