From fb09be171ed8cca0b64f0ba5a9ae3640f3ef26c1 Mon Sep 17 00:00:00 2001
From: Christopher Goh
Date: Thu, 6 Oct 2022 23:55:35 +0800
Subject: [PATCH 1/3] Update MPE for AY22/23 S2
---
website/src/featureFlags.ts | 2 +-
website/src/views/mpe/MpeContainer.tsx | 2 +-
website/src/views/mpe/constants.ts | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/website/src/featureFlags.ts b/website/src/featureFlags.ts
index 6c1a66a9ee..a443e7f822 100644
--- a/website/src/featureFlags.ts
+++ b/website/src/featureFlags.ts
@@ -8,4 +8,4 @@
export const enableShortUrl = false;
/** Enable Module Planning Exercise */
-export const enableMpe = false;
+export const enableMpe = true;
diff --git a/website/src/views/mpe/MpeContainer.tsx b/website/src/views/mpe/MpeContainer.tsx
index 61a83d1bfd..11eeab4dd3 100644
--- a/website/src/views/mpe/MpeContainer.tsx
+++ b/website/src/views/mpe/MpeContainer.tsx
@@ -80,7 +80,7 @@ const MpeContainer: React.FC = () => {
and there is no guarantee that you will be allocated the selected modules during the
ModReg Exercise.
- The MPE for this round will be from 7 Mar to 11 Mar 2022.
+ The MPE for this round will be from 10 Oct to 14 Oct 2022.
Participation in the MPE will be used as one of the tie-breakers during
the ModReg Exercise, in cases where the demand exceeds the available quota and students
diff --git a/website/src/views/mpe/constants.ts b/website/src/views/mpe/constants.ts
index 44173984d7..8805933c7a 100644
--- a/website/src/views/mpe/constants.ts
+++ b/website/src/views/mpe/constants.ts
@@ -1,3 +1,3 @@
export const MAX_MODULES = 7;
-export const MPE_SEMESTER: 1 | 2 = 1;
+export const MPE_SEMESTER: 1 | 2 = 2;
export const MPE_AY = '2022/2023';
From 1e06e84d578504f2c3288fec7497e8944546b4e0 Mon Sep 17 00:00:00 2001
From: Christopher Goh
Date: Fri, 7 Oct 2022 01:12:36 +0800
Subject: [PATCH 2/3] Migrate to Node 16 LTS
---
.nvmrc | 2 +-
CONTRIBUTING.md | 2 +-
website/Dockerfile.dev | 2 +-
website/Dockerfile.prod | 2 +-
website/README.md | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/.nvmrc b/.nvmrc
index e1fcd1ea2f..53d838af21 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-lts/erbium
+lts/gallium
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index eecd00e0bf..4cfcbe2f19 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -35,7 +35,7 @@ Tip: Pick an area you're interested in, and just focus on it. It is not necessar
## Development Tools
-You should have [Node.js](https://nodejs.org/) version 12 or above (use Node 12 LTS or `lts/erbium` if possible) and [Yarn](https://yarnpkg.com/en/) version 1.2.0 or above. We recommend using [nvm](https://github.com/creationix/nvm) to manage your Node versions.
+You should have [Node.js](https://nodejs.org/) version 16 or above (use Node 16 LTS or `lts/gallium` if possible) and [Yarn](https://yarnpkg.com/en/) version 1.2.0 or above. We recommend using [fnm](https://github.com/Schniz/fnm) to manage your Node versions.
## Proposing a Change
diff --git a/website/Dockerfile.dev b/website/Dockerfile.dev
index 08ef2d9976..bd9ee45831 100644
--- a/website/Dockerfile.dev
+++ b/website/Dockerfile.dev
@@ -1,4 +1,4 @@
-FROM node:12-alpine
+FROM node:16-alpine
RUN apk update && \
apk add --no-cache git python build-base && \
diff --git a/website/Dockerfile.prod b/website/Dockerfile.prod
index d01cc2976e..423309df92 100644
--- a/website/Dockerfile.prod
+++ b/website/Dockerfile.prod
@@ -1,4 +1,4 @@
-FROM node:12-alpine
+FROM node:16-alpine
RUN apk update && \
apk add --no-cache git python build-base && \
diff --git a/website/README.md b/website/README.md
index c7278350ec..17086689a3 100644
--- a/website/README.md
+++ b/website/README.md
@@ -18,7 +18,7 @@ Don't know where to start? First, read our repository [contribution guide](../CO
## Getting Started
-Install [Node 12 LTS](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/en/docs/install) then run the following command:
+Install [Node 16 LTS](https://nodejs.org/en/) and [Yarn](https://yarnpkg.com/en/docs/install) then run the following command:
```sh
$ yarn
From 0069318889ab493a55685c07ce39475fb94097b2 Mon Sep 17 00:00:00 2001
From: Christopher Goh
Date: Fri, 7 Oct 2022 01:46:48 +0800
Subject: [PATCH 3/3] Fix Node 15 promise rejection failing tests
---
website/src/views/mpe/UpdateSubmissionQueue.test.ts | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/website/src/views/mpe/UpdateSubmissionQueue.test.ts b/website/src/views/mpe/UpdateSubmissionQueue.test.ts
index 9d84bde0f5..08f3ac585a 100644
--- a/website/src/views/mpe/UpdateSubmissionQueue.test.ts
+++ b/website/src/views/mpe/UpdateSubmissionQueue.test.ts
@@ -42,9 +42,15 @@ describe(UpdateSubmissionQueue, () => {
const queue = new UpdateSubmissionQueue(update);
- queue.update(emptySubmission);
- queue.update(submission);
- queue.update(emptySubmission);
+ queue.update(emptySubmission).catch(() => {
+ /* ignore */
+ });
+ queue.update(submission).catch(() => {
+ /* ignore */
+ });
+ queue.update(emptySubmission).catch(() => {
+ /* ignore */
+ });
await expect(
queue.update({ ...submission, preferences: [preference, preference] }),
).rejects.toThrow('2');