apache / cordova-lib

Apache Cordova Tooling Library
https://cordova.apache.org/
Apache License 2.0
221 stars 243 forks source link

feat(cordova/util): support requiring platform API from node_modules #860

Closed dpogue closed 3 years ago

dpogue commented 4 years ago

Platforms affected

all

Motivation and Context

We are looking at the possibility of having most of the platform tooling code run out of node_modules instead of being copied into the platforms folder. This allows loading the Platform API from either platforms or node_modules.

Description

Try loading the Platform API from the platforms folder, but failing that, require the main file from the platform package.json in node_modules.

Testing

Checklist

codecov-io commented 4 years ago

Codecov Report

Merging #860 into master will decrease coverage by 0.22%. The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #860      +/-   ##
==========================================
- Coverage   91.18%   90.96%   -0.23%     
==========================================
  Files          45       45              
  Lines        2054     2059       +5     
==========================================
  Hits         1873     1873              
- Misses        181      186       +5     
Impacted Files Coverage Δ
src/cordova/util.js 90.47% <0.00%> (-3.19%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 73d0155...2cde5e2. Read the comment docs.

codecov-commenter commented 3 years ago

Codecov Report

Merging #860 (dba211e) into master (73d0155) will decrease coverage by 0.02%. The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #860      +/-   ##
==========================================
- Coverage   91.18%   91.16%   -0.03%     
==========================================
  Files          45       45              
  Lines        2054     2059       +5     
==========================================
+ Hits         1873     1877       +4     
- Misses        181      182       +1     
Impacted Files Coverage Δ
src/cordova/util.js 93.24% <66.66%> (-0.42%) :arrow_down:
src/cordova/requirements.js 54.54% <0.00%> (-9.10%) :arrow_down:
src/cordova/serve.js 100.00% <0.00%> (ø)
src/cordova/platform/addHelper.js 94.73% <0.00%> (ø)
src/cordova/restore-util.js 93.33% <0.00%> (+0.83%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 73d0155...dba211e. Read the comment docs.