Skip to content
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

Deprecate requireCordovaModule for non-Cordova modules #707

Merged
merged 4 commits into from
Sep 28, 2018

Conversation

raphinesse
Copy link
Contributor

@raphinesse raphinesse commented Sep 28, 2018

Addresses the deprecation part of #689.

@brodycj
Copy link
Contributor

brodycj commented Sep 28, 2018

I just pushed a couple updates that I think are needed:

  • emit deprecation warning event in case of use of requireCordovaModule with non-Cordova module
  • fix and update spec for requireCordovaModule

I am about to include the deprecation warning event in the hotfix proposed in #708.

@raphinesse
Copy link
Contributor Author

raphinesse commented Sep 28, 2018

I just now wanted to push my implementation of this that I just finished. 😞

Would have been good if you let me know that you were working on this @brodybits.

@brodycj
Copy link
Contributor

brodycj commented Sep 28, 2018

@raphinesse go ahead and push your implementation. I was only doing this to help me with the hotfix.

@raphinesse
Copy link
Contributor Author

This version is not node@4 compatible, I'm afraid. But it should be straightforward to make it compatible.

@brodybits If you want to include this in #708, I think I can whip up a commit that makes this node@4 compatible.

@raphinesse raphinesse changed the title [WIP] Deprecate requireCordovaModule for non-Cordova modules [Deprecate requireCordovaModule for non-Cordova modules Sep 28, 2018
@raphinesse raphinesse changed the title [Deprecate requireCordovaModule for non-Cordova modules Deprecate requireCordovaModule for non-Cordova modules Sep 28, 2018
@brodycj
Copy link
Contributor

brodycj commented Sep 28, 2018

FYI I am only using part of 1fdc38d in patch PR #708. You can see it in 0b0ae7a. The other 3 commits so far are part of patch #708. Please let me know if you would like me to explain this in more detail.

@raphinesse
Copy link
Contributor Author

@brodybits I noticed it and it's fine. The bug is fixed anyway.

@brodycj
Copy link
Contributor

brodycj commented Sep 28, 2018

I hereby approve this PR with note of a nit that I can think of:

In case a user upgrades from Cordova 8, using requireCordovaModule with some modules will result in the warning message while using requireCordovaModule with some other modules will result in an installation error. Here are the modules I can find from Cordova 8 (8.0.0) that were dropped in master:

  • aliasify
  • dependency-ls
  • glob
  • nopt
  • opener
  • plist
  • properties-parser
  • request
  • shelljs
  • tar
  • unorm
  • valid-identifier
  • xcode

Another minor nit is that cordova-js is dropped in master. I suspect this should not be an issue in practice, just something we may want to be aware of.

brodycj pushed a commit to brodycj/cordova-lib that referenced this pull request Sep 28, 2018
(without test for warning messages as proposed in apacheGH-707 for master)
@raphinesse
Copy link
Contributor Author

@brodybits Agreed. If we should fork off another 8.x branch from master we would need to apply something similar to #708 there too.

@raphinesse raphinesse merged commit 81439dc into apache:master Sep 28, 2018
@raphinesse raphinesse deleted the deprecate-requireCordovaModule branch September 28, 2018 23:38
brodycj pushed a commit to brodycj/cordova-lib that referenced this pull request Sep 30, 2018
brodycj pushed a commit to brodycj/cordova-lib that referenced this pull request Sep 30, 2018
acran added a commit to BDSU/cordova-hot-code-push that referenced this pull request Dec 3, 2019
The use of context.requireCordovaModule() for non-cordova modules was
deprecated in favor of node's require()
see apache/cordova-lib#707
staskuban added a commit to staskuban/cordova-SmartIDReader that referenced this pull request Sep 22, 2020
staskuban added a commit to staskuban/cordova-SmartIDReader that referenced this pull request Sep 22, 2020
staskuban added a commit to staskuban/cordova-SmartIDReader that referenced this pull request Sep 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants