Releases: dominicegginton/functional-reader
Releases · dominicegginton/functional-reader
v2.2.0
Immutable
release. Only release title and notes can be modified.
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, andbindTo. - Project Structure: Introduced
tsconfig.eslint.jsonfor 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
Immutable
release. Only release title and notes can be modified.
Changes in v2.1.1
This patch release includes significant internal refactoring, improved documentation, and enhanced project strictness.
- New Features:
- Added
iifutility for conditional logic based on the environment.
- Added
- 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
Immutable
release. Only release title and notes can be modified.
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
Immutable
release. Only release title and notes can be modified.
feat: curry core functions and add pipe utility
- Curry
map,chain,local,ap,chainRight, andchainLeftfor better composition - Add type-safe
pipeutility 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
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-functionalto 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.0Full Changelog: https://github.com/dominicegginton/functional-reader/commits/v1.0.0