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

Specify operating system compatibility in package.json #6

Closed
wants to merge 1 commit into from

Conversation

sonicdoe
Copy link

@sonicdoe sonicdoe commented Jul 9, 2018

Since this package only runs on macOS, I’ve added the os property to package.json.

@sindresorhus
Copy link
Owner

I intentionally (b02f8d8) don't use that as it makes it impossible to use this module in another module that targets multiple OSes, but where they do their own checks.

@sonicdoe
Copy link
Author

@sindresorhus Thanks for explaining, I wasn’t aware of that.

For anyone else stumbling over this issue, a bit more background: Newer versions of npm don’t fail installation when you have a platform-specific optional dependency, however, it will unnecessarily print a warning (see npm/npm#11632). Unfortunately, other than these optionalDependencies, there seems to be no good way to handle platform-specific dependencies with npm.

@sonicdoe sonicdoe deleted the package-json-os branch July 10, 2018 08:48
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.

None yet

2 participants