Version 1.2.3 of hydra includes a few important changes, and additionally some cleanup and refactoring. The first important change is that modules which were previously external dependencies are now part of hydra. At first glance, this may seem counter to the modularity offered by NPM but I felt it necessary for the following reasons:
Hydra is being offered as a lightweight library. However, over time it grew to just over 5 MB. Thanks to observations by @ecwyne I was able to see where the excess fat was and begin making changes that reduced Hydra to just 1.5 MB. Reducing the size of applications is important when building microservices due to the time it takes for a service to become available after it’s been launched.
The more hydra's depends on external dependencies the more often it changes. Fewer dependencies mean less change.
It's been painfully clear that it's becoming increasingly difficult to maintain Hydra without extensive test coverage. Part of the challenge has been that hydra depends on Redis for most if its features. To address this issue we're now using a Redis mocking library (redis-mock) which, while not perfect, does help us introduce tests for hydra. Going forward, changes to hydra must be accompanied with unit tests.
Adding tests to Hydra meant having to pull in the fwsp-redis-connection module. The code in questions was only a half page so that was easy - but it was necessary because the code had to be modified to support unit testing in Hydra.
Hydra also depended on fwsp-jsutils for only three functions. So, it also made sense to remove that dependency.
Other modules have been pulled into hydra with the intention of deleting code that isn’t required by hydra.
The streamlining will help keep Hydra small and well tested.
Version 1.2.3 of hydra includes a few important changes, and additionally some cleanup and refactoring. The first important change is that modules which were previously external dependencies are now part of hydra. At first glance, this may seem counter to the modularity offered by NPM but I felt it necessary for the following reasons: