Changes between Version 1 and Version 18 of Ticket #5080


Ignore:
Timestamp:
10/15/2017 01:31:02 PM (2 years ago)
Author:
kzar
Comment:

(Marking this as being blocked by #5028 since I'm hoping the buildtools dependency will be updated to the previous commit there, and the copy of ensure_depdencies.py updated along with it. Otherwise the package-lock.json Node.js file could re-appear for people and cause problems.)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5080

    • Property Status changed from new to reviewing
    • Property Blocked By changed from 4864, 5077, 5079 to 4864, 5028, 5077, 5089, 5535
    • Property Summary changed from Start using modules for the content scripts to Switch module system to webpack, use modules for our content scripts
    • Property Owner kzar deleted
    • Property Blocking changed from to 3138, 5084
  • Ticket #5080 – Description

    v1 v18  
    11=== Background === 
    2 With the ESLint changes in #4864 we needed to add some `/* globals ... */` comments in order to get things to pass. We now want to reduce those by breaking the content scripts into proper modules. 
     2With the ESLint changes in #4864 we needed to add some `/* globals ... */` comments in order to get linting to pass. We now want to reduce those by breaking the content scripts into proper modules. 
     3 
     4Unfortunately our bespoke module system had quite a few limitations, switching our content scripts to use it wasn't easy. So we've replaced it with [https://webpack.js.org/ webpack]. 
    35 
    46=== What to change === 
    5 - Combine the relevant content scripts by adding them to the `convert_js` second in `metadata.common.`. Make sure the "modules" argument is used. Make sure the "autoload" argument is used where required. 
    6  
    7 - Export the globals used by others in those content scripts. 
    8 - Require those exported globals. 
    9 - Also require the things exported by `lib/elemHideEmulation.js` see #5079. 
    10 - Remove those global comments. 
     7- Update the buildtools dependency to `hg:e4e7800116f9 git:c8e1af0`. 
     8- Replace the `[convert_js]` section of our metadata files with `[bundles]`. Remove `autoload`, `module` and `injectinfomodule` options. Ensure only the modules which need to be autoloaded are listed, the others will be resolved by webpack automatically. 
     9- Bundle the relevant content scripts, exporting the globals used by the other content sctipts and replacing global comments with proper require statements. (Also require the things exported by `lib/elemHideEmulation.js` see #5079.) 
  • Ticket #5080 – Review URL(s)

    v1 v18  
     1https://codereview.adblockplus.org/29577555/