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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use vendor libraries from npm and various fixes #3066

Merged
merged 28 commits into from
May 18, 2024
Merged

Conversation

haarg
Copy link
Member

@haarg haarg commented May 13, 2024

This removes the vendored libraries we had, and instead uses them from npm.

It also fixes various problems that were introduced with the conversion to esbuild. With that conversion, the jQuery object and other functions were no longer globally available. This broke various bits of inline code.

This removes all of the inline code, like onclick handlers.

root/static/js/cpan.js Show resolved Hide resolved
@haarg

This comment was marked as outdated.

Copy link

codecov bot commented May 13, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 71.71%. Comparing base (a10ebeb) to head (9b25002).
Report is 1 commits behind head on master.

Current head 9b25002 differs from pull request most recent head 4380596

Please upload reports for the commit 4380596 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3066      +/-   ##
==========================================
- Coverage   72.47%   71.71%   -0.76%     
==========================================
  Files          69       70       +1     
  Lines        2372     2411      +39     
  Branches      334      338       +4     
==========================================
+ Hits         1719     1729      +10     
- Misses        526      555      +29     
  Partials      127      127              
Files Coverage Δ
lib/MetaCPAN/Web/Controller/Account/Favorite.pm 16.66% <0.00%> (ø)

... and 1 file with indirect coverage changes

@oalders
Copy link
Member

oalders commented May 16, 2024

@dhogan8 if you have a moment, can you take a quick look at the front end changes? The diff is too large for a human to handle, but even if you spent 5 or 10 minutes on it, that would be helpful.

haarg added 9 commits May 17, 2024 20:21
syntaxhighlighter is not entirely designed to be used from npm, so it
requires some weird bits.

For one, the brushes are separate packages with terrible names. The
themes are also badly named, and not correctly packaged.

The theme is written in scss and doesn't have a compiled version
available via npm. This requires adding an scss compiler. In the future,
it would be better to convert all of our code to scss, so this isn't
terrible.
All of the uses of jQuery via window have been removed. The only
remaining implicit use is the qtip2 module, which is covered by the
injection mechanism.
Dockerfile Show resolved Hide resolved
@haarg haarg merged commit b08d4e9 into master May 18, 2024
9 of 10 checks passed
@haarg haarg deleted the haarg/deps-from-npm branch May 18, 2024 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants