You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2022/05/20 02:33:16 UTC

[GitHub] [cordova-electron] erisu opened a new pull request, #230: feat: support custom Electron version

erisu opened a new pull request, #230:
URL: https://github.com/apache/cordova-electron/pull/230

   ### Motivation and Context
   <!-- Why is this change required? What problem does it solve? -->
   <!-- If it fixes an open issue, please link to the issue here. -->
   
   Support the ability to set custom Electron version.
   
   ### Description
   <!-- Describe your changes in detail -->
   
   Sometimes developers may want to:
   * use a newer versions of Electron that we do not support.
     * Cordova does not support using versions that are defined outside of the default major version range. Using anything outside of the default major range will beconsidered unsupported. The ability to major bump is for experimental purposes. Use at own risk.
   * force pin a version for consistency across environments (development & ci).
   * force pin a version to bypass a version that might contain critical bugs or reported security concerns.
   
   #### How to set custom version
   
   **The requirements:**
   
   * For this feature to work, development environment must have npm 8 or greater installed. 
   * npm 8 is provided by default with Node 16 and higher.
   * npm 8 may be installed on older version by running `npm i -g npm@latest`
   
   _note: It is always recommended to keep the environment tooling up-to-date and as of this PR, Node 16 is in Active LTS and Node 18 is current._
   
   **The settings**
   
   In `package.json` set the `overrides` property.
   
   E.g.
   
   ```json
   "overrides": {
     "cordova-electron": {
       "electron": "14.2.0",
     }
   }
   ```
   
   **The workings**
   
   NPM 8 has introduced the ability to override sub-package's dependencies. Since Cordova-Electron uses the Electron package for running the project, `cordova run`, this override can be used to control what version is installed.
   
   Additionally, the build script has been updated to extract the installed Electron package version to pass to the Electron Builder. This will ensure that the `cordova run` and the build app from `cordova build` will use the same version of Electron.
   
   ### Testing
   <!-- Please describe in detail how you tested your changes. -->
   
   `npm t`
   `cordova platform add`
   `cordova build electron`
   `cordova run electron --nobuild`
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [x] I added automated test coverage as appropriate for this change
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-electron] codecov-commenter commented on pull request #230: feat: support custom Electron version

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on PR #230:
URL: https://github.com/apache/cordova-electron/pull/230#issuecomment-1132394358

   # [Codecov](https://codecov.io/gh/apache/cordova-electron/pull/230?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#230](https://codecov.io/gh/apache/cordova-electron/pull/230?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (22f3623) into [master](https://codecov.io/gh/apache/cordova-electron/commit/de5e8bd28f7cac37e7e0c0660ab082d11bff2bdd?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (de5e8bd) will **not change** coverage.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@            Coverage Diff            @@
   ##            master      #230   +/-   ##
   =========================================
     Coverage   100.00%   100.00%           
   =========================================
     Files           14        14           
     Lines          653       655    +2     
   =========================================
   + Hits           653       655    +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/cordova-electron/pull/230?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [lib/build.js](https://codecov.io/gh/apache/cordova-electron/pull/230/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL2J1aWxkLmpz) | `100.00% <100.00%> (ø)` | |
   | [lib/util.js](https://codecov.io/gh/apache/cordova-electron/pull/230/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGliL3V0aWwuanM=) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/cordova-electron/pull/230?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/cordova-electron/pull/230?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [de5e8bd...22f3623](https://codecov.io/gh/apache/cordova-electron/pull/230?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


[GitHub] [cordova-electron] erisu merged pull request #230: feat: support custom Electron version

Posted by GitBox <gi...@apache.org>.
erisu merged PR #230:
URL: https://github.com/apache/cordova-electron/pull/230


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org