apache / apache/cordova-cli

`cordova plugin remove` not cleaning `<js-module />` changes.

Open
#354 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
967
Forks
344
Avg merge
8h 41m
Merged PRs (30d)
9

Description

Don't know if it is a limitation or a lack of dependency tracking but:
```bash
cordova create plugtestapp-a com.test.plugtestapp PlugTestApp \
&& cd plugtestapp-a/ \
&& cordova platform add android@7.1.1 \
&& cd .. \
&& cordova create plugtestapp-b com.test.plugtestapp PlugTestApp \
&& cd plugtestapp-b/ \
&& cordova plugin add cordova-plugin-local-notification \
&& cordova platform add android@7.1.1 \
&& cordova plugin remove cordova-plugin-local-notification \
&& cd .. \
&& diff --recursive plugtestapp-a plugtestapp-b
```

Residual data in:
```
diff plugtestapp-a/platforms/android/platform_www/cordova_plugins.js plugtestapp-b/platforms/android/platform_www/cordova_plugins.js
diff plugtestapp-a/plugins/fetch.json plugtestapp-b/plugins/fetch.json
```

Don't know if it can cause issues on prepared platform while removing plugin with this but I think it could.
And developers are not prepared! At least the documentation should warn developers in order to always make a clean platform prepare before shipping release.

Contributor guide

Open the contributing guide

Research direction

Reproduce the command sequence in the issue, then compare the generated platforms/android/platform_www/cordova_plugins.js and plugins/fetch.json files with the clean app. Start by tracing plugin removal and platform preparation behavior; done means removal leaves no residual plugin data, or the limitation is clearly documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, nodejs
Domain
cli, mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.