Skip to content

refactor!: Replace p libs with native JS APIs#197

Merged
breautek merged 3 commits into
apache:masterfrom
breautek:refactor-p-libs
Jun 18, 2026
Merged

refactor!: Replace p libs with native JS APIs#197
breautek merged 3 commits into
apache:masterfrom
breautek:refactor-p-libs

Conversation

@breautek

@breautek breautek commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Platforms affected

CLI

Motivation and Context

Modernizing the codebase to remove third-party dependencies

Description

  • Replaced p libs with native promises
  • Use async/await keywords and removed temporarily placed wrapper code
  • Added commands test spec with a mocked plugman (testing the actual plugman cordova-lib API is cordova-lib's job).

Marked as a breaking change due to the introduction of async syntax. Current engines should be already a satisfied based on these new requirements.

62d7e6a is a missed artifact from #175

I included as its own commit in this PR for simplicity but if necessary I can split it into its own PR.

Testing

Ran npm test

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

@breautek breautek marked this pull request as draft June 17, 2026 18:52
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.92%. Comparing base (5ba1d3a) to head (62d7e6a).

Additional details and impacted files
@@             Coverage Diff             @@
##           master     #197       +/-   ##
===========================================
+ Coverage   59.15%   82.92%   +23.77%     
===========================================
  Files           5        5               
  Lines          71       82       +11     
===========================================
+ Hits           42       68       +26     
+ Misses         29       14       -15     

☔ 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.

@breautek breautek marked this pull request as ready for review June 17, 2026 18:57

@erisu erisu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, it LGTM.

If you can figure out a way to avoid using rewire, that would be even better. Since there are only two test files, I was hoping we could eventually drop rewire and Jasmine in favor of Node's built-in test framework, but that could also be revisited in a separate PR.

@breautek

Copy link
Copy Markdown
Contributor Author

If you can figure out a way to avoid using rewire, that would be even better. Since there are only two test files, I was hoping we could eventually drop rewire and Jasmine in favor of Node's built-in test framework, but that could also be revisited in a separate PR.

Probably could be done but I'll try it in a separate PR and I'll create an issue for myself to serve as a reminder.

@breautek breautek merged commit d769121 into apache:master Jun 18, 2026
11 checks passed
@breautek breautek deleted the refactor-p-libs branch June 18, 2026 13:04
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