-
Notifications
You must be signed in to change notification settings - Fork 74
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
Refactor websocket/
from CommonJS to ESM
#324
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hieplpvip
reviewed
Sep 12, 2023
hieplpvip
reviewed
Sep 12, 2023
Thanks for the PR! I think the changes in |
hieplpvip
reviewed
Sep 12, 2023
@hieplpvip I was going to add something to |
DuCanhGH
changed the title
refactor: migrate websocket to ESM
Refactor Sep 12, 2023
websocket/
from CommonJS to ESM
hieplpvip
approved these changes
Sep 12, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
behitek
pushed a commit
to luyencode/lcoj-site
that referenced
this pull request
Sep 15, 2023
Co-authored-by: Le Bao Hiep <baohiep2013@gmail.com>
behitek
added a commit
to luyencode/lcoj-site
that referenced
this pull request
Sep 30, 2023
This reverts commit 8795a9b.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR migrates
websocket/
from CommonJS to ESM. This helps modernize the codebase, gets rid of legacy or unmaintained code (including packages), and helps make the code easier to work with. It also adds a lockfile fornpm
to avoid breaking the site when sudden breaking changes happen in one or more dependencies.What
Some of the changes are as aforementioned.
The PR gets rid of
qu
(with a copy of its code) andsimplesets
(with JS's standardizedSet
), which haven't been maintained in years.I've also added
prettier
to help format JS code so that we don't have to manually format them (currently applies towebsocket/
only), fixed some grammar errors inREADME.md
and502.html
.Node.js has been upgraded to v18 as v14 reached its End-of-Life in April 2023 and v16 reaches its End-of-Life today.
No breaking changes are expected from this PR.
How was this PR tested?
I simply set
EVENT_DAEMON_USE
inlocal_settings.py
toTrue
and providedEVENT_DAEMON_POST
andEVENT_DAEMON_GET
, and verified that the websocket still worked by submitting in one tab and opening/submissions
in another tab. Both tabs were updated when the judge finished testing.Checklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.By submitting this pull request, I confirm that my contribution is made under the terms of the AGPL-3.0 License.