Opened on 09/24/2017 at 09:10:23 AM

Closed on 04/09/2018 at 11:11:15 AM

Last modified on 05/10/2018 at 07:23:48 PM

#5760 closed change (fixed)

Use relative require paths in adblockpluschrome

Reported by: kzar Assignee: jsonesen
Priority: P3 Milestone: Adblock-Plus-3.1-for-Chrome-Opera-Firefox
Module: Platform Keywords:
Cc: sebastian Blocked By: #5535
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29713631/

Description (last modified by kzar)

Background

Previously we've used our own system for managing modules, the files bundled were specified manually in the metadata and then modules were required with no path part.

With the switch to using webpack for bundling, bundled files are resolved at build time automatically. When modules are required with no path part webpack will check the hard-coded resolve paths for suitable files, but that has several limitations / problems.

What to change

Change all require calls in adblockpluschrome to use relative paths. E.g.

In adblockpluschrome/lib/whitelisting.js this require:

const {RegExpFilter} = require("filterClasses");

should become:

const {RegExpFilter} = require("../adblockpluscore/lib/filterClasses");

The legacy prefix syntax should be replaced too. E.g.

In adblockpluschrome/include.preload.js this require:

let {ElemHideEmulation} = require("content_elemHideEmulation");

should become:

let {ElemHideEmulation} = require("./adblockpluscore/lib/content/elemHideEmulation");

Attachments (0)

Change History (7)

comment:1 Changed on 09/24/2017 at 09:25:02 AM by kzar

  • Description modified (diff)

comment:2 Changed on 09/24/2017 at 09:05:16 PM by sebastian

  • Priority changed from Unknown to P3
  • Ready set

comment:3 Changed on 03/02/2018 at 09:56:27 PM by jsonesen

  • Owner set to jsonesen

comment:4 Changed on 03/03/2018 at 04:11:11 AM by jsonesen

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed on 04/09/2018 at 03:52:20 AM by abpbot

A commit referencing this issue has landed:
Issue 5760 - Use relative require

comment:6 Changed on 04/09/2018 at 11:11:15 AM by kzar

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Firefox-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:7 Changed on 05/10/2018 at 07:23:48 PM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Done. I have not found any regressions related to this change.

ABP 3.0.4.2042
Firefox 59 / 55 / 51 / Windows 10
Chrome 66 / 58 / 49 / Windows 7
Opera 52 / 45 / 36 / Windows 10

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from jsonesen.
 
Note: See TracTickets for help on using tickets.