aw-watcher-web icon indicating copy to clipboard operation
aw-watcher-web copied to clipboard

Improved code

Open GaurangTandon opened this issue 3 years ago • 4 comments

Hi! I'm interested in contributing to this project. It seems to have been quite some time since this web watcher got any commits :'(

I did the following simple changes:

  1. Major change: Setup ESLint: quite essential as more contributors get involved in the project. Most changes in JS files are automatic lint changes, with minor manual variable renaming, etc.
  2. Minor change: Update package versions: just bumped them up
  3. Minor change: ES modules + Webpack: it is better than traditional commonjs requires. To be fair, given a certain minimum supported Chrome version, we won't need any transpilation using webpack, as ES6 works out of the box in background pages. But I leave that for another day.

I have verified the web watcher works on both Chrome and Firefox (sends correct tab data to the server in testing mode). I am not sure how to test it further.


After this MR, I intend to look into the MV3 migration and some more extensive testing strategies (perhaps using playwright?). Please let me know how the maintainers plan to move this project forward. Thanks!

GaurangTandon avatar Feb 08 '22 12:02 GaurangTandon

This pull request fixes 1 alert when merging 849e3e7a66bf589f1bb72f72ca10a670a7943905 into dddfc78df42a4fb516ede0ae7edef177bff6d683 - view on LGTM.com

fixed alerts:

  • 1 for Expression has no effect

lgtm-com[bot] avatar Feb 08 '22 12:02 lgtm-com[bot]

It seems to have been quite some time since this web watcher got any commits :'(

This is a good thing! That means it works as intended, and that we can focus our efforts elsewhere :)

ES modules + Webpack

We're actively trying to avoid complex bundling schemes (as webpack tends to entail) since new releases need to be reviewed by Google/Mozilla, and they don't like it when you use webpack/lots of dependencies.

If you could get ES modules to work with browserify, that would be preferable.

I intend to look into the MV3 migration

That would be very nice! I don't think it should be any trouble, hopefully :)

Also, looks like package-lock.json it outdated (CI fails). Try updating it.

ErikBjare avatar Feb 08 '22 13:02 ErikBjare

Thanks for your prompt reply @ErikBjare . Regarding webpack being complex, unfortunately, I cannot find a good way to use ES modules with browserify. However, I wish to ask you if webpack vs browserify matters in this simple use case. Would the bundle size be any different when using either?

GaurangTandon avatar Feb 08 '22 13:02 GaurangTandon

This pull request fixes 1 alert when merging d7b64064992cf140d92bdd541e52849fe6630822 into dddfc78df42a4fb516ede0ae7edef177bff6d683 - view on LGTM.com

fixed alerts:

  • 1 for Expression has no effect

lgtm-com[bot] avatar Feb 08 '22 13:02 lgtm-com[bot]