Skip to content

chore: remove backwards compatibility shims #263

Open
felipefreitag wants to merge 4 commits intomainfrom
worktree-remove-backwards-compat
Open

chore: remove backwards compatibility shims #263
felipefreitag wants to merge 4 commits intomainfrom
worktree-remove-backwards-compat

Conversation

@felipefreitag
Copy link
Copy Markdown
Contributor

@felipefreitag felipefreitag commented Apr 14, 2026

Remove deprecated teams→profiles compatibility layer:

  • Delete resend teams command (teams-deprecated.ts)
  • Remove --team global flag and GlobalOpts.team field
  • Remove RESEND_TEAM env var fallbacks
  • Remove deprecated aliases (TeamProfile, resolveTeamName, setActiveTeam, listTeams, validateTeamName)

Remove legacy credential format support:

  • Drop { api_key: "re_xxx" } root format
  • Drop { teams, active_team } format
  • Remove storage: 'keychain''secure_storage' migration
  • Remove RESEND_CREDENTIAL_STORE=keychain compat
  • Remove auto-migration of plaintext keys to secure storage

BREAKING CHANGE: Users on very old config formats must re-run resend login. The --team flag, RESEND_TEAM env var, and resend teams command are removed.


Summary by cubic

Removes all teams→profiles compatibility shims and legacy credential formats, and releases resend-cli 2.0.0 (also updates skills/resend-cli metadata). Drops --team, RESEND_TEAM, and the resend teams command; users with very old configs must run resend login.

  • Refactors

    • Delete resend teams command.
    • Remove --team flag, GlobalOpts.team, and RESEND_TEAM fallback.
    • Drop legacy credential files: root { api_key } and { teams, active_team }.
    • Remove storage: 'keychain' compatibility and plaintext→secure storage auto-migration.
    • Remove deprecated aliases: TeamProfile, resolveTeamName, setActiveTeam, listTeams, validateTeamName.
  • Migration

    • Run resend login if your credentials file uses a legacy format.
    • Replace --team with --profile; replace RESEND_TEAM with RESEND_PROFILE; stop using resend teams.
    • If you set RESEND_CREDENTIAL_STORE=keychain, change it to secure_storage or file.

Written for commit b3e8545. Summary will update on new commits.

Remove deprecated teams→profiles compatibility layer:
- Delete `resend teams` command (`teams-deprecated.ts`)
- Remove `--team` global flag and `GlobalOpts.team` field
- Remove `RESEND_TEAM` env var fallbacks
- Remove deprecated aliases (TeamProfile, resolveTeamName, setActiveTeam, listTeams, validateTeamName)

Remove legacy credential format support:
- Drop `{ api_key: "re_xxx" }` root format
- Drop `{ teams, active_team }` format
- Remove `storage: 'keychain'` → `'secure_storage'` migration
- Remove `RESEND_CREDENTIAL_STORE=keychain` compat
- Remove auto-migration of plaintext keys to secure storage

BREAKING CHANGE: Users on very old config formats must re-run `resend login`.
The `--team` flag, `RESEND_TEAM` env var, and `resend teams` command are removed.
@felipefreitag felipefreitag marked this pull request as ready for review April 14, 2026 19:27
@felipefreitag felipefreitag requested a review from vcapretz April 14, 2026 19:27
…ards-compat

# Conflicts:
#	package.json
#	skills/resend-cli/SKILL.md
#	tests/lib/config-async.test.ts
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 16 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="src/commands/whoami.ts">

<violation number="1" location="src/commands/whoami.ts:43">
P2: Check `--profile` presence with `!== undefined` instead of truthiness so empty-string values are treated as explicitly provided.

(Based on your team's feedback about Commander.js option presence checks.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

const profileExists = profiles.some((p) => p.name === requestedProfile);
const explicitProfile =
profileFlag || process.env.RESEND_PROFILE || process.env.RESEND_TEAM;
const explicitProfile = profileFlag || process.env.RESEND_PROFILE;
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Check --profile presence with !== undefined instead of truthiness so empty-string values are treated as explicitly provided.

(Based on your team's feedback about Commander.js option presence checks.)

View Feedback

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At src/commands/whoami.ts, line 43:

<comment>Check `--profile` presence with `!== undefined` instead of truthiness so empty-string values are treated as explicitly provided.

(Based on your team's feedback about Commander.js option presence checks.) </comment>

<file context>
@@ -40,8 +40,7 @@ Shows which profile is active and where the API key comes from.`,
       const profileExists = profiles.some((p) => p.name === requestedProfile);
-      const explicitProfile =
-        profileFlag || process.env.RESEND_PROFILE || process.env.RESEND_TEAM;
+      const explicitProfile = profileFlag || process.env.RESEND_PROFILE;
 
       // If a specific profile was requested but doesn't exist, show a targeted error
</file context>
Fix with Cubic

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants