Skip to content

Use fedEx (not fedex) for the client variable#4

Merged
freshlogic merged 1 commit into
mainfrom
fix-variable-casing
May 21, 2026
Merged

Use fedEx (not fedex) for the client variable#4
freshlogic merged 1 commit into
mainfrom
fix-variable-casing

Conversation

@freshlogic

Copy link
Copy Markdown
Member

Summary

The README examples and tests instantiated the client as const fedex = new FedEx({ ... }) — lowercase fedex, which doesn't match the FedEx constructor and invites the kind of casing confusion that recently caused a credential mix-up downstream.

This aligns the client variable with the FedEx capitalization convention (fedEx) everywhere it appears as a variable.

Changes

  • README.md — all client examples now use const fedEx = new FedEx({ ... }) and await fedEx.<method>(...).
  • test/index.js — the client variable renamed fedexfedEx throughout (64 references).

Untouched (correctly lowercase): the package name @stores.com/fedex, *.fedex.com URLs, and the internal token cache-key namespace fedex:.

Testing

node --test --test-force-exit test/index.js — 28 mock-based tests pass, identical to before the rename (the 14 live tests require real FedEx credentials only present in CI). Verified by stashing the change and re-running: same 28 pass / 14 fail, so the rename introduces no regressions.

🤖 Generated with Claude Code

Align the README examples and tests with the FedEx capitalization
convention — the client variable is `fedEx`, matching the `FedEx`
constructor. The package name, fedex.com URLs, and the internal
cache-key namespace are unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@freshlogic freshlogic merged commit 4c5443b into main May 21, 2026
2 checks passed
@coveralls

Copy link
Copy Markdown

Coverage Report for CI Build 26230777999

Coverage remained the same at 100.0%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 279
Covered Lines: 279
Line Coverage: 100.0%
Relevant Branches: 43
Covered Branches: 43
Branch Coverage: 100.0%
Branches in Coverage %: Yes
Coverage Strength: 14.67 hits per line

💛 - Coveralls

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.

2 participants