Skip to content

feat: add support for express v5 #4581

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
wants to merge 29 commits into
base: main
Choose a base branch
from
Open

feat: add support for express v5 #4581

wants to merge 29 commits into from

Conversation

david-luna
Copy link
Member

@david-luna david-luna commented Apr 24, 2025

Checklist

  • Implement code
  • Update tests
  • Update documentation
  • Add release notes to docs/release-notes/index.md
  • Commit message follows commit guidelines

trentm
trentm previously approved these changes Apr 24, 2025
Copy link
Member

@trentm trentm left a comment

Choose a reason for hiding this comment

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

LGTM, after the cloud-metadata-fetcher test change we discussed (to skip that using _is_express_incompat.js.

@david-luna
Copy link
Member Author

LGTM, after the cloud-metadata-fetcher test change we discussed (to skip that using _is_express_incompat.js.

I set myself a challenge to try to replace express in that test. The result is in c16773e

Let me know what you think. It's okay for me to just skip

@david-luna david-luna requested a review from trentm April 25, 2025 10:02
Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

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

/test tav express

@david-luna
Copy link
Member Author

@trentm there are other tests that depend on express in order to provide a mock server. Some examples

const express = require('express');

const express = require('express');

const express = require('express');

it is also used in lambda. I wouldn't hesitate to disable 1 or 2 but there are a few more. Also they affect other technologies and features like lambda.

trentm
trentm previously approved these changes Apr 25, 2025
Copy link
Member

@trentm trentm left a comment

Choose a reason for hiding this comment

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

LGTM, with some nits.

@@ -6,6 +6,12 @@

'use strict';

const isExpressIncompat = require('../_is_express_incompat')();
Copy link
Member Author

Choose a reason for hiding this comment

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

note for reviewer: looking at https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html I thought it is okay to skip tests for lambda.

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

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

/test tav

@david-luna
Copy link
Member Author

david-luna commented Apr 29, 2025

There are a couple of errors but seem unrelated:

  • elasticsearch tav is failing due to a version mismatch between service and client
  • pg tav seems to have ESM issues
  • apollo-express tav seesm to test on a version of apollo server where ApolloServer.start method is not there. Actually we're testing different versions than main (that's the issue here)

Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

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

/test tav apollo-server-express

@david-luna
Copy link
Member Author

@david-luna david-luna requested a review from trentm April 29, 2025 16:02
Copy link
Member Author

@david-luna david-luna left a comment

Choose a reason for hiding this comment

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

/test tav

var semver = require('semver');
var once = require('once');
var pgVersion = require('pg/package.json').version;
var pgVersion = safeGetPackageVersion('pg');
Copy link
Member Author

Choose a reason for hiding this comment

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

note to reviewer: i think this is related to the fact [email protected] added support for ESM imports. ref: https://github.com/brianc/node-postgres/blob/master/CHANGELOG.md#pg8150

Copy link
Member

Choose a reason for hiding this comment

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

trentm
trentm previously approved these changes Apr 30, 2025
Copy link
Member

@trentm trentm left a comment

Choose a reason for hiding this comment

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

Some nits. Mainly the docs/release-notes/index.md thing should get corrected.

Co-authored-by: Trent Mick <[email protected]>
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.

2 participants