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

Add support for package.json5 #266

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

Conversation

rbong
Copy link

@rbong rbong commented Nov 26, 2024

Implements #225

Notes

Supported Node Version

I noticed the json5 package supports only Node >=6 but this package supports >=4.
However, I noticed there were already warnings about other packages only supporting Node 6.

I was also not able to get tests running using Node 4.
One Node 6 test is failing as well, but Node 6 can at least run tests.
(Tested from scratch without my changes.)
Your Travis build history is also not loading for me, so I'm not sure if this is expected.

Removed read-pkg

I have removed read-pkg since it does not support package.json5.
I cannot submit a PR to that repo since newer versions do not support Node 4/6, and I think it will require an API redesign.

This is a fairly simple package and easy to replace.
It mostly relies on two other packages: load-json-file and normalize-package-data.
I have installed the same versions in the version of read-pkg that was previously used.

Tests

I have tried my best at writing tests for this change.
I don't think it is perfectly in line with the style of your other tests, but this was the simplest way I could see to test it.
If you have other ideas for tests, feel free to give guidance or change my tests when merging.

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.

1 participant