From 95828d3417304b4d675220addf586096d238f5d4 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Thu, 1 Oct 2026 16:05:57 +0200 Subject: [PATCH 1/2] feat(base): export the package.json Consumers like Renovate can read the package version and compare it with an image's containerbase version. Co-Authored-By: Claude Opus 5.5 --- packages/base/README.md | 8 ++++++++ packages/base/package.json | 1 + 2 files changed, 9 insertions(+) diff --git a/packages/base/README.md b/packages/base/README.md index 531370372f..a22e3d0a98 100644 --- a/packages/base/README.md +++ b/packages/base/README.md @@ -6,6 +6,14 @@ The data is generated from the Containerbase sources and released with the same This allows a consumer of this library to determine which tools can be used with a given version of Containerbase (via `/usr/local/containerbase/version`): if the image has the same major version as this package and a version greater than or equal to the package version, every tool listed here can be installed in that image. A new major version may remove tools, so compare against the package of the image's major version. +The package version to compare with is exported too: + +```ts +import pkg from '@containerbase/base/package.json' with { type: 'json' }; + +pkg.version; // eg. '14.2.0' +``` + ## Usage ```ts diff --git a/packages/base/package.json b/packages/base/package.json index e45fb3e2ab..d33189434b 100644 --- a/packages/base/package.json +++ b/packages/base/package.json @@ -23,6 +23,7 @@ "types": "./dist/zod.d.ts", "default": "./dist/zod.js" }, + "./package.json": "./package.json", "./tools.json": "./data/tools.json", "./tools.schema.json": "./data/tools.schema.json" }, From 307788549cc35e4afb898776b664fad269958090 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Thu, 1 Oct 2026 15:35:39 +0200 Subject: [PATCH 2/2] feat: publish the @containerbase/base package semantic-release now writes the release version into the workspace packages and publishes @containerbase/base with pnpm, after the images are pushed. Publishing uses npm trusted publishing via the release job's id-token. Co-Authored-By: Claude Opus 5.5 --- .releaserc.json | 3 ++- package.json | 1 + pnpm-lock.yaml | 17 +++++++++++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/.releaserc.json b/.releaserc.json index ceee213358..6d97341184 100644 --- a/.releaserc.json +++ b/.releaserc.json @@ -41,7 +41,8 @@ "prepareCmd": "pnpm release:prepare --release=${nextRelease.version} --channel='${branch.channel ?? ''}' --sha=${nextRelease.gitHead}", "publishCmd": "pnpm release:publish --release=${nextRelease.version} --channel='${branch.channel ?? ''}' --sha=${nextRelease.gitHead}" } - ] + ], + "@containerbase/semantic-release-pnpm" ], "analyzeCommits": { "releaseRules": [ diff --git a/package.json b/package.json index 2cce898063..e185537afc 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ "devDependencies": { "@containerbase/eslint-plugin": "2.1.1", "@containerbase/istanbul-reports-html": "2.0.19", + "@containerbase/semantic-release-pnpm": "1.4.3", "@eslint/js": "10.0.1", "@semantic-release/exec": "7.1.0", "@tsconfig/node24": "24.0.5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 04bd67ff02..7cccc237ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -91,6 +91,9 @@ importers: '@containerbase/istanbul-reports-html': specifier: 2.0.19 version: 2.0.19 + '@containerbase/semantic-release-pnpm': + specifier: 1.4.3 + version: 1.4.3(semantic-release@25.0.9(supports-color@7.2.0)(typescript@6.0.3)) '@eslint/js': specifier: 10.0.1 version: 10.0.1(eslint@10.11.0(supports-color@7.2.0)) @@ -303,6 +306,12 @@ packages: resolution: {integrity: sha512-rKEi42KqcYT3w8h+8nMO9jMnfZt5Vd+n+ANDlOZJVEXwy4f44rfmEyC4yjjQGaeTbKAGHqXpFzz1E4XA+scE8w==} engines: {node: ^22.11.0 || >=24.0.0, pnpm: '>=10.0.0'} + '@containerbase/semantic-release-pnpm@1.4.3': + resolution: {integrity: sha512-dOMyBw+mzcKHt6OqYyRj6arFeszoINlNRq1eIR7oEE0TB0i0lhj8BsJ/2IFISJUPwf9lUxKbV8ES6vjqqMIQYg==} + engines: {node: ^22.11.0 || ^24} + peerDependencies: + semantic-release: ^24.0.0 || ^25.0.0 + '@emnapi/core@1.10.0': resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} @@ -4007,6 +4016,14 @@ snapshots: dependencies: istanbul-reports: 3.2.0 + '@containerbase/semantic-release-pnpm@1.4.3(semantic-release@25.0.9(supports-color@7.2.0)(typescript@6.0.3))': + dependencies: + '@semantic-release/error': 4.0.0 + aggregate-error: 5.0.0 + execa: 9.6.1 + semantic-release: 25.0.9(supports-color@7.2.0)(typescript@6.0.3) + semver: 7.8.5 + '@emnapi/core@1.10.0': dependencies: '@emnapi/wasi-threads': 1.2.1