Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Version control javascript libraries with NPM #3124

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

Open
vmcj wants to merge 11 commits into DOMjudge:main
base: main
Choose a base branch
Loading
from vmcj:introduce_npm

Conversation

@vmcj
Copy link
Member

@vmcj vmcj commented Sep 27, 2025

NPM is another packagemanager for JS. So we use composer first and when we can't find the package there we check with npm.

This change does require more changes for maintainer-install & any checkout.

If we do this it makes introducing MathJax a lot easier and we can now also version control other javascript libraries.

Copy link
Member

If we do this, I'd suggest going for npm (or yarn) fully for JS dependencies

Copy link
Member Author

vmcj commented Sep 27, 2025

If we do this, I'd suggest going for npm (or yarn) fully for JS dependencies

So also remove JS dependencies in composer and add them in npm? I'm fine with either of the 2 but for adaptation doing it in composer is an easier learningpath.

I somehow never used yarn but if that's the better of the 2 but I have no experience with that translation path.

I also think we should only do this in the next release so we have some time to discuss.

Copy link
Member

If we do this, I'd suggest going for npm (or yarn) fully for JS dependencies

So also remove JS dependencies in composer and add them in npm? I'm fine with either of the 2 but for adaptation doing it in composer is an easier learningpath.

I somehow never used yarn but if that's the better of the 2 but I have no experience with that translation path.

I also think we should only do this in the next release so we have some time to discuss.

I think it doesn't make sense to have 2 package managers for frontend dependencies, that's why I suggest using npm (or yarn, which can read the same package.json file) for all.

vmcj and Dup4 reacted with thumbs up emoji

@vmcj vmcj marked this pull request as draft September 28, 2025 11:10
@vmcj vmcj force-pushed the introduce_npm branch 4 times, most recently from d4096af to 3bfe280 Compare October 27, 2025 18:27
@vmcj vmcj marked this pull request as ready for review October 27, 2025 18:27
Copy link
Member Author

vmcj commented Oct 27, 2025
edited
Loading

The other packages are harder to either find (dataTables) or don't work 1-on-1 (font-awesome). I'll look at those in another PR. Reviewing is easiest commit by commit and by just skipping the monaco one as that's the one touch most files.

vmcj added 11 commits October 27, 2025 19:29
Per commit we'll put the JS frontend libraries under control of a
javascript dependency manager similar to composer for PHP.
This requires removing it from composer and adding it to yarn.
Default it seemed to pick a development version. This complains that it
requires d3 also, that will be in the next commits.
This also fixes the issue that d3 as dependency is missing for nv3, note that
we can't update d3 yet because of this dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@nickygerritsen nickygerritsen Awaiting requested review from nickygerritsen

@eldering eldering Awaiting requested review from eldering

@meisterT meisterT Awaiting requested review from meisterT

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /