Skip to content

[POC] feat!: drop cordova-serve#164

Draft
erisu wants to merge 3 commits into
apache:masterfrom
erisu:feat/drop-cordova-serve
Draft

[POC] feat!: drop cordova-serve#164
erisu wants to merge 3 commits into
apache:masterfrom
erisu:feat/drop-cordova-serve

Conversation

@erisu

@erisu erisu commented Jul 14, 2026

Copy link
Copy Markdown
Member

Motivation and Context

Consolidate cordova-serve functionality in cordova-browser

Description

  • Dropped cordova-serve dependency from cordova-browser
    • Re-implement with bare minimum requirements.
  • Added npm packages express and compression for serving content content
  • Added npm package open for automatic opening of browser support
    • Only browser that open support will be supported. The following browsers are supported: brave, chrome, edge, firefox, safari. This does not include release variations, e.g. Chrome canary, Firefox Developer Edition, etc.
    • If additional browser support is needed, the recommendation is to submit an issue ticket to the open package.
    • Alternatively , --target=none can be passed to disable automatic opening of the browser and the app developer can manually open the browser of choice.
  • Added npm package string-dedent (String.dedent TC39 proposal)
    • Other repos had used dedent but I believe the above package is preferred as it was created by one of the champions for the String.dedent TC39 proposal.
  • Added/updated printout notice:
    • Serving is a development, for testing only, feature.
    • Recommend app developers to use their own setup for advance debugging features.
  • Added HTTPS/SSL Support (User must supply key & cert via run args)
    • --ssl-key-file=/path/to/key
    • --ssl-cert-file=/path/to/cert

TODO:

  • Write tests

Testing

Build app and use cordova run browser command.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

* Dropped `cordova-serve` dependency from `cordova-browser`
  * Re-implement with bare minimum requirements.
* Added npm packages `express` and `compression` for serving content content
* Added npm package `open` for automatic opening of browser support
  * Only browser that `open` support will be supported.
    The following browsers are supported: brave, chrome, edge, firefox, safari.
    This does not include release variations, e.g. Chrome canary, Firefox Developer Edition, etc.
  * `--target=none` can be passed to disable automatic opening of the browser.
* Added npm package `string-dedent` (`String.dedent` TC39 proposal)
  * Other repos used `dedent` but this package is created by the champions for the `String.dedent` TC39 proposal.
* Added/updated printout notice:
  * Serving is a development, for testing only, feature.
  * Recommend app developers to use their own setup for advance debugging features.
* Added HTTPS/SSL Support (User must supply key & cert via run args)
  * `--ssl-key-file=/path/to/key`
  * `--ssl-cert-file=/path/to/cert`
@erisu
erisu force-pushed the feat/drop-cordova-serve branch from fb92ce2 to 8604bb8 Compare July 16, 2026 06:45
Comment thread lib/CordovaDevServe.js Outdated
Co-authored-by: Darryl Pogue <darryl@dpogue.ca>
@codecov-commenter

codecov-commenter commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 10.00000% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.87%. Comparing base (d8b667d) to head (5e2059d).

Files with missing lines Patch % Lines
lib/Api.js 10.00% 9 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #164      +/-   ##
==========================================
- Coverage   69.39%   68.87%   -0.53%     
==========================================
  Files           8        8              
  Lines        1049     1057       +8     
==========================================
  Hits          728      728              
- Misses        321      329       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants