feat!: upgrade code to es6 and migrated test to express v5 #334
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the release of Express v5, the minimum supported Node.js version has been updated to v18. In light of this, I noticed this previous PR that attempted to introduce ES6 features such as
let
andconst
. That PR was closed with the understanding that the package would follow the Node.js version support of Express.Since Express has now bumped its Node.js requirement to v18+, it is an opportune time to update the codebase to replace
var
withlet
andconst
, which are now fully supported by the minimum required Node.js version.This change aims to modernize the code and take advantage of ES6 features for better readability, performance, and maintainability.
I also refactored the code so object-assign is no longer needed, as we can replace it with
Object.assign
as this was introduced in node v4