Update @eyeo/snippets dependency to 0.5.5
Background / User story
In order to be up-to-date and able to make use of the newest snippets changes and in order to be able to push updates to the ML snippet we need to update the @eyeo/snippets dependency to 0.5.5
Dependency changes
- Name: @eyeo/snippets
- New version: 0.5.5 (incl. 0.5.4)
- Breaking changes: please read both Deprecation and Integration notes
-
Other changes:
- fixed a glitch in the artifact import to include the right Mv3 file for hide-if-graph-matches
- ensure either
window
orglobalThis
returns the expected environment reference internally to ensure our secured environment works as expected - improve racing debugging details by providing the winner name when any snippet wins a race
- added Mv3, Mv2 backward compatible, and tested, Machine Learning snippet, dropping the need for extra build steps by any 3rd party
- all internal tests are run against the actual module artifacts that grabs source code from our internal branches
- our full Open Source code is mirrored through the module itself, as that's how artifacts are created, to improve reliability of our artifacts builds
- cleaned up environment after hide-if-graph-matches test run
- fixed an outstanding, long lasting, bug around override-property-read snippet and multiple overrides over the same, non existent, reference
- the Mv2
snippets.json
artifact is now minified, granting best in class performance and reducing its size to the minimum
New features
- the module can now be used by both Mv2 and Mv3 manifest 3rd party extensions seamlessly, being sure the artifacts created through the module are exactly the same for both environments.
- when
debug
directive is used,race
provides at least the winning snippet name whenever that happens - Machine Learning snippet can now be tested through its dependency via the latest Web SDK once it's compatible with Mv3
- the override-property-read snippet now is fully tested against multiple overrides per same "root reference" in both ISOLATED and MAIN worlds
Deprecations
- the
@eyeo/snippets/injected
export, if used, is still available, but it's soon to be removed in favor of@eyeo/snippets/main
, because we'd like to be aligned with the official API wording around either MAIN or ISOLATED worlds, hence we'd like to avoid any possible confusion around these execution contexts in the future.
Integration changes
- Legal: N/A
-
Development:
- if you are using the latest Web SDK that is capable of both Mv2 and Mv3 architecture, you don't need to bundle the
@eyeo/snippets/ml
folder anymore because if you are using the module as standard ECMAScript import, the Machine Learning dependency will be injected out of the box for your extension, so feel free to clean up your bundling or CI procedure from that deprecated dance moving forward - any 3rd party bundler that wrongly, yet explicitly, used
@eyeo/snippets/webext/injected.mjs
should now point at@eyeo/snippets/webext/main.mjs
instead, as explained in the Deprecation note before. This is actually mandatory in case you picked that path, because theinjected.mjs
file itself doesn't exist anymore - any 3rd party bundler that wrongly, yet explicitly, used
@eyeo/snippets/webext/snippets.json
should now point at@eyeo/snippets/legacy/snippets.json
instead, as we're not planning to place legacy artifacts together with Mv3, yet Mv2 backward compatible, files. We hope having a legacy in the import path anywhere would make it explicit it's time to move on, thanks for your understand and help moving forward!
- if you are using the latest Web SDK that is capable of both Mv2 and Mv3 architecture, you don't need to bundle the
Hints for testers
None
Edited by Thomas Greiner