Skip to content

Conversation

@cs-raj
Copy link
Contributor

@cs-raj cs-raj commented Jan 22, 2026

This PR removes unused code from the @contentstack/cli-auth package to improve code maintainability and reduce technical debt. The changes include removal of unused validation methods and related test files.

Changes

Code Removal

  • Removed unused methods from auth-handler.ts:

    • validateAuthtoken() method
  • Removed unused methods from mfa-handler.ts:

    • getManualMFACode() method
    • isValidMFACode() method
  • Deleted entire tokens-validation.ts file:

    • Removed validateEnvironment() function
    • Removed validateAPIKey() function
    • Removed export from utils/index.ts
  • Removed related test files:

    • Deleted test/unit/tokens-validation.test.ts
    • Removed test stubs and references from test/unit/commands/tokens-add.test.ts

Version Updates

  • Bumped @contentstack/cli-auth version from 1.7.2 to 1.7.3
  • Updated dependency references in:
    • packages/contentstack-export/package.json
    • packages/contentstack/package.json

Impact

  • No breaking changes: All removed code was unused and not referenced elsewhere in the codebase
  • Reduced bundle size: Removal of unused code reduces the package size
  • Improved maintainability: Cleaner codebase with less dead code to maintain

@cs-raj cs-raj requested a review from a team as a code owner January 22, 2026 06:56
@cs-raj cs-raj merged commit e7314a3 into development Jan 29, 2026
10 checks passed
@cs-raj cs-raj deleted the fix/DX-3932 branch January 29, 2026 12:55
@cs-raj cs-raj restored the fix/DX-3932 branch January 29, 2026 13:10
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.

3 participants