Skip to content
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

Update deps #3232

Merged
merged 2 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 50 additions & 51 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
name: Build Project
on:
push:
branches:
- master
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Pull Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
node-version: '16'
- name: Run Script
shell: bash
run: |
set -x

npm ci # install packages

NODE_OUTPUT=`node scripts/aggregate-json.mjs 2>&1`

if [[ ! $NODE_OUTPUT ]];then
exit 0
fi

NODE_OUTPUT="<pre>${NODE_OUTPUT//$'\n'/<br />}</pre>"
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')

if [[ ! $PR_NUMBER ]]; then
exit 0
fi

jq -n --arg body "$(echo $NODE_OUTPUT)" '{ body: $body }' |\
curl -sL -X POST -d @- \
-H "Content-Type: application/json" \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://github.com/gitapi/repos/${{ github.repository }}/commits/$GITHUB_SHA/comments"

- name: Build Project
run: |
CI=false npm run build


- name: Publish
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build
CLEAN: true
build:
runs-on: ubuntu-latest
steps:
- name: Pull Repo
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
node-version: '20'
- name: Run Script
shell: bash
run: |
set -x

npm ci # install packages

NODE_OUTPUT=`node scripts/aggregate-json.mjs 2>&1`

if [[ ! $NODE_OUTPUT ]];then
exit 0
fi

NODE_OUTPUT="<pre>${NODE_OUTPUT//$'\n'/<br />}</pre>"
PR_NUMBER=$(echo $GITHUB_REF | awk 'BEGIN { FS = "/" } ; { print $3 }')

if [[ ! $PR_NUMBER ]]; then
exit 0
fi

jq -n --arg body "$(echo $NODE_OUTPUT)" '{ body: $body }' |\
curl -sL -X POST -d @- \
-H "Content-Type: application/json" \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
"https://github.com/gitapi/repos/${{ github.repository }}/commits/$GITHUB_SHA/comments"

- name: Build Project
run: |
CI=false npm run build

- name: Publish
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: build
CLEAN: true
60 changes: 30 additions & 30 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: Test

on:
pull_request:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16, 18]
steps:
- name: Check out source code
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Use cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- name: Check out source code
uses: actions/checkout@v2

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Use cache
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.17.1
v20.15.0
74 changes: 28 additions & 46 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
"react-scripts": "^5.0.1",
"react-search-input": "^0.11.3",
"tachyons": "^4.12.0",
"uuid": "^9.0.1",
"webfontloader": "^1.6.28"
},
"husky": {
Expand Down Expand Up @@ -44,19 +43,19 @@
"@fullhuman/postcss-purgecss": "^6.0.0",
"@types/jest": "^29.5.12",
"@types/leaflet": "^1.9.12",
"@types/node": "^20.13.0",
"@types/node": "^20.14.7",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react-lazyload": "^3.2.3",
"@types/webfontloader": "^1.6.38",
"gh-pages": "^6.1.1",
"husky": "^9.0.11",
"jsonlint": "^1.6.3",
"lint-staged": "^15.2.5",
"lint-staged": "^15.2.7",
"node-fetch": "^3.3.2",
"npm-run-all": "^4.1.5",
"prettier": "^3.3.0",
"sass": "^1.77.4",
"prettier": "^3.3.2",
"sass": "^1.77.6",
"typescript": "^4.9.5"
},
"browserslist": [
Expand All @@ -66,6 +65,6 @@
"not op_mini all"
],
"volta": {
"node": "18.17.1"
"node": "20.15.0"
}
}
Loading
Loading