Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(cli): `integration pack` without --check points only at `integration verify` (#6955)

Joey27a50798c391
diff --git a/.changeset/integration-pack-points-at-verify.md b/.changeset/integration-pack-points-at-verify.md
new file mode 100644
index 0000000000..612fdc7ff9
--- /dev/null
+++ b/.changeset/integration-pack-points-at-verify.md
@@ -0,0 +1,9 @@
+---
+'@astryxdesign/cli': patch
+---
+
+[fix] `astryx integration pack` without `--check` now points only at `astryx integration verify`.
+
+It used to say "Pass --check to verify the integration tarball, or run `astryx integration verify`", which sent people to the deprecated spelling. It now says that `integration pack` is now `integration verify`, and that `npm pack` builds the tarball. The error code and exit code are unchanged, and `integration pack --check` still runs the same check as before.
+
+@josephfarina
diff --git a/packages/cli/clients/cli/commands/integration-authoring.test.mjs b/packages/cli/clients/cli/commands/integration-authoring.test.mjs
index 47493833e7..eacc098bbd 100644
--- a/packages/cli/clients/cli/commands/integration-authoring.test.mjs
+++ b/packages/cli/clients/cli/commands/integration-authoring.test.mjs
@@ -174,11 +174,21 @@ describe('integration authoring CLI', () => {
expect(text.stdout).toBe(verifyText.stdout);
expect(text.stderr).toContain('`integration pack --check` is deprecated');
expect(text.stderr).toContain('astryx integration verify');
- // Without --check it fails, as it did, and names both spellings.
+ // Without --check it fails, as it did, and points only at the new name:
+ // suggesting `--check` would send people to the deprecated spelling.
const bare = await runCli(['integration', 'pack'], tmpDir);
expect(bare.status).not.toBe(0);
- expect(bare.stderr).toContain('--check');
+ expect(bare.stderr).toContain(
+ '`integration pack` is now `integration verify`',
+ );
expect(bare.stderr).toContain('astryx integration verify');
+ expect(bare.stderr).toContain('npm pack');
+ expect(bare.stderr).not.toContain('--check');
+ const bareJson = await runCli(['--json', 'integration', 'pack'], tmpDir);
+ expect(parseEnvelope(bareJson.stdout)).toMatchObject({
+ code: 'ERR_INVALID_ARGUMENT',
+ error: expect.stringContaining('astryx integration verify'),
+ });
// Help lists it, marked deprecated: nothing is hidden.
const help = await runCli(['integration', '--help'], tmpDir);
expect(help.stdout).toMatch(
diff --git a/packages/cli/clients/cli/commands/integration.mjs b/packages/cli/clients/cli/commands/integration.mjs
index 355dbcc2fc..dd562e2c25 100644
--- a/packages/cli/clients/cli/commands/integration.mjs
+++ b/packages/cli/clients/cli/commands/integration.mjs
@@ -169,8 +169,9 @@ export function registerIntegration(program) {
fn: integrationPackCheckFn,
action: async options => {
if (!options.check) {
+ // One way forward: the new name. `npm pack` is what builds a tarball.
return cliError(
- 'Pass --check to verify the integration tarball, or run `astryx integration verify`.',
+ '`integration pack` is now `integration verify`: run `astryx integration verify` to check the package the way npm will publish it. To build the tarball, run `npm pack`.',
{code: ERROR_CODES.ERR_INVALID_ARGUMENT},
);
}