From 8adc4f38026abee34ad85c15509e90f47644a0d0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 01:10:06 +0000 Subject: [PATCH 1/3] refactor: cross-platform foundation for macOS support --- .stats.yml | 4 ++-- instance.go | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 54f52d3..a4714da 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 37 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-cf9805637aaf9bf590b5ebc1e7430414850aff0c8ad727a017df290ea8df9913.yml -openapi_spec_hash: e27144cf0b24dc74fbdb77d8e24d818f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/kernel%2Fhypeman-0541294848c0b8de2c31a105855c740dc98d1480dd27a20a52d7bc291ba001d8.yml +openapi_spec_hash: 03714883bdadb4a6a743a7faec477a05 config_hash: d67a314ba1fda8242041000fc9160e92 diff --git a/instance.go b/instance.go index dbd6cca..a1d69fd 100644 --- a/instance.go +++ b/instance.go @@ -203,7 +203,7 @@ type Instance struct { HotplugSize string `json:"hotplug_size"` // Hypervisor running this instance // - // Any of "cloud-hypervisor", "qemu". + // Any of "cloud-hypervisor", "qemu", "vz". Hypervisor InstanceHypervisor `json:"hypervisor"` // Network configuration of the instance Network InstanceNetwork `json:"network"` @@ -301,6 +301,7 @@ type InstanceHypervisor string const ( InstanceHypervisorCloudHypervisor InstanceHypervisor = "cloud-hypervisor" InstanceHypervisorQemu InstanceHypervisor = "qemu" + InstanceHypervisorVz InstanceHypervisor = "vz" ) // Network configuration of the instance @@ -472,7 +473,7 @@ type InstanceNewParams struct { GPU InstanceNewParamsGPU `json:"gpu,omitzero"` // Hypervisor to use for this instance. Defaults to server configuration. // - // Any of "cloud-hypervisor", "qemu". + // Any of "cloud-hypervisor", "qemu", "vz". Hypervisor InstanceNewParamsHypervisor `json:"hypervisor,omitzero"` // Network configuration for the instance Network InstanceNewParamsNetwork `json:"network,omitzero"` @@ -510,6 +511,7 @@ type InstanceNewParamsHypervisor string const ( InstanceNewParamsHypervisorCloudHypervisor InstanceNewParamsHypervisor = "cloud-hypervisor" InstanceNewParamsHypervisorQemu InstanceNewParamsHypervisor = "qemu" + InstanceNewParamsHypervisorVz InstanceNewParamsHypervisor = "vz" ) // Network configuration for the instance From e693834704b3541d4a5f260b547026bae8a19b1b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 08:00:32 +0000 Subject: [PATCH 2/3] fix(encoder): correctly serialize NullStruct --- packages/param/encoder.go | 3 +++ packages/param/encoder_test.go | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/packages/param/encoder.go b/packages/param/encoder.go index ea0f39f..c0a7585 100644 --- a/packages/param/encoder.go +++ b/packages/param/encoder.go @@ -83,6 +83,9 @@ func MarshalUnion[T ParamStruct](metadata T, variants ...any) ([]byte, error) { } } if nPresent == 0 || presentIdx == -1 { + if metadata.null() { + return []byte("null"), nil + } if ovr, ok := metadata.Overrides(); ok { return shimjson.Marshal(ovr) } diff --git a/packages/param/encoder_test.go b/packages/param/encoder_test.go index 7ee8719..55afdf7 100644 --- a/packages/param/encoder_test.go +++ b/packages/param/encoder_test.go @@ -363,3 +363,15 @@ func TestOverriddenUnion(t *testing.T) { }) } } + +func TestNullStructUnion(t *testing.T) { + nullUnion := param.NullStruct[PrimitiveUnion]() + + b, err := json.Marshal(nullUnion) + if err != nil { + t.Fatalf("didn't expect error %v", err) + } + if string(b) != "null" { + t.Fatalf("expected null, received %s", string(b)) + } +} From b2420e7a1366e832e2ae0b4ff692c5e48c59a337 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 08:00:51 +0000 Subject: [PATCH 3/3] release: 0.9.7 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ README.md | 2 +- internal/version.go | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8e9551f..ba2fd07 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.9.6" + ".": "0.9.7" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c46e448..89f526d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## 0.9.7 (2026-02-11) + +Full Changelog: [v0.9.6...v0.9.7](https://github.com/kernel/hypeman-go/compare/v0.9.6...v0.9.7) + +### Bug Fixes + +* **encoder:** correctly serialize NullStruct ([e693834](https://github.com/kernel/hypeman-go/commit/e693834704b3541d4a5f260b547026bae8a19b1b)) + + +### Refactors + +* cross-platform foundation for macOS support ([8adc4f3](https://github.com/kernel/hypeman-go/commit/8adc4f38026abee34ad85c15509e90f47644a0d0)) + ## 0.9.6 (2026-01-30) Full Changelog: [v0.9.0...v0.9.6](https://github.com/kernel/hypeman-go/compare/v0.9.0...v0.9.6) diff --git a/README.md b/README.md index 4a876db..8c766d2 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ Or to pin the version: ```sh -go get -u 'github.com/kernel/hypeman-go@v0.9.6' +go get -u 'github.com/kernel/hypeman-go@v0.9.7' ``` diff --git a/internal/version.go b/internal/version.go index d7771e2..1a59fa9 100644 --- a/internal/version.go +++ b/internal/version.go @@ -2,4 +2,4 @@ package internal -const PackageVersion = "0.9.6" // x-release-please-version +const PackageVersion = "0.9.7" // x-release-please-version