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
The main property is listed as recommended but not required by the bower.json spec, but if a dependency chooses to not list a main file, all of it's dependencies are skipped.
In our particular case, it skipped the .bower.json and bower.json dependencies because prev.main was undefined for bower, and dropped to the package.json dependencies because component.json (curr) did not exist, returning the package.json dependencies, not the bower.json dependencies which is not what we wanted.
It treats the main property as required.
Should it use prev.name instead which is a required attribute, or check for prev.main or prev.dependencies since if either of those exists there is something to do at the next step of the function?
The text was updated successfully, but these errors were encountered:
The main property is listed as recommended but not required by the bower.json spec, but if a dependency chooses to not list a main file, all of it's dependencies are skipped.
It is because of this code in package.js (https://github.com/ck86/main-bower-files/blob/master/lib/package.js#L46):
In our particular case, it skipped the .bower.json and bower.json dependencies because
prev.main
was undefined for bower, and dropped to the package.json dependencies because component.json (curr) did not exist, returning the package.json dependencies, not the bower.json dependencies which is not what we wanted.It treats the main property as required.
Should it use prev.name instead which is a required attribute, or check for prev.main or prev.dependencies since if either of those exists there is something to do at the next step of the function?
The text was updated successfully, but these errors were encountered: