Hello everyone,

I was updating one of our projects from Cordova 6.5 to Cordova 8.0 this
week and I ran into the same issue as described in CB-13503 that prevents
local plugins from working properly when using cordova-fetch (
https://issues.apache.org/jira/browse/CB-13503)

I tried to dig into the problem and I think I have a working fix, so I
published it as PR #13 on GitHub: https://github.com/apache/cord
ova-fetch/pull/13. Talking to Jan Piotrowski on the slack channel, he
suggested that I also bring attention to it on this Mailing-List.

Specifically, this PR adds support for plugins added to package.json with
the syntax "my-plugin": "file:path/to/plugin". The trimID function did not
support those previously, since it tried to form a path with "target" +
"package.json" ("file:path/to/plugin/package.json") and used this path in
fs.existsSync, which failed because this function does not expect a file:
prefix.

I also added a test case that should reproduce the bug. It fetches the
plugin twice, because the first install doesn't trigger the trimID function
since the getJsonDiff works as expected the first time, and it only falls
back to trimID on the second run.

Please let me know if you have any questions or concerns regarding this
pull request. I will also try to monitor the PR on GitHub.

Have a nice day,
Thomas
-- 
Thomas Brian
Développeur Frontend
Frontend Developer
[email protected] <[email protected]>
www.tobostudio.com <http://tobostudio.com/>

Reply via email to