saadtazi / firefox-profile-js

Firefox Profile creation using nodejs and CLI
MIT License
60 stars 30 forks source link

jetpack-id usage #118

Closed fregante closed 3 years ago

fregante commented 3 years ago

I noticed that jetpack-id is deprecated, can this be replaced with something else? It's getID below:

https://github.com/saadtazi/firefox-profile-js/blob/3429330f01ad3ad8a760e977fdb2abc7686cc0d0/lib/firefox_profile.js#L584-L590

If it's still the only/correct way to do it, should jetpack-id be un-deprecated? It looks to me that it still makes sense for WebExtensions https://github.com/mozilla-jetpack/jetpack-id/blob/master/index.js

cc @rpl because he mentioned it in https://github.com/mozilla/web-ext/pull/2047#issuecomment-754854898

rpl commented 3 years ago

If it's still the only/correct way to do it, should jetpack-id be un-deprecated? It looks to me that it still makes sense for WebExtensions https://github.com/mozilla-jetpack/jetpack-id/blob/master/index.js

It is very unlikely that we are going to un-deprecate the jetpack-id package.

Also, from a very quick look the only thing that may still be valid in that package is the regexp to validate the id (which was a copy of what we do have on the Firefox side).

On the Firefox side we removed the loaders that were using the install.rdf and jetpack package.json files long time ago, and so those parts should not be really used anymore when this dependency is used on recent enough Firefox and TorBrowser versions.

We discussed about this during our triage meeting last week, @Rob--W is going to take a more deeper look into this specific deprecation warning.

fregante commented 3 years ago

Indeed, from what I gather this package was built around jetpack extensions and now it also supports WebExtensions. This means that jetpack-id is required here until Jetpack support is dropped, which apparently means rewriting most tests

saadtazi commented 3 years ago

Thank you guys for the comments and feedback. I am not very fast on responding because I started a new job some days ago and I don’t have a lot of time to dedicate to this project right now. I am also no longer using it personally or professionally (last time was probably 5 tears ago...). Of course you can continue to contribute to it.

rpl commented 3 years ago

@saadtazi thanks a lot for your support, today I took a quick look into how we could remove the deprecated jetpack-id dependency with the minimum amount of changes on the firefox-profile package, so that we wouldn't have to steal too much of your time for this first step.

PR #119 doesn't yet rip-off the backward compatibility behavior used for the legacy Firefox extension manifests (install.rdf and jetpack's package.json) and so it doesn't contains any reworked test (I think that it may be reasonable to defer that to separate followups) but just the addition of two new small functions (based on the ones that the jetpack-id is currently providing).