-
Notifications
You must be signed in to change notification settings - Fork 0
Audit, upgrade and stabilize dependencies: Node 22, Express 5, Apollo Server 4, Prisma 7 #2
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
Open
lukesmmr
wants to merge
13
commits into
mac-os-readme-fixes
Choose a base branch
from
audit-package-update
base: mac-os-readme-fixes
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a49c349
Upgrade Node.js 20 -> 22 LTS
lukesmmr 7e5814d
Fix all 9 npm audit vulnerabilities
lukesmmr fc885d8
Update all minor/patch dependencies to latest
lukesmmr 78ed5e9
Bump low-risk major versions: husky 9, dotenv 17, cross-env 10
lukesmmr 450f0d7
Bump medium-risk major versions: prisma 7, uuid 13, joi 18
lukesmmr 9eb6336
Remove deprecated xss-clean package
lukesmmr 30f9fab
Fix Prisma 7 migration, protobuf ESM/CJS interop, and Express 5 types
lukesmmr 2238957
Apply prettier formatting to README and jest config
lukesmmr af13934
Upgrade Express 4 to 5 and express-rate-limit 7 to 8, remove body-parser
lukesmmr 5d24d8b
Migrate apollo-server-express v3 to @apollo/server v4
lukesmmr 9acfb0d
Clean up unused isGraphQLNotFoundError and apply formatting
lukesmmr 57ef9f7
Stabilize Docker dev environment and clean up dead config
lukesmmr b3afd93
Apply Prettier formatting to README table and docker-compose healthcheck
lukesmmr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| # -------------------------------------------------- | ||
| # Disasters API — Environment Variables | ||
| # -------------------------------------------------- | ||
| # Copy this file to .env and adjust values as needed. | ||
| # cp .env.example .env | ||
| # | ||
| # When running via Docker Compose these are set in | ||
| # docker-compose.yml and this file is not required. | ||
| # -------------------------------------------------- | ||
|
|
||
| # Database connection (required) | ||
| POSTGRES_URI=postgresql://disasters:disasters_pass@localhost:5432/disasters_test | ||
|
|
||
| # Server | ||
| NODE_ENV=development | ||
| PORT=3000 | ||
|
|
||
| # CORS (comma-separated origins, or * for all) | ||
| CORS_ORIGIN=* | ||
|
|
||
| # Optional | ||
| # LOG_LEVEL=info | ||
| # RATE_LIMIT_IP_WHITELIST=127.0.0.1 | ||
| # RATE_LIMIT_IP_BLACKLIST= |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,2 @@ | ||
| #!/usr/bin/env sh | ||
| . "$(dirname -- "$0")/_/husky.sh" | ||
|
|
||
| npm run lint -- --fix | ||
| npm run format |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 22 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: goodthingsdev/disasters-api
Length of output: 92
🌐 Web query:
npm ci --only=production deprecated npm 10.x modern alternative --omit=dev💡 Result:
npm ci --only=productionis deprecated in npm 10+ because theonly=production/production=trueconfig flags are deprecated in favor of the newer omit/include mechanism. The modern equivalent is:This omits
devDependenciesfrom what’s installed on disk (and is also what npm defaults to whenNODE_ENV=production). [1] [2]Related:
--productionflag is also deprecated → use--omit=dev. [1]NODE_ENV=production), use:--also=dev, which is deprecated.) [1] [3]Sources
only/productiondeprecated; use--omit=dev, andonly=productionis an alias for--omit=dev) [1]npm ci:omitoption and default behavior) [2]--alsodeprecation and--include=devusage (npm 10.x) [3]🏁 Script executed:
Repository: goodthingsdev/disasters-api
Length of output: 732
Build stage installs only production dependencies but then runs
npm run build.npm ci --only=productionskips devDependencies such as TypeScript, build tools, and type definitions. The subsequentnpm run buildon line 9 will fail because the compiler isn't installed. Install all dependencies in the build stage and restrict to production-only in the production stage.Additionally,
--only=productionis deprecated in npm 10.x (shipped with Node 22). Update to--omit=dev.🐛 Proposed fixes
Line 7 (build stage):
Line 18 (production stage):
🤖 Prompt for AI Agents