Skip to content

Conversation

@iloveitaly
Copy link
Collaborator

No description provided.

This commit adds support for package.json5 files alongside traditional
package.json files. The existing hujson library already supports JSON5
syntax (comments, trailing commas, etc.), so no additional dependencies
are needed.

Changes:
- Added getPackageFileName() helper to detect package.json5 vs package.json
- Updated Detect() to check for both package.json and package.json5
- Updated all file reading logic to support both formats
- Updated workspace detection to find both package.json and package.json5
- Updated SupportingInstallFiles to include package.json5 pattern
- Updated tests to reflect the new convertWorkspacePatterns function
- Added integration test example with package.json5

The implementation prioritizes package.json5 when both files exist,
falling back to package.json for backward compatibility.
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