addons-server
addons-server copied to clipboard
Thunderbird WebExtension APIs unsupported by linter
We need to somehow teach addons-linter about Thunderbird APIs. Currently it gives:
cloudFile.onFileUpload is not supported
Warning: This API has not been implemented by Firefox.
It's a separate repo, so I guess we have to fork it. :-/ That would enable us to mark Firefox APIs as unsupported which is a bonus.
Yes, we'll have to fork it. I think it's just installed in the docker container under node_modules/.bin/addons-linter
so as long as we install our version in there somehow in the docker file, we don't necessarily need to upload it to npm I don't think. But that may be the easiest way to handle it, I dunno.
I've updated the linter at https://github.com/thundernest/addons-linter/tree/tb-apis. Now I'm going to check that it works nicely with addons-server.
Okay, that was easier than expected but not as simple as it should be. We're good to go. :+1:
I guess I need to figure out how to deploy our own addons linter now!
For addons-linter permission strings (via @jobisoft):
The places for fluent files:
https://searchfox.org/comm-central/source/mail/locales/en-US/messenger/extensionPermissions.ftl
https://searchfox.org/comm-central/source/mozilla/toolkit/locales/en-US/toolkit/global/extensionPermissions.ftl
And some relevant code:
https://searchfox.org/comm-central/source/mail/modules/ExtensionsUI.sys.mjs#192-222
John also upstreamed a fix to handle a schema overlap issue: https://github.com/mozilla/addons-linter/issues/5275
I believe we still have one more issue wrt web experiments but we currently bypass that with the existing addons-linter.
The plan is create a github action workflow under https://github.com/thunderbird/addons-linter that runs on master sync (so when we pull down from upstream) that will copy in the Thunderbird schema, build the project, and publish it to our npm account.
We can then adjust the package.json line to pull our addons-linter. (https://github.com/thunderbird/addons-server/blob/master/package.json#L9)
Additionally if we're forgetful about manually syncing from upstream, we can create a GHA that runs on a cron schedule that does it for us 😄