Skip to content

🔖 release 0.3.0

Compare
Choose a tag to compare
@kkharji kkharji released this 09 Jan 02:15
· 13 commits to master since this release
80c62d7

🎉 0.3.0 - 2022-01-09

Full Changelog: 0.2.0...0.3.0

Dev

663a8de ✨ Feature: Pretty print exceptions
Wow I didn't except such an improvement

General

  • 6a8e8af ♻️ Refactor: Duct module structure

Logging

4a693a1 ♻️ Refactor: Total rewrite
Unlike before where the user needs to specify a list of stuff to log, now each item need to be set to boolean individually. Not totally sure I'd keep this but at least tests are passing.
e6772ed ✨ Feature: Merge logging config into one submodule
Mostly refactoring to make all logging configuration handled in a single submodule.

BREAKING: Change in how coercion and exception logging is handled. Now to enable logging for exception or coercion, it should be passed in `#duct.reitit/logging{:types []}`
5bd4d6b 🌱 Enhancement: Skip logging with coercion errors
With in coercion handler there is logging. However, this feels wrong because logging shouldn't be done there.

Module

398ae33 ♻️ Refactor: Total rewrite and decoupling
- rename main router function key to `duct.reitit/router` instead of `duct.router/reitit`. - rename main handler function key to `duct.reitit/handler` instead of `duct.handler/root`. - create separate initializer for `duct.reitit/routes`. It seems to go along the lines of decoupling processing steps. - refactor `duct.module/reitit` and make more readable and easy to reason with. - move default config along with development and production profile mutations to `duct/reitit/defaults.clj`. - refactor reitit module initializer logic to somewhat general purpose module initializer.
(module/init
       {:root  :duct.reitit
        :config config
        :extra [(registry-tree registry)]
        :store  {:namespaces namespaces :routes routes}
        :schema {::registry (registry-references registry)
                 ::routes   [:routes :namespaces ::registry]
                 ::router   [::routes ::options ::log]
                 ::log      ::options
                 ::handler  [::router ::options ::log]}})

This make create modules similar duct.reitit easier.
TODO: move to external library.

  • change tests to reflect new changes
  • remove many redundant files.

Readme

  • 6b2ce55 📚 Documentation: Update

Tests

  • daa0a83 ♻️ Refactor: Clean up tests