4.0.0 Resolve PRs, upgrade modules, fix tests + syntax for supported node versions
Proposed major version update
This is a wonderful project, but because change is constant in the JS world, it now has some small barriers to adoption in newer projects. Personally, I ran into trouble using it in a Typescript project with the Jest test runner.
There are two open PRs by @sinan-guclu-pupil (https://github.com/SamVerschueren/aws-lambda-mock-context/pull/17) and @DomiR (https://github.com/SamVerschueren/aws-lambda-mock-context/pull/16) that would fix those issues. However, tests on those PRs are broken because dependencies like ava and xo have dropped support for older node versions and syntax, so they cannot be merged without additional work.
This PR aims to remedy the situation!
Changes
- Update and hard-version underlying modules to latest versions
- Update syntax to match the latest linting rules from
xo - Update library usage where the module APIs have changed
- Remove
momentfor a smaller bundle - Drop support for Node.js < v10 LTS Dubnium
- Merge the open PRs, verified on test suite and in my own project on the supported node versions
lts/erbiumandlts/dubnium - Bump to
4.0.0
Why drop support for older node versions?
I think we can follow the principle in ava's statement of node support - that new versions of a library will support node versions that are supported by Node.js itself. By making this change in a hard version bump (from 3.2.1 to 4.0.0) we can avoid any impact on existing users, but continue to provide this great module to users of Typescript and newer Node.js releases.
any updates on this @SamVerschueren ?