From 1fbfeb3c8c4a4c11cf036702b00668750482e20c Mon Sep 17 00:00:00 2001 From: bardoor Date: Wed, 27 Aug 2025 01:58:21 +0300 Subject: [PATCH 1/3] docs: introduce 1.1.0 changes --- CHANGELOG.md | 32 -------------------------------- docs/changelog.md | 7 +++++++ 2 files changed, 7 insertions(+), 32 deletions(-) delete mode 100644 CHANGELOG.md diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 8caf0f3..0000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,32 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), -and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). - -## [1.1.0] - 2025-08-27 - -### Added -- Support for external module callbacks with `@then {Module, :function}` syntax -- Comprehensive validation for callback formats with clear error messages -- Tests covering external module callbacks, mixed callback types, and error cases - -## [1.0.0] - 2025-08-26 - -### Added -- Initial release of `Then` library -- `@then` attribute for post-execution callbacks -- Support for side-effect separation from main function logic -- Compile-time validation to prevent multiple `@then` attributes per function -- Compatibility with other function attributes (`@doc`, `@spec`, `@deprecated`) -- Support for private callback functions (`defp`) -- Comprehensive test suite -- Documentation with examples and limitations - -### Features -- Clean separation of concerns between pure functions and side effects -- Automatic callback invocation after function execution -- Function result preservation (callbacks don't modify return values) -- Multi-clause function support -- Macro-based implementation for zero runtime overhead diff --git a/docs/changelog.md b/docs/changelog.md index 5a5b01f..8caf0f3 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.1.0] - 2025-08-27 + +### Added +- Support for external module callbacks with `@then {Module, :function}` syntax +- Comprehensive validation for callback formats with clear error messages +- Tests covering external module callbacks, mixed callback types, and error cases + ## [1.0.0] - 2025-08-26 ### Added From a842df9607fd7572f687959118a8d0dfa97675df Mon Sep 17 00:00:00 2001 From: bardoor Date: Wed, 27 Aug 2025 01:58:52 +0300 Subject: [PATCH 2/3] chore: update version to 1.1.0 --- mix.exs | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/mix.exs b/mix.exs index d3cb7d8..91b1fd4 100644 --- a/mix.exs +++ b/mix.exs @@ -4,13 +4,14 @@ defmodule Then.MixProject do def project do [ app: :then, - version: "1.0.0", + version: "1.1.0", elixir: "~> 1.18", start_permanent: Mix.env() == :prod, deps: deps(), name: "Then", description: description(), - package: package() + package: package(), + docs: docs() ] end @@ -33,6 +34,22 @@ defmodule Then.MixProject do ] end + defp docs do + [ + main: "then", + source_url: "https://github.com/bardoor/then", + extras: [ + "docs/then.md", + "docs/changelog.md", + "docs/license.md" + ], + groups_for_extras: [ + "Documentation": ["docs/then.md"], + "Legal": ["docs/changelog.md", "docs/license.md"] + ] + ] + end + defp deps do [ {:ex_doc, "~> 0.14", only: :dev, runtime: false} From 72b5dfac5db0c87571c5113acd1c957dff490905 Mon Sep 17 00:00:00 2001 From: bardoor Date: Wed, 27 Aug 2025 02:07:19 +0300 Subject: [PATCH 3/3] refactor(docs): move changelog and license to root dir --- docs/changelog.md => CHANGELOG.md | 0 docs/license.md | 23 ----------------------- docs/then.md | 2 +- mix.exs | 6 +++--- 4 files changed, 4 insertions(+), 27 deletions(-) rename docs/changelog.md => CHANGELOG.md (100%) delete mode 100644 docs/license.md diff --git a/docs/changelog.md b/CHANGELOG.md similarity index 100% rename from docs/changelog.md rename to CHANGELOG.md diff --git a/docs/license.md b/docs/license.md deleted file mode 100644 index 818a667..0000000 --- a/docs/license.md +++ /dev/null @@ -1,23 +0,0 @@ -# License - -MIT License - -Copyright (c) 2025 bardoor - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/docs/then.md b/docs/then.md index 4c2ec05..98c254c 100644 --- a/docs/then.md +++ b/docs/then.md @@ -123,4 +123,4 @@ It's simple and clear. Move log and other side-effects out of your beautiful log ## License -`Then` is released under the MIT License - see the [LICENSE](license.html) file. +`Then` is released under the MIT License - see the [LICENSE](../LICENSE) file. diff --git a/mix.exs b/mix.exs index 91b1fd4..a71d495 100644 --- a/mix.exs +++ b/mix.exs @@ -40,12 +40,12 @@ defmodule Then.MixProject do source_url: "https://github.com/bardoor/then", extras: [ "docs/then.md", - "docs/changelog.md", - "docs/license.md" + "CHANGELOG.md", + "LICENSE" ], groups_for_extras: [ "Documentation": ["docs/then.md"], - "Legal": ["docs/changelog.md", "docs/license.md"] + "Legal": ["CHANGELOG.md", "LICENSE"] ] ] end