refactor(workspace): rename @ktx/cli to @kaelio/ktx and pack it directly

Promote the CLI workspace package to the public name `@kaelio/ktx` and
drop the separate `scripts/build-public-npm-package.mjs` wrapper. The
CLI package is now publishable in place (`publishConfig.access: public`,
`provenance: true`), so artifact packing uses `pnpm pack` against
`packages/cli/` instead of assembling a parallel package tree.

Updates all workspace filter invocations, docs, tests, and release
readiness checks to reference the new package name, and folds the
tarball-name helper into `scripts/public-npm-release-metadata.mjs`.
This commit is contained in:
Andrey Avtomonov 2026-05-21 13:05:14 +02:00
parent 34d4a1e9e1
commit aa523f9ab3
31 changed files with 99 additions and 452 deletions

View file

@ -19,7 +19,7 @@ import {
const require = createRequire(import.meta.url);
const cliPackageJson = require('@ktx/cli/package.json') as { name: string; version: string };
const cliPackageJson = require('@kaelio/ktx/package.json') as { name: string; version: string };
const cliVersion = cliPackageJson.version;
function makeIo(options: { stdoutIsTty?: boolean } = {}) {
@ -47,16 +47,16 @@ function makeIo(options: { stdoutIsTty?: boolean } = {}) {
describe('getKtxCliPackageInfo', () => {
it('identifies the CLI package', () => {
expect(getKtxCliPackageInfo()).toEqual({
name: '@ktx/cli',
name: '@kaelio/ktx',
version: cliVersion,
});
});
it('exports package metadata for package managers and runtime diagnostics', () => {
const packageJson = require('@ktx/cli/package.json') as { name: string; version: string };
const packageJson = require('@kaelio/ktx/package.json') as { name: string; version: string };
expect(packageJson).toMatchObject({
name: '@ktx/cli',
name: '@kaelio/ktx',
version: cliVersion,
});
expect(cliVersion).toMatch(/^\d+\.\d+\.\d+/);
@ -116,7 +116,7 @@ describe('runKtxCli', () => {
await expect(runKtxCli(['--version'], testIo.io)).resolves.toBe(0);
expect(testIo.stdout()).toBe(`@ktx/cli ${cliVersion}\n`);
expect(testIo.stdout()).toBe(`@kaelio/ktx ${cliVersion}\n`);
expect(testIo.stderr()).toBe('');
});