apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

(iOS) add undeclared dependency `underscore` #1105

Closed merceyz closed 3 years ago

merceyz commented 3 years ago

Platforms affected

iOS

Motivation and Context

cordova-ios depends on underscore but doesn't declare it as a dependency https://github.com/apache/cordova-ios/blob/048c1cace886d950860236adb893a860dfbd3503/bin/templates/scripts/cordova/lib/projectFile.js#L22

Description

Added underscore as a dependency

Testing

Ran cordova prepare ios under a strict dependency environment

Checklist

plchampigny commented 3 years ago

@NiklasMerz can this be fixed? This is annoying to add underscore dependency manually when using cordova-ios

breautek commented 3 years ago

I'm genuinely surprised how long this went unnoticed. Underscore usage have been in the framework for years, and as far as I can tell it was never added as a dependency.

Thanks for your contribution @merceyz

merceyz commented 3 years ago

Hoisting does wonders in hiding these sorts of problems, Yarn PnP is strict on these and threw an error immediately when running yarn cordova prepare ios