Skip to content

feat: show deprecation warning for all commands, not just service:*#2695

Open
dotdat wants to merge 1 commit into
masterfrom
deprecate-all-commands
Open

feat: show deprecation warning for all commands, not just service:*#2695
dotdat wants to merge 1 commit into
masterfrom
deprecate-all-commands

Conversation

@dotdat

@dotdat dotdat commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • client:* commands (e.g. client:check, client:push, client:codegen) previously showed no deprecation warning at all
  • Moves printDeprecationWarning() into ProjectCommand.init() so every command emits the warning automatically
  • Adds a _deprecationWarningPrinted guard to make the method idempotent, preventing service:* commands (which still call it explicitly in run()) from double-printing
  • Includes a changeset for a patch bump on the apollo package

Test plan

  • Run any client:* command (e.g. apollo client:check --help) — deprecation warning should appear on stderr
  • Run any service:* command (e.g. apollo service:check --help) — deprecation warning should appear exactly once

Previously only service:* commands called printDeprecationWarning() in
their individual run() methods. client:* commands (client:check,
client:push, client:codegen, etc.) showed no deprecation notice at all.

This moves the call into ProjectCommand.init(), which is the oclif
lifecycle hook that runs before every command's run() method, ensuring
all subcommands emit the warning. A _deprecationWarningPrinted guard
makes the method idempotent so service:* commands that still call it
explicitly in run() don't double-print.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Jun 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2b3af51

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
apollo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codesandbox-ci

Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant