# Release History

## 0.4.17 (2026-07-28)

### Bugs Fixed

- Pinned `github.com/go-git/go-git/v5` to `v5.16.5`. Newer `v5` releases reject repositories that enable the `worktreeConfig` extension, which is how the SDK automation pipelines check out `azure-sdk-for-go` (`git sparse-checkout init`), causing generation to fail with `core.repositoryformatversion does not support extension: worktreeconfig`.

## 0.4.16 (2026-06-29)

### Features Added

- Added `--filter-test` flag to the `build` command. When provided, hand-written test files (those without the generated-code marker) are excluded from `go build` and `go vet`.

## 0.4.15 (2026-06-12)

### Bugs Fixed

- `UpdateAllVersionFiles` now checks each target file for existence before updating it, skipping missing files (such as `autorest.md`, `version.go`, `go.mod`, or `README.md`) instead of returning an error.

## 0.4.14 (2026-06-03)

### Bugs Fixed

- Bumped `eng/tools/internal` dependency to pick up the fix for the `addConst` panic on untyped consts whose value is a selector expression (e.g. `const EventUpload = exported.EventUpload`).

## 0.4.13 (2026-05-28)

### Bugs Fixed

- Updated `apiVersionConstRegex` to match the current `versionYYYYMMDD[Preview] string = "..."` constant pattern emitted by the generator, so preview packages are no longer misclassified as stable.

## 0.4.12 (2026-05-18)

### Features Added

- Added `--report-file` flag to the `changelog` command. When provided, the command runs in report-only mode: it computes the SDK change report (including `hasBreakingChange` and the generated changelog markdown) and writes it as JSON to the given file path without modifying `CHANGELOG.md`.

## 0.4.11 (2026-05-13)

### Bugs Fixed

- Fixed preview API version detection to recognize const-based API version declarations in newly generated code.

## 0.4.10 (2026-05-12)

### Bugs Fixed

- Re-added cleanup of previously generated SDK files in the TypeSpec update flow for first-time migrations from Swagger to TypeSpec. The TypeSpec emitter's own cleanup does not remove Swagger-generated files because their generated-code header differs from the one written by the emitter.

## 0.4.9 (2026-04-24)

### Bugs Fixed

- Fixed `UpdateModuleDefinition` to remove `retract` directives from `go.mod` when the major version changes, preventing invalid version errors.

## 0.4.8 (2026-04-07)

### Features Added

- Added `metadata` command to create required metadata files (ci.yml, README.md) for packages in inner loop scenarios.

### Other Changes

- Removed the validation that required both `apiVersion` and `sdkReleaseType` to be provided together for self-serve SDK generation. Either parameter can now be omitted and will use its default value.

### Bugs Fixed

- Fixed wrong version calculation logic for previous version with breaking changes.
- Fixed `build.go` deletion to only apply to ARM packages, preserving it for data plane packages that use it for customization.

### Other Changes

- Upgraded Go toolchain pin from `go@1.24.0` to `go@1.25.0` for dependency updates.

## 0.4.7 (2026-03-03)

### Bugs Fixed

- Fixed `GenerateChangelog` to bypass errors when the module doesn't contain any exports instead of failing.

## 0.4.6 (2026-02-26)

### Other Changes

- Refined dependency upgrade logic to use `go get` instead of `go get -u` to prevent unintended upgrades of other dependencies.

## 0.4.5 (2026-02-02)

### Bugs Fixed

- Fixed `FindSDKRoot` to support git worktree workspaces where `.git` is a file instead of a directory.

## 0.4.4 (2026-01-28)

### Bugs Fixed

- Fixed `version` command to skip CHANGELOG.md update when the file doesn't exist and `--sdkversion` is specified.
- Updated `version` command to only update the version in the latest CHANGELOG.md entry (not regenerate changelog content) when `--sdkversion` is specified.
- Use `format.Node` instead of `printer.Fprint` to keep the format aligned with gofmt.

## 0.4.3 (2025-12-17)

### Bugs Fixed

- Add back `go.mod.tpl` for Swagger onboard case since it is a must for `go generate`.

## 0.4.2 (2025-12-08)

### Bugs Fixed

- Move logic of determining preview version after code generation to avoid incorrect version calculation.
- Fix wrong override logic for stable/beta version determination.

## 0.4.1 (2025-12-02)

### Bugs Fixed

- Fix the wrong constant value for beta release type.

## 0.4.0 (2025-12-01)

### Features Added

- Add `changelog` command to generate and update changelog content for SDK packages based on code changes.
- Add `version` command to calculate and update version numbers across all version-related files.
- Add comprehensive helper utilities for package status determination, path resolution, and version management.
- Support detecting parameter renaming as breaking change in changelog generation.

### Breaking Changes

- Split version calculation and changelog generation logic into separate packages (`changelog` and `version`).
- Move constants and enums from `cmd/v2/common` to shared `utils` package for better reusability.
- Refactor `GenerateForSingleRPNamespace` and `GenerateForSingleTypeSpec` to use status-based generator selection.
- Remove template files for CHANGELOG.md and go.mod (now generated programmatically).

### Other Changes

- Upgrade Go version to 1.24.0 for dependency management.

## 0.3.1 (2025-11-13)

### Bugs Fixed

- Fix wrong parsing logic for module name config for swagger with major version suffix.

## 0.3.0 (2025-11-11)

### Features Added

- Add `build` command to build the SDK package.
- Add back `force-stable-version` flag to `release-v2` command to support generating stable version even if input-files contains preview version.

## 0.2.2 (2025-10-14)

### Other Changes

- Fixed Go version and prevented toolchain upgrade in `go get` commands by adding `toolchain@none go@1.23.0` parameters.

## 0.2.1 (2025-09-25)

### Other Changes

- Secure tsp-client usage by using pinned tsp-client versions from `eng/common/tsp-client`.

### Bugs Fixed

- Fixed `FuncFilter` to be compatible with unchanged parameter signatures.

## 0.2.0 (2025-09-18)

### Features Added

- Add `environment` command to check and validate environment prerequisites for Azure Go SDK generation.
- Add `generate` command to generate Azure Go SDK packages from TypeSpec specifications.
- Support major version suffix in the `module` flag to specify the major version of the generated module.

### Bugs Fixed

- Use module as the root of API view generation path.

### Breaking Changes

- Remove `go-version` flag from all commands. It is useless since the code generator could handle it.
- Remove `version-number` flag from all commands. It is no longer supported since the version is now configured in the `module` flag.

### Bugs Fixed

- Refined dependency upgrade logic to explicitly upgrade `azcore` and `azidentity` dependencies instead of using generic `go get -u ./... toolchain@none`

## 0.1.0 (2025-07-21)
- Publish versioning package for generator.
