-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
CB-14145: cordova-common update to resolve npm audit & other updates in patch release #451
Conversation
bea909b
to
eed07bc
Compare
Codecov Report
@@ Coverage Diff @@
## 7.1.x #451 +/- ##
=======================================
Coverage 43.95% 43.95%
=======================================
Files 17 17
Lines 1711 1711
Branches 318 318
=======================================
Hits 752 752
Misses 959 959 Continue to review full report at Codecov.
|
Why do we need the dependency update before unbundling the dependencies (and thus the next major release)? |
Now tested as follows (see above for more details):
The proposed changes resolves the |
@brodybits Why does this PR require re-enabling support for Node 4? This would break a number of waiting PRs which depend on Node 6+. |
We can't drop support for node 4 in a minor version update, but I agree that we should keep master moving forward to the next major version. @brodybits Can we do these updates for the next minor on top of the 7.1.x branch? That way we can simply delete node_modules entirely on master and not worry about introducing more conflicts into the pending PRs |
Will do. |
eed07bc
to
b697b7a
Compare
b697b7a
to
087b3af
Compare
087b3af
to
6bcb604
Compare
I've cherry-picked all code fix commits from master that I could identify. |
Thanks @raphinesse, updated title yet again to reflect what we actually want to do in the patch release. TBH I have some mixed feelings, though not major. In general I would rather avoid including other fixes when making a security related patch. For a security patch we want the least risk possible that something goes wrong and the "end" user decides to roll back. I think the actual security risk is very low. In general I would rather keep it this way. Another really strange thing is that f05e61d seems to have a MacBook-Pro.local address, not linked to any user on GitHub. What do you think, any comments? |
FYI the delay is because it is taking me much longer than I expected to resolve the npm audit issues on cordova-js which I would consider to be an upstream dependency. My apologies for the confusion. /cc @jcesarmobile |
As a user, I'd be annoyed by a patch release not including fixes to my problems even though they are ready to ship. I see your point however. Since you do the release, decide at your own discretion. |
@raphinesse you convinced me about the first 2 commits you added:
I am still not so convinced about the 3 commits:
I think it would be ideal to move the last 3 commits to a followup patch, not sure if it is worth the effort to split them out or not. |
97babc4
to
c14e0dc
Compare
@raphinesse I just updated the last 2 commits to reference the PRs they originated from and show what kind of scripts are affected. (GitHub links to the PRs from the commits in master, would be nice to have the same kind of thing in the 7.1.x branch. To show what kind of scripts are affected would also be good for the patch release notes.) I may just include all the fixes in the same patch release to streamline things. I think the npm audit issues will not lead to any real vulnerabilities, at least not yet:) |
I'd be happy to see these fixes in the upcoming release. I don't see why these changes should break anything. If things break, we'll fix them. I think you need to worry a bit less 😊 |
(update JS snapshot from cordova-js@4.2.4 via coho)
c14e0dc
to
475cca6
Compare
I just pushed a complete rebase, with the following updates (see above for more details):
tested in Cordova project using deprecated Node.js 4 and other Node.js versions as stated above
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see why we need separate commits for removing an adding node_modules
contents. But then again I don't care too strongly about it.
It seems you listed each transitive dependency in bundledDependencies
. According to this npm
test we should not need to do that. Was there something that made this necessary?
Otherwise this looks good to me 👍
As I explained in apache/cordova-windows#281 (comment): a combination of updated dependencies and npm from non-deprecated version of Node.js results in such a massive change to node_modules that it seems cleanest to remove old node_modules before making the update.
Yes, also explained in apache/cordova-windows#281 (comment): With node_modules installed by newer version of npm (comes with non-deprecated version of Node.js), additional libraries need to be listed to work on Node.js 4. We know that Node.js 4 is deprecated but should not be dropped in a patch release:-( Thanks for checking, will probably merge this really soon. |
resolves npm audit issue
- android-versions@1.3.0 - nopt@3.0.1 - properties-parser@0.2.3 - q@1.4.1 - shelljs@0.5.3 (elementtree@0.1.6 was already pinned)
- ignore all contents of node_modules/.bin - explicitly ignore some node_modules contents not needed - ignore package-lock.json in 7.1.x only
(installed by npm@6.1.0)
(indirect production dependencies needed by deprecated Node.js 4.x)
This also checks that we have exactly 1.8 since nothing else works with the Android SDK. The user facing error was updated accordingly.
in builder scripts
475cca6
to
f909f35
Compare
Platforms affected
Android
What does this PR do?
npm audit
and engine warning messagesnode_modules
using npm@6.1.0bundledDependencies
, needed to support deprecated Node.js 4 in this patch fixenable node 4 (again), needed to support minor release(no need: deprecated Node.js 4 is still allowed by engines rule in package.json;npm install
&npm test
are still covered by AppVeyor CI on deprecated Node.js 4)resolves
npm audit
warnings & other issues in patch release as needed asap (before the next major release is ready)What testing has been done on this change?
npm audit
with npm@6.1.0 (latest version) shows 0 vulnerabilitiescordova platform add brodybits/cordova-android#cordova-common-2-update
to add platform to new Cordova project and test on Android device usingcordova run android
succeeds on the following Node.js versions:npm test
succeeds (along with some other tasks) on AppVeyor CI & Travis CIChecklist
Added automated test coverage as appropriate for this change.