From 95828d3417304b4d675220addf586096d238f5d4 Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Thu, 1 Oct 2026 16:05:57 +0200 Subject: [PATCH] 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" },