Replace vendor/abp-snippets git submodule with @eyeo/snippets npm package
Background / User story
When adblockplusui started being the main Adblock Plus repository, for which we merged it with the adblockpluschrome code (see #884 (closed)), we also adopted its approach to integrating internal dependencies via git submodules. Nowadays both eyeo-internal dependencies (i.e. abp-snippets and webext-sdk) are being published to npm. Therefore we should switch to integrate those dependencies as npm packages, as we do with other third-party dependencies.
For that, however, we first need to upgrade abp-snippets to 0.5.1 (see #1076 (closed) and #1197 (closed)), so that the new snippets package can be published to npm. It is worth noting though that there are some additional deviations between the files we generate from abp-snippets 0.5.1 and the prebuilt files in @eyeo/snippets 0.5.1, namely:
- Files are no longer minified.
- Files now contain inline comments.
- node-fetch dependency was removed.
Additionally, we need to ensure that extension store reviewers continue to be able to access the snippets source code, and build the extension from it to replicate the builds we're publishing.
What to change
- Design: N/A
- Research: N/A
- Spec: N/A
- Legal: TBD
-
Development:
- Remove vendor/abp-snippets git submodule.
- Add @eyeo/snippets@0.5.1 npm package.
- Update references to dependencies and build instructions (incl. README, release workflow wiki) accordingly:
- Replace vendor/abp-snippets/dist/ml/bundle.ml.mjs with @eyeo/snippets/ml/bundle.ml.mjs
- Replace vendor/abp-snippets/dist/ml/hideIfGraphMatches/* with @eyeo/snippets/ml/hideIfGraphMatches/*
- Replace vendor/abp-snippets/dist/webext/snippets.json with @eyeo/snippets/json
- Remove logic for generating private builds with snippets (see #966 (closed)).
Hints for testers
We removed the "build:with-snippets" CI job, because snippets are now included in public builds that are generated via the "build" CI job.
Apart from the minor changes mentioned in the Background section, which aren't exected to have any impact on the functionality, nothing about the snippets we're using should've changed. That means that snippets should behave the same as before.
Snippets on Firefox are still broken (see #1213 (closed)), because we haven't upgraded to a newer snippets dependency version yet. That version update and the fix contained in it is going to be part of #1214 (closed).
Hints for translators
N/A