You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a package that conditionally requires registry-js on Windows only. However, it's installed in node_modules regardless of platform.
This inefficiency could be addressed if registry-js declared in its package.json that it only runs on Windows:
"os": ["win32"],
Then consumers could declare it in optionalDependencies and it would only be installed on Windows devices.
Important: This would be a breaking change requiring a new major version, because npm would throw an error on non-Windows devices if this package is declared as a non-optional dependency.