Fix #1408: packageJSDependencies is broken.
Merge pull request #1420 from sjrd/fix-package-js-deps

Fix #1408: packageJSDependencies is broken.