Skip to content

Commit b616d7f

Browse files
Merge pull request #55 from brentvollebregt/migrate-to-node-22
Migrate to Node 22
2 parents 499cee9 + 663463e commit b616d7f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+4998
-76215
lines changed

.github/workflows/deploy-client.yml

+9-15
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,28 @@ jobs:
1010
build-deploy:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414

1515
- name: Setup Node
16-
uses: actions/setup-node@v3
16+
uses: actions/setup-node@v4
1717
with:
18-
node-version: "14.x"
19-
20-
- name: Install npm 7
21-
run: npm install -g npm@7
18+
node-version: "22.x"
2219

2320
- name: Install dependencies
24-
run: npm install --legacy-peer-deps
21+
run: npm ci
2522

2623
- name: Build project
2724
run: npm run build
2825
env:
29-
SKIP_PREFLIGHT_CHECK: true
30-
REACT_APP_API_ROOT: https://monopoly-money.fly.dev
31-
REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID: G-3SFPXD2CWJ
32-
REACT_APP_API_UNREACHABLE_ERROR_MESSAGE: "Unable to communicate with server.\nSince this is publicly hosted, we may have run out of minutes on the server.\nThis should be running again next month when the time is reset."
33-
CI: false
34-
GENERATE_SOURCEMAP: false
26+
VITE_API_ROOT: https://monopoly-money.fly.dev
27+
VITE_GOOGLE_ANALYTICS_TRACKING_ID: G-3SFPXD2CWJ
28+
VITE_API_UNREACHABLE_ERROR_MESSAGE: "Unable to communicate with server.\nSince this is publicly hosted, we may have run out of minutes on the server.\nThis should be running again next month when the time is reset."
3529

3630
- name: Deploy
37-
uses: peaceiris/actions-gh-pages@v3
31+
uses: peaceiris/actions-gh-pages@v4
3832
with:
3933
github_token: ${{ secrets.GITHUB_TOKEN }}
4034
publish_dir: ./packages/client/build
41-
PUBLISH_BRANCH: gh-pages
35+
publish_branch: gh-pages
4236
cname: monopoly-money.nitratine.net
4337
force_orphan: true # Only keep latest commit in gh-pages (to keep repo size down)

.github/workflows/deploy-server.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ jobs:
1313
build-deploy:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v3
16+
- uses: actions/checkout@v4
1717
- uses: superfly/flyctl-actions/setup-flyctl@master
1818
- run: flyctl deploy --remote-only

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
**/build
33
**/.env
44
.eslintcache
5-
sitemap.xml
5+
sitemap.xml
6+
**/*.tsbuildinfo

Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM debian:bullseye as builder
22

3-
ARG NODE_VERSION=16.13.1
3+
ARG NODE_VERSION=22.9.0
44

55
RUN apt-get update; apt install -y curl
66
RUN curl https://get.volta.sh | bash
@@ -20,7 +20,7 @@ COPY . .
2020
# https://stackoverflow.com/a/72323758
2121
RUN chown -R root:root .
2222

23-
RUN npm install && npm run build
23+
RUN npm ci && npm run build
2424
FROM debian:bullseye
2525

2626
LABEL fly_launch_runtime="nodejs"

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@
2020
2121
The environment variables that can be used are (can also be found in .env.example files):
2222

23-
- `REACT_APP_API_ROOT` (optional): The route that the client requests. Not setting this will default to `window.location.origin`.
23+
- `VITE_API_ROOT` (optional): The route that the client requests. Not setting this will default to `window.location.origin`.
2424
- `SERVER_ALLOWED_ORIGINS` (optional): The origins that are served by the server. Not setting this is the equivalent of setting CORS to \*.
2525

2626
### 🧪 Development Setup
2727

28-
When running the client in development mode using `npm run client:dev`, the client will use the `REACT_APP_API_ROOT` environment variable value to decide where to send requests. If this is not provided, the current hosted URL will be used.
28+
When running the client in development mode using `npm run client:dev`, the client will use the `VITE_API_ROOT` environment variable value to decide where to send requests. If this is not provided, the current hosted URL will be used.
2929

30-
`npm run server:dev` can also be used for development of the server; this allows for hot-reloading. Running the client using `npm run client:dev` and setting `REACT_APP_API_ROOT` to where the server is running will allow for a development setup with hot-reloading.
30+
`npm run server:dev` can also be used for development of the server; this allows for hot-reloading. Running the client using `npm run client:dev` and setting `VITE_API_ROOT` to where the server is running will allow for a development setup with hot-reloading.
3131

3232
> `launch.json` also offers the ability to connect and debug the the server when running `npm run client:dev`.
3333

fly.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ kill_timeout = "5s"
1313

1414
[env]
1515
PORT = "8080"
16-
REACT_APP_API_ROOT = "https://monopoly-money.fly.dev"
17-
REACT_APP_API_UNREACHABLE_ERROR_MESSAGE = "Unable to communicate with server.\nSince this is publicly hosted, we may have run out of minutes on the server.\nThis should be running again next month when the time is reset."
18-
REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID = "G-3SFPXD2CWJ"
16+
VITE_API_ROOT = "https://monopoly-money.fly.dev"
17+
VITE_API_UNREACHABLE_ERROR_MESSAGE = "Unable to communicate with server.\nSince this is publicly hosted, we may have run out of minutes on the server.\nThis should be running again next month when the time is reset."
18+
VITE_GOOGLE_ANALYTICS_TRACKING_ID = "G-3SFPXD2CWJ"
1919
SERVER_ALLOWED_ORIGINS = "https://monopoly-money.nitratine.net,https://monopoly-money.fly.dev"
2020

2121
[[services]]

0 commit comments

Comments
 (0)