Skip to content

Releases: dominicegginton/functional-reader

v2.2.0

16 May 14:00
Immutable release. Only release title and notes can be modified.
v2.2.0
acb8fce

Choose a tag to compare

New Features in v2.2.0

This release introduces several powerful new utilities inspired by functional programming patterns and RxJS operators:

  • Combinators:
    • traverse: Map over an array using a function that returns a Reader.
    • zip: Combine two Readers into a single Reader returning a tuple.
    • alt: Provide fallback logic (returns the first non-null/undefined result).
  • Environment Management:
    • provide: Fix the environment for a Reader (injection).
    • pick: Select multiple properties from the environment.
  • Lazy & Conditional Execution:
    • defer: Lazily initialize a Reader at call time.
    • when: Conditionally execute a Reader based on the environment.
  • Transformation:
    • chainFirst: Sequence Readers but return the original result.
    • mapTo: Shorthand to map a result to a constant value.

Improvements

  • Do-Notation: Added individual examples for Do, bind, and bindTo.
  • Project Structure: Introduced tsconfig.eslint.json for improved type-aware linting across all files including examples.
  • CI/Linting: Updated lint script to fail on all warnings.

Full Changelog: v2.1.1...v2.2.0

v2.1.1

16 May 13:37
Immutable release. Only release title and notes can be modified.
v2.1.1
263e344

Choose a tag to compare

Changes in v2.1.1

This patch release includes significant internal refactoring, improved documentation, and enhanced project strictness.

  • New Features:
    • Added iif utility for conditional logic based on the environment.
  • Project Structure & Refactoring:
    • Split all utilities into dedicated modules for better maintainability and smaller bundle sizes.
    • Comprehensive test suite added with 100% coverage for all utilities.
    • Individual example files added for every utility in the library.
  • Documentation:
    • Major rewrite of the README for better readability.
    • Added comparison table with other libraries (fp-ts, lodash/fp).
    • Added compatibility and interoperability sections.
  • CI/CD & Tooling:
    • Added GitHub Actions workflow for automated linting and testing.
    • Integrated Nix flake for consistent development environments.
    • Updated linting to fail on all warnings (--max-warnings 0).
    • Improved ESLint configuration with type-aware linting for examples and tests.

Full Changelog: v2.1.0...v2.1.1

v2.1.0

16 May 08:17
Immutable release. Only release title and notes can be modified.
v2.1.0
201a98e

Choose a tag to compare

feat: expand functional utility set and enhance security

  • Add new utilities to core library: flow, asksReader, flatten, bind, bindTo, sequence, and struct.
  • Implement comprehensive "Do notation" support for cleaner pipeline state management.
  • Update unit tests and example.ts to showcase the full API surface.
  • Update README documentation with new utility signatures.
  • Configure min-release-age for npm dependencies in Dependabot to improve security.

Full Changelog: v2.0.0...v2.1.0

v2.0.0

15 May 21:52
Immutable release. Only release title and notes can be modified.
v2.0.0
ee05d6b

Choose a tag to compare

feat: curry core functions and add pipe utility

  • Curry map, chain, local, ap, chainRight, and chainLeft for better composition
  • Add type-safe pipe utility function
  • Use environment intersections in composed Readers for better type inference
  • Update tests, examples, and documentation to reflect curried API

BREAKING CHANGE

Core functions now follow the data-last curried pattern.

Full Changelog: v1.0.0...v2.0.0

v1.0.0

15 May 21:33
v1.0.0
30f70a4

Choose a tag to compare

Features

  • Purely Functional: Built on the Reader Monad pattern for clean dependency management.
  • Strictly Type-Safe: Optimized for TypeScript with excellent type inference.
  • Zero Dependencies: Lightweight with no external runtime dependencies.
  • Highly Composable: Includes 13 core utilities for mapping, chaining, and environment adaptation.

Included Combinators

  • of, ask, asks, map, chain, local, compose, ap, chainRight, chainLeft, prop, Do, tap.

Infrastructure

  • 100% Test Coverage: Verified with Jest.
  • Strict Linting: Configured with eslint-plugin-functional to enforce purity.
  • Reproducible Dev Environment: Full Nix flake support (flake.nix).
  • Dependabot: Automated dependency updates for both NPM and Nix.

Installation

npm install github:dominicegginton/functional-reader#v1.0.0

Full Changelog: https://github.com/dominicegginton/functional-reader/commits/v1.0.0