Skip to content

Upgrade to latest libraries and cleanup warnings#43

Open
tispratik wants to merge 6 commits intopablo-co:masterfrom
EnthuZiastic:master
Open

Upgrade to latest libraries and cleanup warnings#43
tispratik wants to merge 6 commits intopablo-co:masterfrom
EnthuZiastic:master

Conversation

@tispratik
Copy link

Also integrated message stream in API
Support template alias

hashim-sohail and others added 6 commits September 29, 2025 19:08
Resolve BadMapError in FakePostmark.get_free_port/0 by updating ranch_tcp.listen/1
call to use map syntax (%{port: 0}) instead of keyword list (port: 0). This fixes
test failures caused by ranch expecting map arguments.

Update deprecated Plug.Adapters.Cowboy functions to use modern Plug.Cowboy API:
- Replace Plug.Adapters.Cowboy.http/3 with Plug.Cowboy.http/3
- Replace Plug.Adapters.Cowboy.shutdown/1 with Plug.Cowboy.shutdown/1
- Remove unused alias to eliminate compiler warnings

Also includes automatic code formatting improvements from mix format.

Fixes test: "can read the api key from an ENV var" and eliminates all
deprecation warnings in test output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Major dependency updates:
- Bamboo: ">= 2.0.0" → ">= 2.5.0" for latest features and compatibility
- Hackney: ">= 1.6.5" → ">= 1.25.0" with override flag for HTTP client stability
- Poison: ">= 1.5.0" → ">= 6.0.0" for modern JSON handling
- Plug: "~> 1.0" → "~> 1.18.1" for latest web interface compatibility
- Plug Cowboy: "~> 1.0" → "~> 2.7.4" for HTTP/2 support and performance improvements
- Add Credo: "~> 1.7.12" for code quality and style checking

Configuration modernization:
- Replace deprecated `use Mix.Config` with `import Config` in config/config.exs
- Add .tool-versions file specifying Erlang 27.2 and Elixir 1.18.3-otp-27

Code quality improvements in PostmarkAdapter:
- Add comprehensive @doc annotations for public functions
- Improve code formatting and readability with consistent indentation
- Convert deprecated atom key syntax (:"Key") to modern atom syntax (:Key)
- Fix variable shadowing issues (email -> email_address)
- Enhance function parameter organization and readability
- Update attachment handling with better formatting
- Improve error message formatting with proper inspect() calls

PostmarkHelper enhancements:
- Better function clause formatting for template/4 function
- Consistent code style improvements

These changes maintain backward compatibility while preparing the codebase
for modern Elixir ecosystem standards and improved maintainability.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Lock file updates following dependency version upgrades in mix.exs:
- Updated all transitive dependencies to compatible versions
- Resolved version conflicts with override flags where needed
- Ensures reproducible builds with locked dependency versions

This completes the modernization to Elixir 1.18/OTP 27 compatibility.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
The override: true flag is not needed for hackney because:
- Bamboo requires hackney >= 1.15.2
- We specify hackney >= 1.25.0
- Our version requirement (1.25.0) satisfies bamboo's requirement (>= 1.15.2)

Override flags should only be used when forcing conflicting dependency versions.
In this case, the versions are compatible and resolve naturally.

Verified that dependency resolution and tests still pass without the override.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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