Skip to content

Commit 8f0905e

Browse files
wolfy1339Uzlopak
andauthored
fix: update deps (#163)
* fix: update deps * refactor: migrate to Primer react components * build: get it functioning * fix: update css classes and variables * refactor: update to use newer css classes * ci: update versions * fix: update Dockerfile to use Node 20 BREAKING CHANGE: Drop versions before Node 18 * build: replace raven with sentry * Don't use primer react components for now * fix EventIcon * switch to esbuild-loader * remove glob-all * more changes * remove noJsx * fix docker image * remove testing from ci * set host to 0.0.0.0 * Add type to webpack config * fix webpack error * update * add sideEffects: false * no need to test all these versions --------- Co-authored-by: Aras Abbasi <aras.abbasi@googlemail.com>
1 parent ade1bab commit 8f0905e

22 files changed

Lines changed: 9988 additions & 19815 deletions

.babelrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,9 @@ jobs:
2626
cache: npm
2727
- run: npm ci
2828
- run: npm run build
29-
- run: npm test
30-
- name: codecov
31-
run: npx codecov
32-
env:
33-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3429

3530
docker:
3631
runs-on: ubuntu-latest
3732
steps:
38-
- uses: actions/checkout@v2
33+
- uses: actions/checkout@v4
3934
- run: docker build . -t smee.io

.github/workflows/release.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,25 +19,25 @@ jobs:
1919

2020
steps:
2121
- name: Check out the repo
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323

2424
- run: echo ${{ github.actor }}
2525

2626
- name: Log in to the Container registry
27-
uses: docker/login-action@v1
27+
uses: docker/login-action@v3
2828
with:
2929
registry: ${{ env.REGISTRY }}
3030
username: ${{ github.actor }}
3131
password: ${{ secrets.GITHUB_TOKEN }}
3232

3333
- name: Extract metadata
3434
id: meta
35-
uses: docker/metadata-action@v3
35+
uses: docker/metadata-action@v5
3636
with:
3737
images: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}
3838

3939
- name: Build and push Docker image
40-
uses: docker/build-push-action@v2
40+
uses: docker/build-push-action@v6
4141
with:
4242
context: .
4343
push: true

.github/workflows/tag.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
runs-on: ubuntu-latest
2323
if: github.event.pull_request.merged == true
2424
steps:
25-
- uses: actions/checkout@v2
25+
- uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 0
2828

Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
# A temporary image that installs dependencies and
22
# builds the production-ready front-end bundles.
33

4-
FROM node:14.21.3-alpine as bundles
4+
FROM node:20-alpine AS bundles
55
WORKDIR /usr/src/smee.io
66
COPY package*.json ./
77
COPY webpack.config.js ./
8-
COPY .babelrc ./
98
COPY src ./src
109
RUN ls
1110
# Install the project's dependencies and build the bundles
1211
RUN npm ci && npm run build && env NODE_ENV=production npm prune
1312

1413
# --------------------------------------------------------------------------------
1514

16-
FROM node:22.18.0-alpine
15+
FROM node:20-alpine
1716
LABEL description="Smee.io"
1817

1918
# Let's make our home
@@ -31,7 +30,7 @@ COPY --chown=node:node --from=bundles /usr/src/smee.io/node_modules /usr/src/sme
3130
COPY --chown=node:node --from=bundles /usr/src/smee.io/public /usr/src/smee.io/public
3231

3332
# We should always be running in production mode
34-
ENV NODE_ENV production
33+
ENV NODE_ENV=production
3534

3635
# Copy various scripts and files
3736
COPY --chown=node:node public ./public

eslint.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
const globals = require('globals')
2+
3+
module.exports = require('neostandard')({
4+
globals: { ...globals.jest },
5+
ignores: [
6+
'node_modules',
7+
'public',
8+
]
9+
})

lib/server.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
'use strict'
22

3-
let Sentry;
3+
let Sentry
44

55
if (process.env.SENTRY_DSN) {
6-
Sentry = require("@sentry/node");
6+
Sentry = require('@sentry/node')
77
// Ensure to call this before requiring any other modules!
88
Sentry.init({
99
dsn: process.env.SENTRY_DSN,
1010
// Adds request headers and IP for users, for more info visit:
1111
// https://docs.sentry.io/platforms/javascript/guides/node/configuration/options/#sendDefaultPii
1212
sendDefaultPii: true,
13-
});
13+
})
1414
}
1515

1616
const crypto = require('crypto')
@@ -38,7 +38,7 @@ const files = [
3838
const fastify = Fastify({ logger: true })
3939

4040
if (Sentry) {
41-
Sentry.setupFastifyErrorHandler(fastify);
41+
Sentry.setupFastifyErrorHandler(fastify)
4242
}
4343

4444
await fastify.register(fastifySwagger)
@@ -264,9 +264,8 @@ const files = [
264264
return reply.status(200)
265265
})
266266

267-
268267
const port = parseInt(process.env.PORT, 10) || 3000
269-
fastify.listen({ port }, (err, address) => {
268+
fastify.listen({ port, host: '0.0.0.0' }, (err, address) => {
270269
if (err) {
271270
console.error(err)
272271
process.exit(1)

0 commit comments

Comments
 (0)