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 to express 5 #4664

Merged
merged 2 commits into from
Nov 21, 2024
Merged

Upgrade to express 5 #4664

merged 2 commits into from
Nov 21, 2024

Conversation

drewbo
Copy link
Contributor

@drewbo drewbo commented Nov 15, 2024

Changes proposed in this pull request:

  • Upgrade to express 5
  • Switches the local port for UAA to 9001

security considerations

Upgrading express should provide security upgrades by avoiding relying on outdated dependencies

@drewbo
Copy link
Contributor Author

drewbo commented Nov 15, 2024

I used the checklist in #4611 (generated from the migration guide) to ensure we hit all the necessary items. A summary of the changes:

  • Updated optional path parameter syntax
  • Updated wildcard path syntax (requires naming)
  • Removed extended: false from urlencoded since it's now the default

The new promise rejections should only be helpful, we might have a few unnecessary try/catch blocks out there but I didn't want to investigate each use.

@drewbo drewbo requested a review from a team November 15, 2024 18:14
@cloud-gov-pages-operations
Copy link
Contributor

cloud-gov-pages-operations commented Nov 15, 2024

🤖 This is an automated code coverage report

Total coverage (lines): 14.56%
Coverage diff: 0% 📈

@drewbo drewbo force-pushed the chore-express-5 branch 4 times, most recently from eb1f13c to 58feead Compare November 20, 2024 15:30
@@ -4,6 +4,6 @@ const MainController = require('../controllers/main');
const { csrfProtection } = require('../middlewares');

// add csrf middleware to app route so that we can use request.csrfToken()
router.get('/report(/*)?', csrfProtection, MainController.report);
router.get('/report{*splat}', csrfProtection, MainController.report);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be {/*splat} with the forward slash like the routes/main.js changes?

@drewbo drewbo merged commit 1a869d6 into main Nov 21, 2024
8 checks passed
@drewbo drewbo deleted the chore-express-5 branch November 21, 2024 16:16
@drewbo drewbo mentioned this pull request Nov 21, 2024
26 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants