Hi all,

trying to prepare update of Ruby on Rails, I am once again in the territory of JavaScript. Specifically, I am trying to update rubygem-actiontext, which bundles Trix editor [1]. Or better to say it used to bundle Trix editor, because the editor itself was recently extracted into independent rubygem action_text-trix and that is what I am supposed to package.

The easiest thing would be close my eyes and just pretend this is typical gem and follow the Ruby guidelines [2]. And that is what we mostly did in such cases. As a minimal safety guarantee, I have put `js_recompilation` option requiring network access to be able to see during update that the JS is reproducible [3]. There also is `Provides: bundled(js-trix) = 2.1.12`. I think this is reasonable given the state of JS tooling in Fedora and JS ecosystem in general.

However, packaging new package, I once again feel guilty, because the JS guidelines are quite strict here [4]. They specifically says:

~~~

Sometimes there may exist a simple wrapper from a foreign language (like Ruby via rubygem-execjs or Java via rhino) or server-side JavaScript environment (like Node.js) to a pure JavaScript library. Such packages should delete the bundled library code and instead point to and Require the code provided by the primary Fedora package for that library.

~~~

As I said, the rubygem-actiontext upstream decided to unbundle the Trix from actiontext. They did it in form of creating dedicated rubygem-action_text-trix [5] package (by Fedora package naming). Now if I followed the JS guidelines, I'd be supposed to create yet another js-trix package, to later symlink the code back to rubygem-action_text-trix?

On top of that, js-trix has some dependencies => dompurify => @types/trusted-types. The guidelines require to rebuild those, but we don't have the tooling. But also, it seems that the @types/trusted-types does more bundling.

This is precisely the place where I would rather run away. And it looks so easy looking at the upstream repositories:

https://github.com/basecamp/trix

https://github.com/basecamp/trix/tree/main/action_text-trix

So should I keep closing my eyes and have RoR in Fedora or should I rather drop everything?


Vít




[1]: https://trix-editor.org/

[2]: https://docs.fedoraproject.org/en-US/packaging-guidelines/Ruby/#_rubygems

[3]: https://src.fedoraproject.org/rpms/rubygem-actiontext/blob/rawhide/f/rubygem-actiontext.spec

[4]: https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/#_wrappers_for_other_languages_or_environments

[5]: https://github.com/rails/rails/commit/a3b37ff166a925f7e069c9068f7ee92808da6e82

[6]: https://docs.fedoraproject.org/en-US/packaging-guidelines/JavaScript/#_compilationminification

[7]: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types

[8]: https://github.com/basecamp/trix

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

-- 
_______________________________________________
devel mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/[email protected]
Do not reply to spam, report it: 
https://forge.fedoraproject.org/infra/tickets/issues/new

Reply via email to