Release #20

Merged
lambadalambda merged 22 commits from develop into stable 2026-05-13 14:01:22 +00:00
No description provided.
- Remove ei_init() call that fails when sysconf(_SC_OPEN_MAX) returns
  LONG_MAX (unlimited fd limit on macOS), causing int overflow in
  Erlang's init_socket_info(). The port only uses ei for
  encoding/decoding, not node connections.
- Redirect port stderr to /dev/null unless MAJIC_DEBUG is set, to
  suppress libmagic warnings in test output.
- Compile test .mgc with matching file binary from Homebrew file-formula
  to avoid version mismatch with the linked libmagic.
- Increase port test receive timeout to accommodate slower port startup.
- Broaden .gitignore to cover /priv/ and *.mgc.
Use try/after to ensure server is always stopped, even when
Server.perform returns {:error, _}.
Workers were orphaned on pool shutdown. Now calls
Majic.Server.stop/1 on each worker before returning.
- Preserve directory component when rewriting filename (Path.join)
- Compare old extension case-insensitively (.JPEG matches .jpeg)
- Strip extension properly when no MIME candidates exist (no trailing dot)
- Use Path.basename(name) for append branches to avoid directory duplication
Replace fragile collect_uploads/put_in_if_exists approach with
recursive transform_uploads that correctly handles nested maps,
arrays, and structs. Only transform body_params, then merge with
query_params to avoid processing uploads twice. Unskip plug test
and enable fix_extension option.
Extract timeout from opts and pass as 3rd argument to
Once.perform/3, consistent with how Server and Pool paths handle it.
Calling reload or recycle during processing/starting/loading/recycling
previously crashed the server. Now these calls are postponed until the
server returns to :available. Also discard late {:data, _} messages in
recycling state instead of crashing. Fix :eaccess -> :eacces typo and
add is_port guard in terminate/3.
When Majic.perform fails (e.g. temp file deleted, permission denied,
pool timeout), return the original upload unchanged instead of raising
a 500 error.
Lint pipeline: mix format --check-formatted, credo
Unit test pipeline: mix test --trace --preload-modules
Both use elixir:1.17-alpine with file-dev for libmagic headers.
Fix outdated references in README and update CHANGELOG
Some checks failed
ci/woodpecker/pr/lint Pipeline failed
ci/woodpecker/pr/unit-testing unknown status
dc8f9d47dc
README: fix function names (Once.perform/3, start_option/0),
remove references to nonexistent Majic.Helpers.perform_once/2,
clarify Plug fix_extension is opt-in, fix recycle_threshold typo.

CHANGELOG: remove nonexistent Majic.compile/2, add Fixed section
with all bug fixes, add macOS/Homebrew build support and Woodpecker CI.
Fix format and credo issues for CI
Some checks failed
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/unit-testing Pipeline failed
a8cbe3c4a1
- Run mix format on all files
- Reduce Extension.do_fix cyclomatic complexity below 9
  by extracting fix_existing_ext and fix_no_ext helpers
- Remove unused has_candidates? variable
Fix CI: add file package, use plain text magic file instead of .mgc
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/unit-testing Pipeline was successful
aac3cb655f
- Add 'file' to apk packages (needed for C port, not just file-dev)
- Clean stale macOS binary before compile on CI
- Use plain text magic file directly instead of compiled .mgc
  (.mgc format is version-dependent and breaks across different
  libmagic versions)
Fix README: reference Majic.perform with once: true, not Once.perform directly
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/unit-testing Pipeline was successful
dbd654d0e6
Merge pull request 'Fix macOS build, process leaks, extension handling, plug, and add CI' (#16) from fix/homebrew-libmagic-paths into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/unit-testing Pipeline was successful
1f235da0fa
Reviewed-on: #16
Bump version to 1.1.0
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/unit-testing Pipeline was successful
e7600acc30
Merge pull request 'Bump version to 1.1.0' (#17) from bump/version into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/unit-testing Pipeline was successful
3cc57fc834
Reviewed-on: #17
Merge branch 'stable' into merge/stable-into-develop
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/unit-testing Pipeline was successful
0f23c16ec3
# Conflicts:
#	CHANGELOG.md
#	mix.exs
Bump version to 1.2.0
Some checks are pending
ci/woodpecker/pr/unit-testing Pipeline is pending
ci/woodpecker/pr/lint Pipeline was successful
57a011f17e
Merge pull request 'Merge stable into develop' (#18) from merge/stable-into-develop into develop
Some checks are pending
ci/woodpecker/push/unit-testing Pipeline is pending
ci/woodpecker/push/lint Pipeline was successful
e81db2085a
Reviewed-on: #18
Merge branch 'develop' into bump/v1.2.0
All checks were successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/unit-testing Pipeline was successful
3886a6c834
Merge pull request 'Bump version to 1.2.0' (#19) from bump/v1.2.0 into develop
All checks were successful
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/unit-testing Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/unit-testing Pipeline was successful
d32d442441
Reviewed-on: #19
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pleroma-elixir-libraries/majic!20
No description provided.