Skip to content

Commit c2aff1c

Browse files
committed
Updated packages and added new test-build CI
1 parent 798eaa0 commit c2aff1c

File tree

7 files changed

+1930
-1492
lines changed

7 files changed

+1930
-1492
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ name: GitHub Pages Deployment
55
on:
66
release:
77
types: [published]
8+
# Optional: Allow manual trigger
9+
workflow_dispatch:
810

911
jobs:
1012
build:
@@ -13,25 +15,39 @@ jobs:
1315

1416
steps:
1517
# https://github.com/actions/checkout
16-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1719

1820
# a standard step for GitHub actions on Node
1921
# https://github.com/actions/setup-node
20-
- uses: actions/setup-node@v3
22+
- uses: actions/setup-node@v4
2123
with:
22-
# update the Node version to meet your needs
23-
node-version: 18
24-
cache: npm
25-
cache-dependency-path: ./editor-app
26-
24+
node-version: 22
25+
cache: yarn
26+
cache-dependency-path: ./editor-app/yarn.lock
27+
28+
- name: Install dependencies
29+
working-directory: ./editor-app
30+
run: yarn install --frozen-lockfile
31+
32+
- name: Run security audit
33+
working-directory: ./editor-app
34+
run: yarn audit --level moderate
35+
continue-on-error: true # Don't fail deployment on audit issues
36+
2737
- name: Build
2838
working-directory: ./editor-app
2939
run: |
30-
npm i yarn
31-
yarn install
3240
yarn build
3341
touch out/.nojekyll
34-
42+
env:
43+
NODE_ENV: production
44+
45+
- name: Verify build output
46+
working-directory: ./editor-app
47+
run: |
48+
ls -la out/
49+
echo "Build completed successfully"
50+
3551
- name: Deploy
3652
# https://github.com/JamesIves/github-pages-deploy-action
3753
uses: JamesIves/github-pages-deploy-action@v4

.github/workflows/test-build.yaml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# .github/workflows/test-build.yml
2+
3+
name: Test Build
4+
5+
on:
6+
push:
7+
branches: [ main ]
8+
pull_request:
9+
branches: [ main ]
10+
11+
jobs:
12+
test-build:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
# https://github.com/actions/checkout
18+
- uses: actions/checkout@v4
19+
20+
# a standard step for GitHub actions on Node
21+
# https://github.com/actions/setup-node
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
cache: yarn
26+
cache-dependency-path: ./editor-app/yarn.lock
27+
28+
- name: Install dependencies
29+
working-directory: ./editor-app
30+
run: yarn install --frozen-lockfile
31+
32+
- name: Run linting
33+
working-directory: ./editor-app
34+
run: yarn lint
35+
continue-on-error: true
36+
37+
- name: Run security audit
38+
working-directory: ./editor-app
39+
run: yarn audit --level moderate
40+
continue-on-error: true # Don't fail deployment on audit issues
41+
42+
- name: Test build
43+
working-directory: ./editor-app
44+
run: |
45+
yarn build
46+
echo "✅ Build successful"
47+
48+
- name: Check build output
49+
working-directory: ./editor-app
50+
run: |
51+
if [ ! -d "out" ]; then
52+
echo "❌ Build output directory 'out' not found"
53+
exit 1
54+
fi
55+
56+
if [ ! -f "out/index.html" ]; then
57+
echo "❌ index.html not found in build output"
58+
exit 1
59+
fi
60+
61+
echo "✅ Build output verified"

editor-app/components/ActivityDiagram.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState, useEffect, MutableRefObject } from "react";
1+
import { useState, useEffect, MutableRefObject, JSX } from "react";
22
import Breadcrumb from "react-bootstrap/Breadcrumb";
33
import Row from "react-bootstrap/Row";
44
import Col from "react-bootstrap/Col";

editor-app/components/Util.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React from "react";
1+
import React, { JSX } from "react";
22
import Link from "next/link";
33
import { Button, Col, Row } from "react-bootstrap";
44

editor-app/package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,25 @@
1111
},
1212
"dependencies": {
1313
"@apollo-protocol/hqdm-lib": "^0.0.2",
14-
"@dnd-kit/core": "6.1.0",
15-
"@dnd-kit/sortable": "8.0.0",
14+
"@dnd-kit/core": "6.3.1",
15+
"@dnd-kit/sortable": "10.0.0",
1616
"@dnd-kit/utilities": "3.2.2",
1717
"@types/d3": "^7.4.3",
18-
"@types/node": "20.12.12",
19-
"@types/react": "18.3.3",
20-
"@types/react-dom": "18.3.0",
18+
"@types/node": "24.0.14",
19+
"@types/react": "19.1.8",
20+
"@types/react-dom": "19.1.6",
2121
"bootstrap": "^5.3.3",
2222
"d3": "^7.9.0",
23-
"eslint": "^8.0.0",
24-
"eslint-config-next": "14.2.3",
23+
"eslint": "^9.31.0",
24+
"eslint-config-next": "15.4.1",
2525
"lodash": "^4.17.21",
26-
"next": "14.2.15",
27-
"react": "18.3.1",
26+
"next": "15.4.1",
27+
"react": "19.1.0",
2828
"react-bootstrap": "^2.10.2",
29-
"react-dom": "18.3.1",
29+
"react-dom": "19.1.0",
3030
"react-modal-image": "^2.6.0",
3131
"react-select": "^5.8.0",
32-
"typescript": "5.4.5",
32+
"typescript": "5.8.3",
3333
"uuidv4": "^6.2.13"
3434
}
3535
}

editor-app/tsconfig.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"compilerOptions": {
33
"target": "es5",
4-
"lib": ["dom", "dom.iterable", "esnext"],
4+
"lib": ["dom", "dom.iterable", "es6"],
55
"allowJs": true,
66
"skipLibCheck": true,
77
"strict": true,
@@ -14,11 +14,16 @@
1414
"isolatedModules": true,
1515
"jsx": "preserve",
1616
"incremental": true,
17+
"plugins": [
18+
{
19+
"name": "next"
20+
}
21+
],
1722
"baseUrl": ".",
1823
"paths": {
1924
"@/*": ["./*"]
2025
}
2126
},
22-
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
27+
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
2328
"exclude": ["node_modules"]
2429
}

0 commit comments

Comments
 (0)