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
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.3.2"
".": "0.4.0"
}
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* **image inspect:** `mocker image inspect` and `mocker inspect --type=image` now return Docker-compatible `ImageInspect` JSON arrays with PascalCase keys instead of the previous lowercase `ImageInfo` object shape.
* **MockerKit:** `ImageManager.inspect(_:platform:)` returns `ImageInspect` instead of `ImageInfo`.

## [0.4.0](https://github.com/us/mocker/compare/v0.3.2...v0.4.0) (2026-06-16)


### ⚠ BREAKING CHANGES

* image inspect output now uses the Docker ImageInspect shape — a JSON array of objects with PascalCase keys (Id, RepoTags, Created, Size, Config, RootFS, ...) instead of a single object with lowercase keys (id, repository, tag, size, created, labels). The Id field now reports the image config digest (Docker parity) rather than the index digest, so it differs from 'mocker images'. MockerKit consumers: ImageManager.inspect(_:) now returns ImageInspect (was ImageInfo) and takes an optional platform: argument.

### Bug Fixes

* add Docker-compatible ImageInspect model and mapping ([aa318d5](https://github.com/us/mocker/commit/aa318d538cf7b7128ccb8b5cb12487971914c9d9))
* address image inspect review feedback ([8c6c5ec](https://github.com/us/mocker/commit/8c6c5ec3af2df20366b81eeefa84f53b87df7c3c))
* **compose:** forward published ports ([#19](https://github.com/us/mocker/issues/19)) and accept -f before subcommand ([#21](https://github.com/us/mocker/issues/21)) ([#22](https://github.com/us/mocker/issues/22)) ([5255e50](https://github.com/us/mocker/commit/5255e503044246c80d6076f008f2dc4ac6d0e323))
* make image inspect Docker-compatible and honor --type ([2b80af3](https://github.com/us/mocker/commit/2b80af3862298a5f66dfa5332b88f4b62f673772))

## [0.3.2](https://github.com/us/mocker/compare/v0.3.1...v0.3.2) (2026-06-11)


Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ Your existing `docker-compose.yml` works as-is.

## What's New

### v0.4.0 — Docker-compatible image inspect
- **Docker-compatible `ImageInspect` output** — `mocker image inspect` and `mocker inspect --type image` now emit the same Docker-shaped JSON array with PascalCase keys.
- **Real image metadata** — image inspect now reads OCI manifest/config data for `Size`, `Created`, `Architecture`, `Os`, `Config`, `RootFS`, repo tags, and repo digests instead of returning stubbed values.
- **Inspect routing fixes** — `mocker inspect --type image|container` now validates type values, and `--platform` is honored for image inspection.
- **Compose fixes** — published ports are forwarded correctly and `compose -f ... up` works when `-f` appears before the subcommand.
- **BREAKING**: image inspect output changed from the old lowercase `ImageInfo` object shape to Docker-compatible `ImageInspect` arrays; `MockerKit.ImageManager.inspect(_:platform:)` now returns `ImageInspect`.

### v0.3.0 — Multi-arch images
- **`mocker manifest`** subcommand group — `create`, `inspect`, `add`, `rm`, `annotate`, `push` for assembling and publishing OCI image indexes (multi-arch manifest lists). Pure-Swift via Containerization, no skopeo required (closes #9, #11)
- **Multi-platform builds** — `mocker build --platform linux/amd64 --platform linux/arm64 -t img:tag .` produces a single multi-arch image
Expand Down
7 changes: 7 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,13 @@ mocker exec -it my-app sh

## 最新更新

### v0.4.0 — Docker 兼容的镜像检查
- **Docker 兼容的 `ImageInspect` 输出** — `mocker image inspect` 和 `mocker inspect --type image` 现在输出相同的 Docker 风格 JSON 数组,并使用 PascalCase 字段名。
- **真实镜像元数据** — 镜像检查会读取 OCI manifest/config 中的 `Size`、`Created`、`Architecture`、`Os`、`Config`、`RootFS`、repo tags 和 repo digests,不再返回占位值。
- **Inspect 路由修复** — `mocker inspect --type image|container` 会校验类型值,镜像检查也会正确处理 `--platform`。
- **Compose 修复** — 发布端口会被正确转发,且 `compose -f ... up` 支持在子命令前传入 `-f`。
- **BREAKING**:镜像检查输出从旧的 lowercase `ImageInfo` 对象变为 Docker 兼容的 `ImageInspect` 数组;`MockerKit.ImageManager.inspect(_:platform:)` 现在返回 `ImageInspect`。

### v0.2.1 — 嵌套虚拟化
- **`--virtualization` / `--kernel`** 适用于 `mocker run` 和 `mocker create` — 向容器暴露嵌套虚拟化能力(closes #4)

Expand Down
2 changes: 1 addition & 1 deletion Sources/Mocker/Commands/Version.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ struct Version: AsyncParsableCommand {
)

// x-release-please-start-version
static let currentVersion = "0.3.2"
static let currentVersion = "0.4.0"
// x-release-please-end

@Option(name: .shortAndLong, help: "Format output using a custom template")
Expand Down
2 changes: 1 addition & 1 deletion Tests/MockerTests/CLITests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ struct CLITests {
let version = Version.currentVersion
#expect(!version.isEmpty)
// x-release-please-start-version
#expect(version == "0.3.2")
#expect(version == "0.4.0")
// x-release-please-end
}

Expand Down
Loading