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
GH-706 dependency patch fix for 8.x only #708
Conversation
(PR title should describe the change first, then administrative information) |
I think a minor release would be more fitting to introducing a deprecation notice, but I'm not quite sure. What would you say? |
To really adhere to semver, we cannot drop any dependencies or make major version updates because of #689. So here's the list of dependencies that we dropped between 8.0.0 and 8.1.0:
Furthermore, we updated |
I just pushed some changes:
Coming up are changes to restore the dependencies we dropped in 8.1.0. |
e04f72e
to
a6206b9
Compare
a6206b9
to
557e171
Compare
@brodybits ping me when you think this is ready to review, please. |
557e171
to
556a27d
Compare
@raphinesse this PR is now ready for review. |
@@ -24,6 +24,7 @@ | |||
"cordova-js": "^4.2.2", | |||
"cordova-serve": "^2.0.0", | |||
"dep-graph": "1.1.0", | |||
"dependency-ls": "^1.1.1", |
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.
this and all the other dependencies that are readded are not reflected in the PR title and description
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.
LGTM. The only thing I'm still unsure about is whether this shouldn't rather be a semver minor change, because of the deprecation.
It's just a deprecation notice, right? Then it should be acceptable to include it in a patch release. |
Yes. And I would like to resolve the GH-706 in a patch release. One more thing is that if cordova-lib and Cordova CLI do not have the same version number there some extra "noise" will show up in
I would favor publishing this in cordova-lib@8.1.2 to avoid such noise. |
That's not how semver works. |
(without test for warning messages as proposed in apacheGH-707 for master)
(quick optimization) Co-authored-by: Raphael von der Grün <raphinesse@gmail.com> Co-authored-by: Christopher J. Brody <chris.brody@gmail.com>
as needed to support Node.js 4
- dependency-ls@1 - unorm@1 - underscore@1 - valid-identifier@0.0.1 needed to adhere to semver principle ref: apacheGH-706
needed to adhere to semver principles ref: apacheGH-706
4d50674
to
f541e6f
Compare
As discussed on the #dev channel on Slack, I just removed the changes to emit deprecation warning messages in case of non-Cordova modules (also removed a test case). This is to avoid the issue with https://semver.org/#spec-item-7 where a minor version increase is needed in case of the deprecation message. Merging now. |
You didn't actually remove the code before merging. |
What I removed was cherry-pick of 27a2cfd from PR #707. You should not see any trace of it since I did a rebase with the cherry-pick of 27a2cfd. If I look at https://github.com/apache/cordova-lib/pull/708/files the code to emit the deprecation warning is no longer there. |
Why is the rest of #707 required? |
It does fix a theoretical bug but it's definitely not required. For the record: I'd still prefer to have all the changes I originally approved together in a minor release. |
Done |
UPDATED:
xcode
dependency as needed in 8.1.x to avoid breaking plugins such asbranch-cordova-sdk
before next major release, to resolve xcode was removed, but is required with 8.1.0 #706 (bug xcode was removed, but is required with 8.1.0 #706)emit a message in case someone usesrequireCordovaModule('xcode')
that it is now deprecated, will be removed in the near future, along with the recommended solutionrequireCordovaModule
would not be broken by a minor release upgradetar
dependency back totar@2
emit a deprecation warning message in case a plugin or application usesrequireCordovaModule
with a non-Cordova modulerequireCordovaModule
for non-Cordova modules #707:requireCordovaModule
for module names that do not start with "cordova-lib"Context#requireCordovaModule
unit testsThis fix is NOT WANTED in
master
branch. I think we do not want to supportrequireCordovaModule('xcode')
in the next major release.This fix was tested as follows:
bug-706-xcode-hotfix-test
on my forkbug-706-xcode-hotfix-test
branch on my fork ofcordova-cli
that uses cordova-lib fromgit+https://github.com/brodybits/cordova-lib.git#bug-706-xcode-hotfix-test
as dependencyconfig.xml
fix):nvs
tool (https://github.com/jasongin/nvs) to switch to Node.js 10.10 and donpm i -g https://github.com/brodybits/cordova-cli#bug-706-xcode-hotfix-test
cordova platform add ios
outputs the deprecation message, does not fail with thexcode
errorResolves #706