Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Debowerify #989

Merged
merged 29 commits into from
Jul 20, 2023
Merged

[WIP] Debowerify #989

merged 29 commits into from
Jul 20, 2023

Conversation

Pamplemousse
Copy link

@Pamplemousse Pamplemousse commented Jan 7, 2023

bower is deprecated to the point that cryptpad is being dropped in places because of its maintenance burden (see #295).

This PR aims at removing the need for bower for building cryptpad.

  • Naively migrate libraries to use npm and custom build script
    • in development environment
    • run tests
    • for production build
  • Use a JS bundler instead of npm + custom copies: relates to Use a JS bundler聽#881

It's my first time contributing to cryptpad, and I am not familiar with the codebase, so I will appreciate any feedback and help for testing 馃檪, thanks!

Relates to:

Pamplemousse added 29 commits January 7, 2023 08:01
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Also, explicitly add `chainpad-netflux`.

Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
As it is vendored in `www/lib/diff-dom`.

Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
Bump version to match requirements of `chainpad-netflux`.

Signed-off-by: Pamplemousse <git@xaviermaso.com>
Signed-off-by: Pamplemousse <git@xaviermaso.com>
@Pamplemousse
Copy link
Author

I have been trying to make it work in a development environment. Seems that I am mostly there, but there is still something trying to be loaded from www/bower_components/ in the index page, and I can't figure out why...

<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="/bower_components/tweetnacl/nacl-fast.min.js" src="/bower_components/tweetnacl/nacl-fast.min.js?ver=5.2.1-1673098798860-1673098953727"></script>

@yflory
Copy link
Contributor

yflory commented Feb 1, 2023

I was able to "fix" this bower_components call from the index page here: https://github.com/xwiki-labs/cryptpad/blob/debowerify/www/common/requireconfig.js#L31 It was coming from the chainpad-crypto library.

I've also published chainpad-listmap to npm and fix the fabricjs issue on our main branch.

Otherwise the PR looks good but still needs further testing on our side

@Pamplemousse
Copy link
Author

I was able to "fix" this bower_components call from the index page here: debowerify/www/common/requireconfig.js#L31 It was coming from the chainpad-crypto library.

Thanks!
Could it be a single instance of a more recurrent issue though? Every library cryptpad uses could have bower dependencies that would introduce a similar problem, right?
Is it OK given that the distribution / loading of dependencies should be revamped to use a JS bundler eventually?

@davidbenque davidbenque added this to the 5.4.0 milestone Jun 29, 2023
@davidbenque davidbenque changed the base branch from main to staging June 29, 2023 12:51
@yflory yflory removed this from the 5.4.0 milestone Jul 10, 2023
@ghost ghost added the Dependencies Any software dependancies problems label Jul 11, 2023
@yflory yflory merged commit 6e3c407 into cryptpad:staging Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependencies Any software dependancies problems
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants