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

Upgrade dependencies to Dec 2024 #220

Merged
merged 1 commit into from
Dec 5, 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
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20']
node-version: ['22']
python-version: ['3.12']
env:
TM_NTT_CERT_ARN: ${{ secrets.TM_NTT_CERT_ARN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20']
node-version: ['20', '22']
python-version: ['3.12']
steps:
- name: Checkout repo
Expand All @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['20']
node-version: ['20', '22']
python-version: ['3.12']
steps:
- name: Checkout repo
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20
22
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Shows new MBTA Orange, Red, and Green Line trains as they come into service.

## Install & Run
Dependencies:
- `node 20.x` (with `npm 10.x`)
- `node 22.x` (with `npm 10.x`)
- `python 3.12`
- [`poetry`](https://python-poetry.org/)
- Ensure `poetry` is using the correct Python version by running `poetry env use <your python3.12 binary>`
Expand Down
2,317 changes: 1,225 additions & 1,092 deletions package-lock.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"lint-backend": "cd server && poetry run flake8",
"postinstall": "poetry install",
"start-prod": "npm run build && NODE_ENV=production npm run start-python",
"start-python": "cd server && poetry run chalice local --port=5000",
"start-python": "cd server && poetry run chalice local --port=5555",
"start": "concurrently npm:start-python npm:dev"
},
"repository": {
Expand All @@ -29,36 +29,36 @@
},
"homepage": "https://github.com/transitmatters/new-train-tracker#readme",
"dependencies": {
"@ariakit/react": "^0.4.11",
"@tanstack/react-query": "^5.56.2",
"@ariakit/react": "^0.4.15",
"@tanstack/react-query": "^5.62.2",
"bezier-js": "^2.5.1",
"classnames": "^2.5.1",
"dayjs": "^1.11.13",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-favicon": "2.0.7",
"react-loading-indicators": "^0.2.3",
"react-router-dom": "^6.26.2",
"react-loading-indicators": "^1.0.0",
"react-router-dom": "^7.0.2",
"react-spring": "^8.0.27",
"seamless-scroll-polyfill": "^2.3.4"
},
"devDependencies": {
"@types/node": "^20.14.2",
"@types/react": "^18.3.7",
"@types/react-dom": "^18.3.0",
"@typescript-eslint/eslint-plugin": "^7.12.0",
"@typescript-eslint/parser": "^7.12.0",
"@vitejs/plugin-react": "^4.3.1",
"@types/node": "^22.10.1",
"@types/react": "^18.3.13",
"@types/react-dom": "^18.3.1",
"@typescript-eslint/eslint-plugin": "^8.17.0",
"@typescript-eslint/parser": "^8.17.0",
"@vitejs/plugin-react": "^4.3.4",
"autoprefixer": "^10.4.20",
"concurrently": "^9.0.1",
"concurrently": "^9.1.0",
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.30.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.36.1",
"eslint-plugin-react-hooks": "^4.6.2",
"prettier": "^3.3.3",
"typescript": "^5.6.2",
"vite": "^5.2.12"
"eslint-plugin-react": "^7.37.2",
"eslint-plugin-react-hooks": "^5.0.0",
"prettier": "^3.4.2",
"typescript": "^5.7.2",
"vite": "^6.0.2"
}
}
1,321 changes: 709 additions & 612 deletions poetry.lock

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions public/static_data.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{
"Orange": {
"totalOldActive": 0,
"totalOldInactive": 22,
"totalNewDelivered": 116,
"totalNewUndelivered": 36
"totalOldInactive": 0,
"totalNewDelivered": 122,
"totalNewUndelivered": 28
},
"Red": {
"totalOldActive": 212,
"totalOldActive": 220,
"totalOldInactive": 4,
"totalNewDelivered": 16,
"totalNewUndelivered": 236
"totalNewDelivered": 24,
"totalNewUndelivered": 228
},
"Green": {
"totalOldActive": 165,
"totalOldInactive": 32,
"totalOldActive": 169,
"totalOldInactive": 38,
"totalNewDelivered": 24,
"totalNewUndelivered": 0
},
Expand All @@ -24,5 +24,5 @@
"Sources": {
"fleet_numbers": "http://roster.transithistory.org/"
},
"Updated": "2024-08-18"
"Updated": "2024-12-04"
}
10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ package-mode = false

[tool.poetry.dependencies]
python = "~3.12"
aiohttp = "3.10.5"
boto3 = "1.35.21"
aiohttp = "3.11.9"
boto3 = "1.35.75"
json-api-doc = "0.15.0"
pytz = "2024.2"
schedule = "1.2.2"
datadog_lambda = "6.98.0"
datadog_lambda = "6.104.0"


[tool.poetry.dev-dependencies]
pip = ">=24.0"
chalice = "1.31.2"
black = "^24.8.0"
pylint = "3.2.7"
black = "^24.10.0"
pylint = "3.3.2"
flake8 = "7.1.1"


Expand Down
6 changes: 3 additions & 3 deletions server/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

app = Chalice(app_name="new-train-tracker")

localhost = "localhost:3000"
localhost = "localhost:5173"
TM_CORS_HOST = os.environ.get("TM_CORS_HOST", localhost)

if TM_CORS_HOST != localhost:
if localhost not in TM_CORS_HOST:
app.register_middleware(ConvertToMiddleware(datadog_lambda_wrapper))
cors_config = CORSConfig(allow_origin=f"https://{TM_CORS_HOST}", max_age=3600)
else:
Expand Down Expand Up @@ -76,7 +76,7 @@ def get_port():
env_port = os.environ.get("PORT")
if env_port is not None:
return int(env_port)
return 5000
return 5555


def get_debug():
Expand Down
2 changes: 1 addition & 1 deletion src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const LOCAL = 'localhost';
const FRONTEND_TO_BACKEND_MAP = {
[PRODUCTION]: 'https://traintracker-api.labs.transitmatters.org',
[BETA]: 'https://ntt-api-beta.labs.transitmatters.org',
[LOCAL]: 'http://localhost:5000',
[LOCAL]: 'http://localhost:5555',
};

let domain = '';
Expand Down
Loading