Skip to content
This repository was archived by the owner on Jun 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
14 changes: 14 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"test": "test"
},
"dependencies": {
"@netlify/serverless-functions-api": "^1.5.1",
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if we should lock the version, such that the entire API surface in one version of @netlify/functions is immutable? Probably not a huge deal since we're also the authors of the dependency and we can control the releases we make, but wondering if it's a good caution to put in place.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done in 423960c

"is-promise": "^4.0.0"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/function/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ export { Context as HandlerContext } from './context.js'
export { Event as HandlerEvent } from './event.js'
export { BuilderHandler, Handler, BackgroundHandler, HandlerCallback, StreamingHandler } from './handler.js'
export { BuilderResponse, Response as HandlerResponse, StreamingResponse } from './response.js'
export * from './v2.js'
Copy link
Contributor

Choose a reason for hiding this comment

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

Any reason this isn't a named export?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No particular reason, no. I put the named exports inside of v2.js, but I can also move that up if you think that's better.

Copy link
Contributor

Choose a reason for hiding this comment

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

Fine to re-export, but I think it's better to do an explicit named export in both cases if you do (and make it export type ...)

1 change: 1 addition & 0 deletions src/function/v2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export type { Context } from '@netlify/serverless-functions-api'