This repository has been archived by the owner on Oct 23, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This required more work than I initially thought. I'll try and explain all of the changes here. 1. Updating the CircleCI config to also run on Node.js 18. I took the opportunity to make sure we're also running the latest versions of Node.js 14 and 16. 2. Bumping the version of node-fetch that we use, as there are some security fixes between 2.6.0 and 2.6.7. 3. Unfortunately, nock does not mock HTTP requests for `fetch`, which meant that the tests were always failing in Node.js 18. To fix this I had to drop nock entirely and switch to fetch-mock which works with both global `fetch` _and_ node-fetch. This results in a few of the tests changing. The fact these run in both Node.js 16 and 18 is encouraging. **Potential future work:** I think it might be sensible to add some end-to-end tests at some point, which actually connect to Splunk and verify that sending logs works in all of Node.js 14, 16, and 18. Maybe that's overkill though, as we'll be deprecating this module at some point and once all our apps are using log drains we can ditch the Splunk HEC transport entirely.
- Loading branch information