-
Notifications
You must be signed in to change notification settings - Fork 26
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
refactor(middleware): remove aws-lambda handler #333
Conversation
1942460
to
c754a54
Compare
c754a54
to
cc6f3d7
Compare
I tried really hard to bypass the “Hard-coded credentials” only found she is smarter than me. |
cc6f3d7
to
783de0d
Compare
Those can be safely ignored. They are known false positives since in this case they are not valid access tokens and only used in documentation |
Let's split out the changes into a different PR, and focus on removing |
783de0d
to
7ddb30b
Compare
Great suggestion. This PR only removes the lambda handler. |
export { createNodeMiddleware } from "./middleware/node/index"; | ||
export { | ||
createCloudflareHandler, | ||
createWebWorkerHandler, | ||
} from "./middleware/web-worker/index"; | ||
export { createAWSLambdaAPIGatewayV2Handler } from "./middleware/aws-lambda/api-gateway-v2"; |
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.
If we are removing exposed methods, should we do an intermediate version deprecating these upcoming removals?
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.
I think this will be released as a major version bump.
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.
Yes, this will be released as a major due to the breaking changes. I was just wondering if we want to do an intermediate minor version warning about the upcoming deprecations to our users.
I guess is more a question to the core maintainers.
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.
I agree, that is our usual process. Ideally, a breaking change removes previously deprecated APIs.
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.
Also, it would be great if there was a dedicated npm package that would provide the createAWSLambdaAPIGatewayV2Handler
handler. We could release it as an @octokit/*
package, but I'd prefer if somone else who actually uses the handler would release it, and we could link to it from the readme and the deprecation message.
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.
I would resolve this conversation for the moment and, if a user comes by with the request we can open a Discussion.
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.
LGTM
4518aaa
to
ddd71dd
Compare
This PR fixes #332. Something to be mentioned:
onUnhandledRequest
option. Callers can still custom unhandled requests: use the express*
router (as covered by the test cases) or check if the response is a404
.fromentries
because we’re not supporting Node.js v10/12.node-middleware.test.ts
andweb-worker-handler.test.ts
are small now because the source files are small.I am not sure if someone relies on the
aws-lambda
middleware. I would like to help (just open an issue).