Skip to content
This repository has been archived by the owner. It is now read-only.

WebExtension migration #4864

Merged

Conversation

@jaredhirsch
Copy link
Member

@jaredhirsch jaredhirsch commented Sep 11, 2018

Having some trouble getting addons-linter to install, and had to manually delete and re-add package-lock.json (am I doing this wrong?), but this otherwise seems to work for me locally.

Things to note, from the actual commit:


Migrate Screenshots to pure WebExtension

  • The addons system, not the Screenshots addon, will be responsible for
    detecting changes to the 'extensions.screenshots.disabled' pref, and
    starting up or shutting down the Screenshots webextension when changes
    occur (bug 1488971).

  • The LibraryButton code has been moved from bootstrap.js into the
    embedded API. We'll be able to remove this code as soon as Library
    menu items can be declared from the WebExtension manifest (bug 1366389).

  • Move addon/webextension to webextension, update all the refs.

  • Update makefile and build tools.

  • Remove the script that deletes duplicate locales (en_CA) at build
    time, because this breaks running with web-ext, and there is code to
    handle duplicate locales inside export_mc.py already.

  • Still TODO: README files and docs directory not yet updated

@jaredhirsch jaredhirsch force-pushed the jaredhirsch:webextension-migration branch from f160281 to e6432c7 Sep 11, 2018
@jaredhirsch
Copy link
Member Author

@jaredhirsch jaredhirsch commented Sep 11, 2018

Looks like Circle-CI had problems building addons-linter, and I had problems with that, too. I'm not sure if I broke something with the build tooling changes.

@chenba
Copy link
Collaborator

@chenba chenba commented Sep 11, 2018

The addons-linter issue is caused by some kind of (inter)dependency problem. But mozilla/addons-linter#1617 is not helping either.

If we reinstall jpm for this branch, then addons-linter would start working again. With some digging, it seems like it's sign-addon from jpm that's needed. But since addons-linter doesn't appear to use sign-addon directly, maybe it's one of sign-addon's dependencies? Madness.

@chenba
chenba approved these changes Sep 11, 2018
Copy link
Collaborator

@chenba chenba left a comment

LGTM. Just gotta figure out what to do about the addons-linter issue.

@jaredhirsch
Copy link
Member Author

@jaredhirsch jaredhirsch commented Sep 11, 2018

Nice sleuthing! I'm fine to re-add jpm as a dev dependency. Might even be able to get rid of those awful package-lock.json commits

@jaredhirsch jaredhirsch force-pushed the jaredhirsch:webextension-migration branch from e6432c7 to 322ef92 Sep 11, 2018
@chenba
Copy link
Collaborator

@chenba chenba commented Sep 11, 2018

Cannot find module 'regenerator-runtime' is the actual error. And it's a webpack dependency.

@jaredhirsch
Copy link
Member Author

@jaredhirsch jaredhirsch commented Sep 11, 2018

@aswan Hey, would you mind taking a look at this PR? Particularly looking for feedback on the API implementation: https://github.com/mozilla-services/screenshots/pull/4864/files#diff-8e1f4fd10b786635bc10f97bcbec60e3

"async": true
},
{
"name": "uninitLibraryButton",

This comment has been minimized.

@aswan

aswan Sep 11, 2018

this doesn't appear to actually be implemented?

This comment has been minimized.

@jaredhirsch

jaredhirsch Sep 11, 2018
Author Member

Oh, good catch! I removed that in favor of the callOnClose. I'll yank it out of the schema, too.

@jaredhirsch jaredhirsch force-pushed the jaredhirsch:webextension-migration branch from 322ef92 to 48a06e5 Sep 11, 2018
@jaredhirsch
Copy link
Member Author

@jaredhirsch jaredhirsch commented Sep 11, 2018

Looks like I've got a rebase to do before this lands. @ianb do you have any comments on this PR?

* The addons system, not the Screenshots addon, will be responsible for
detecting changes to the 'extensions.screenshots.disabled' pref, and
starting up or shutting down the Screenshots webextension when changes
occur (bug 1488971).

* The LibraryButton code has been moved from bootstrap.js into the
embedded API. We'll be able to remove this code as soon as Library
menu items can be declared from the WebExtension manifest (bug 1366389).

* Move addon/webextension to webextension, update all the refs.

* Update makefile and build tools.

* Remove the script that deletes duplicate locales (en_CA) at build
time, because this breaks running with web-ext, and there is code to
handle duplicate locales inside export_mc.py already.

* Keep `jpm` because `addons-linter` seems to depend on it

* Still TODO: README files and docs directory not yet updated
@jaredhirsch jaredhirsch force-pushed the jaredhirsch:webextension-migration branch from 48a06e5 to e79810c Sep 12, 2018
@jaredhirsch jaredhirsch mentioned this pull request Sep 12, 2018
@jaredhirsch jaredhirsch merged commit 010867e into mozilla-services:master Sep 12, 2018
2 checks passed
2 checks passed
ci/circleci: build Your tests passed on CircleCI!
Details
ci/circleci: test Your tests passed on CircleCI!
Details
@jaredhirsch jaredhirsch deleted the jaredhirsch:webextension-migration branch Sep 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants