Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove merge-deep from the validation #67

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

Megapixel99
Copy link
Collaborator

We used to use merge-deep to assign parameters to a new object; however, we can use structuredClone to do the same thing and remove the dependency on merge-deep. structuredClone only works on node 17+ but node 16 reached EOL in September 2023 per https://endoflife.date/nodejs and https://nodejs.org/en/blog/announcements/nodejs16-eol.

@Megapixel99
Copy link
Collaborator Author

Megapixel99 commented Oct 18, 2024

Ran the tests locally with all of the same versions as below (and 23), all of the tests passed (except for node 16).

Versions used to test:

  • v23.0.0 (passed)
  • v22.10.0 (passed)
  • v20.18.0 (passed)
  • v18.20.4 (passed)
  • v16.20.2 (failed)

@enov enov self-requested a review October 18, 2024 22:02
Copy link
Collaborator

@enov enov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great PR! merge-deep is unnecessary nowadays and has some require magic conflicting with some js bundlers. I pulled the branch and tests against Node.js v18, v20, and v22 were successful.

@Megapixel99
Copy link
Collaborator Author

The tests are failing due to a newer version of path-to-regexp being used. I will install the newer version and update the tests

@Megapixel99
Copy link
Collaborator Author

The tests are failing due to a newer version of path-to-regexp being used. I will install the newer version and update the tests

I updated all of the dependencies and updated the tests, I can make the changes part of this PR or make a new PR with the changes to the tests. Aside from the changes to package.json and adding onto the tests (just to make sure I did not break anything) only two lines were changed to ensure the tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants