Skip to content

Bump Node.js to version 20, update documentation #2712

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

Merged
merged 16 commits into from
Jan 15, 2024
Merged

Bump Node.js to version 20, update documentation #2712

merged 16 commits into from
Jan 15, 2024

Conversation

RichDom2185
Copy link
Member

@RichDom2185 RichDom2185 commented Nov 13, 2023

Description

Node 16 is EOL, and while upgrading to Node 18 seems to break GitHub runners and other x86 machines, surprisingly, bumping to Node 20 fixes these issues, although now they break on Apple Silicon.

But this is expected, since the version of gl does not technically support Node 18. Hence, I've manually bumped the version using selective dependency resolution. This is safe because if we take a look at their changelog, we see that the only reason for the major version bump from v5 to v6 is that they remove support for Node 12, with no other breaking changes besides that.

I guess it's good we never bothered with Node 18 after all, since Node 18 just stopped being actively maintained.

TODO:

  • Update README instructions

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Code quality improvements

Checklist

  • I have tested this code
  • I have updated the documentation

@RichDom2185 RichDom2185 requested a review from chownces November 13, 2023 19:27
@RichDom2185 RichDom2185 self-assigned this Nov 13, 2023
* Install apt dependencies before building
* Use checkout v3 instead of master
* Replace manual caching strategy with updated setup node action
@coveralls
Copy link

coveralls commented Nov 13, 2023

Pull Request Test Coverage Report for Build 7518563143

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 37.186%

Totals Coverage Status
Change from base Build 7483358271: 0.0%
Covered Lines: 5728
Relevant Lines: 14465

💛 - Coveralls

Copy link
Member Author

@RichDom2185 RichDom2185 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested running yarn start and yarn build locally on 3 different platforms:

  • Apple Silicon (M1 Pro MBP)
  • Windows 10
  • Windows Subsystem for Linux

So they should work with everything, but just to be sure:

  • @leeyi45 do you mind helping me test this branch on your Windows machine as well?
  • Likewise, @chownces on macOS?

@sayomaki
Copy link
Contributor

sayomaki commented Nov 14, 2023

Tested and working with M1 Pro MBP Apple Silicon (yarn install, yarn build, yarn test and yarn start), thanks for the good work!

System Specifications:

  • macOS 12.7 Monterey
  • node 20.9.0 arm64
  • python 2.7.18 arm64
  • Xcode 14.2 arm64

Presumably it should work fine on x86_64 based macOS as well, given that there are no issues with M1-based systems. @RichDom2185 do you mind sharing more system information for those you have tested on?

@sayomaki
Copy link
Contributor

Also, I notice that [email protected] is still present within the lockfile and it does prompts a warning when running yarn install, and it seems that gpu.js has the dependency tied to this version of gl. Should we proceed to bump the subdepedency to gl@6 instead?

@RichDom2185
Copy link
Member Author

Presumably it should work fine on x86_64 based macOS as well, given that there are no issues with M1-based systems. @RichDom2185 do you mind sharing more system information for those you have tested on?

  • Apple Silicon (M1 Pro MBP)
    • macOS 14.1, 14.1.1 Sonoma
    • Node 20.9.0 arm64
    • Python 3.10.13 arm64
    • xcode-select version 2403
  • Windows 10
    • Build 19044
    • Intel i7-7700HQ
    • Node 20.9.0
    • Python 3.11.6
  • Windows Subsystem for Linux
    • Ubuntu 20.04 Focal, running on the above Win10 machine
    • Node 20.9.0
    • Python 3.8.10 (default for 20.04)
    • GCC 9.4.0

* Create separate CONTRIBUTING.md file for developer-specific items
* Reorganize and reword some sections and sentences
Include references to `.node-version` file and Python dependency, as
well as simplifying some wording.
@RichDom2185 RichDom2185 changed the title Bump Node.js to version 20 Bump Node.js to version 20, update documentation Nov 16, 2023
@RichDom2185 RichDom2185 marked this pull request as ready for review November 16, 2023 03:55
@leeyi45
Copy link
Contributor

leeyi45 commented Nov 26, 2023

As far as I can tell there's no issues running on Windows

@RichDom2185 RichDom2185 enabled auto-merge (squash) January 9, 2024 11:16
Comment on lines +28 to +31
- name: yarn install and build
run: |
yarn install --frozen-lockfile
yarn run build
Copy link
Contributor

@chownces chownces Jan 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a reason for removing the build cache here?

looks good otherwise (M2 MBA Sonoma, Node 20.9.0, Python 3.9)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using

with:
  cache: yarn

in actions/setup-node handles this caching for us. We no longer need to manually set up caching of certain files/folders anymore.

@RichDom2185 RichDom2185 merged commit 5919dd1 into master Jan 15, 2024
@RichDom2185 RichDom2185 deleted the node-20 branch January 15, 2024 08:26
CheongYeeMing pushed a commit to SA-Teams-Assessment/frontend that referenced this pull request Jan 16, 2024
* Create .node-version file

* Add selective WebGL dependency resolution

* Bump node version in CI workflows

* Fix missing dependencies in CI workflow

* Update CD workflow

* Install apt dependencies before building
* Use checkout v3 instead of master
* Replace manual caching strategy with updated setup node action

* Fix typo in CLI option

* Fix insufficient permissions

* Update actions to v4

* Fix resolution warning

* Reorganize documentation

* Create separate CONTRIBUTING.md file for developer-specific items
* Reorganize and reword some sections and sentences

* Update and simplify README instructions

Include references to `.node-version` file and Python dependency, as
well as simplifying some wording.

* Add Python 3.11 disclaimer
RichDom2185 added a commit that referenced this pull request Mar 26, 2024
* Migrate ground control table to tanstack, without filtering and sorting functionalities

* Add filter to ground control table

* Remove defualt filter for ground control table

* Add team size column for ground control table

* Add ID to ground control table

* Update team size edit cell

* Add team size edit column for ground control

* Remove console logs

* Replace row-wise update button with one update button

* Fix bug of team size edit cell not responding for the first click

* Remove unused logs and dependencies

* Fix dependency warning for ground control

* Establish connection with Backend

* Modify payload for postTeams API Call

* Refetch after successfully creating Teams

* Fix page button in team formation

* Add config file

* Modify response payload for fetching students

* Refetch after successfully updating Teams

* Add Upload CSV API Call

* Update assessment workspace

* Remove console logs

* Add team information page to assessment workspace

* Display names in team info page

* Add team flag to assessment dashboard

* Fix assessment overview card

* Modify request to handle 409 Conflict Response

* Update Upload Teams CSV format

* Change minTeamSize to 0

* Add disable Save button in Assessment Workspace

* Add TeamFormationOverview to SessionState

* Revert changes made by Yiting

* Add assessment type indication: Team or Individual

* Add TeamFormationOverview to AssessmentWorkspce

* Add role checks to remove error 403

* Modify GradingQuestion for team submissions

* Remove console logs

* Remove unused code

* Resolve warning ==

* Add lastModifiedAt field for Answer

* Add Save-Safe

* Update Jest Snapshots

* Write tests for FE components

* Write test for SessionActions

* Remove commented code

* Add comments for API calls

* Retrieve create team error message from BE resp

* Add Workspace for TeamFormation

* Update Team Formation Table Filter

* Add Student Name Column Filter

* Fix TeamFormation table global student name filter

* Fix TeamFormation table global student name filter

* Retrieve student username to grading

* Resolve yarn lock

* Split student names in grading editor

* Fix Team Submission for GradingOverview

* Fix Grading Table Header

* Bump Node.js to version 20, update documentation (#2712)

* Create .node-version file

* Add selective WebGL dependency resolution

* Bump node version in CI workflows

* Fix missing dependencies in CI workflow

* Update CD workflow

* Install apt dependencies before building
* Use checkout v3 instead of master
* Replace manual caching strategy with updated setup node action

* Fix typo in CLI option

* Fix insufficient permissions

* Update actions to v4

* Fix resolution warning

* Reorganize documentation

* Create separate CONTRIBUTING.md file for developer-specific items
* Reorganize and reword some sections and sentences

* Update and simplify README instructions

Include references to `.node-version` file and Python dependency, as
well as simplifying some wording.

* Add Python 3.11 disclaimer

* Prettier formatting rules

* Yarn Eslint

* Update snapshot

* Fix yarn run tsc

* Update snapshot

* Update failing snapshots

* Remove package-log.json

Done as the project uses Yarn.

* Restore old environment visualizer snapshots

* Bump follow-redirects from 1.15.2 to 1.15.4 (#2720)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update field to generate new date

* Remove commented code

* Change student fields to array

* Separate names in Team Formation Table by comma

* Add Team related fields to GradingOverview

* Fix yarn run tsc

* Fix formatting issues

* Remove commented code

* Clean up some code

* Remove console.log statement
* Remove unused stylesheet import
* Remove more commented code

* Update Individual Assignment to have maxTeamSize of 1

* Remove commented code

* Correct API response for GradingOverviews

* Update failing snapshots

* Remove unused code

* Update snapshots post-merge conflict

* Use CSS modules for team formation

* Fix incorrect minimum team size

* Clean up `GroundControlEditTeamSizeCell`

* Update imports
* Update typings
* Remove commented code
* Remove unused type export
* Refactor to use `useCallback`
* Remove unnecessary divs, classes

* Remove unnecessary styles

The styles won't matter for a flex item, thus are removed.

* Remove unnecessary function

* Simplify variable name for readability

* Revert "Remove commented code"

This reverts commit 0cf1f60.

* Fix data flow for editing max team size

* Fix unnecessary API calls

* Reran yarn install post-merge

* Remove unnecessary stub types package

* Fix format post-merge

* Update snapshots post-merge

* Remove TODO comment

The default value of 1 is intentional.

* Make last modified date optional

* Revert "Make last modified date optional"

This reverts commit 6bebb24.

* Update snapshots post-merge

* Migrate new action creators to RTK

* Fix incorrect past merge conflict resolution

* Improve codebase consistency

* Update lockfile

* Update snapshots post-merge

* Format files post-merge

* Fix errors post-merge

* Restore comment

* Fix incorrect condition check

* Update lockfile post merge

* Migrate team actions to RTK

* Fix tests

* Fix compile error post-merge

* Fix lint

---------

Co-authored-by: Lu Yiting <[email protected]>
Co-authored-by: Richard Dominick <[email protected]>
izruff pushed a commit that referenced this pull request Apr 2, 2024
* Migrate ground control table to tanstack, without filtering and sorting functionalities

* Add filter to ground control table

* Remove defualt filter for ground control table

* Add team size column for ground control table

* Add ID to ground control table

* Update team size edit cell

* Add team size edit column for ground control

* Remove console logs

* Replace row-wise update button with one update button

* Fix bug of team size edit cell not responding for the first click

* Remove unused logs and dependencies

* Fix dependency warning for ground control

* Establish connection with Backend

* Modify payload for postTeams API Call

* Refetch after successfully creating Teams

* Fix page button in team formation

* Add config file

* Modify response payload for fetching students

* Refetch after successfully updating Teams

* Add Upload CSV API Call

* Update assessment workspace

* Remove console logs

* Add team information page to assessment workspace

* Display names in team info page

* Add team flag to assessment dashboard

* Fix assessment overview card

* Modify request to handle 409 Conflict Response

* Update Upload Teams CSV format

* Change minTeamSize to 0

* Add disable Save button in Assessment Workspace

* Add TeamFormationOverview to SessionState

* Revert changes made by Yiting

* Add assessment type indication: Team or Individual

* Add TeamFormationOverview to AssessmentWorkspce

* Add role checks to remove error 403

* Modify GradingQuestion for team submissions

* Remove console logs

* Remove unused code

* Resolve warning ==

* Add lastModifiedAt field for Answer

* Add Save-Safe

* Update Jest Snapshots

* Write tests for FE components

* Write test for SessionActions

* Remove commented code

* Add comments for API calls

* Retrieve create team error message from BE resp

* Add Workspace for TeamFormation

* Update Team Formation Table Filter

* Add Student Name Column Filter

* Fix TeamFormation table global student name filter

* Fix TeamFormation table global student name filter

* Retrieve student username to grading

* Resolve yarn lock

* Split student names in grading editor

* Fix Team Submission for GradingOverview

* Fix Grading Table Header

* Bump Node.js to version 20, update documentation (#2712)

* Create .node-version file

* Add selective WebGL dependency resolution

* Bump node version in CI workflows

* Fix missing dependencies in CI workflow

* Update CD workflow

* Install apt dependencies before building
* Use checkout v3 instead of master
* Replace manual caching strategy with updated setup node action

* Fix typo in CLI option

* Fix insufficient permissions

* Update actions to v4

* Fix resolution warning

* Reorganize documentation

* Create separate CONTRIBUTING.md file for developer-specific items
* Reorganize and reword some sections and sentences

* Update and simplify README instructions

Include references to `.node-version` file and Python dependency, as
well as simplifying some wording.

* Add Python 3.11 disclaimer

* Prettier formatting rules

* Yarn Eslint

* Update snapshot

* Fix yarn run tsc

* Update snapshot

* Update failing snapshots

* Remove package-log.json

Done as the project uses Yarn.

* Restore old environment visualizer snapshots

* Bump follow-redirects from 1.15.2 to 1.15.4 (#2720)

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](follow-redirects/follow-redirects@v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Update field to generate new date

* Remove commented code

* Change student fields to array

* Separate names in Team Formation Table by comma

* Add Team related fields to GradingOverview

* Fix yarn run tsc

* Fix formatting issues

* Remove commented code

* Clean up some code

* Remove console.log statement
* Remove unused stylesheet import
* Remove more commented code

* Update Individual Assignment to have maxTeamSize of 1

* Remove commented code

* Correct API response for GradingOverviews

* Update failing snapshots

* Remove unused code

* Update snapshots post-merge conflict

* Use CSS modules for team formation

* Fix incorrect minimum team size

* Clean up `GroundControlEditTeamSizeCell`

* Update imports
* Update typings
* Remove commented code
* Remove unused type export
* Refactor to use `useCallback`
* Remove unnecessary divs, classes

* Remove unnecessary styles

The styles won't matter for a flex item, thus are removed.

* Remove unnecessary function

* Simplify variable name for readability

* Revert "Remove commented code"

This reverts commit 0cf1f60.

* Fix data flow for editing max team size

* Fix unnecessary API calls

* Reran yarn install post-merge

* Remove unnecessary stub types package

* Fix format post-merge

* Update snapshots post-merge

* Remove TODO comment

The default value of 1 is intentional.

* Make last modified date optional

* Revert "Make last modified date optional"

This reverts commit 6bebb24.

* Update snapshots post-merge

* Migrate new action creators to RTK

* Fix incorrect past merge conflict resolution

* Improve codebase consistency

* Update lockfile

* Update snapshots post-merge

* Format files post-merge

* Fix errors post-merge

* Restore comment

* Fix incorrect condition check

* Update lockfile post merge

* Migrate team actions to RTK

* Fix tests

* Fix compile error post-merge

* Fix lint

---------

Co-authored-by: Lu Yiting <[email protected]>
Co-authored-by: Richard Dominick <[email protected]>
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.

5 participants