Skip to content

[aws-lambda] Rutime node8.10 support.#24823

Merged
mhegazy merged 1 commit intoDefinitelyTyped:masterfrom
simonbuchan:aws-lambda-node-8
Apr 9, 2018
Merged

[aws-lambda] Rutime node8.10 support.#24823
mhegazy merged 1 commit intoDefinitelyTyped:masterfrom
simonbuchan:aws-lambda-node-8

Conversation

@simonbuchan
Copy link
Copy Markdown
Contributor

Bump version to 8.10 to match current runtime, allow returning result promises in handlers.

There is a tiny paragraph in the documentation describing this new feature, but it is much better described in the blog post announcing it

There is a type-breaking change that should be rare for most users, where previously valid async handlers returning void would be accepted (and their results ignored), I chose to keep this rather than, e.g. also allowing Promise<void> as experimentation shows if the async function returns before the callback is invoked the lambda runtime will return a null value, and it is all too easy to do so. Because of this I chose to (finally!) set the type package version to the runtime version - but I would be happy to back this out if others think it's a minor enough break that needing a package.json update is unnecessary.

Not sure if this should change to referencing/depending on node typings specifically at v8 as well - I think that would cause most users lots of type conflicts right now, but longer term it could catch people using node APIs their runtime doesn't have? If that's happening it should probably happen now so the breaking change can ride the major version bump.

Please fill in this template.

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: (see description above)
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

Bump version to 8.10 to match current runtime, allow returning result promises in handlers.
@typescript-bot typescript-bot added Awaiting reviewer feedback Author is Owner The author of this PR is a listed owner of the package. labels Apr 9, 2018
@typescript-bot
Copy link
Copy Markdown
Contributor

typescript-bot commented Apr 9, 2018

@simonbuchan Thank you for submitting this PR!

🔔 @skarum @tobyhede @buggy @y13i @wwwy3y3 @OrthoDex @MichaelMarner @daniel-cottone @kostya-misura @coderbyheart @palmithor @daniloraisi @Haydabase - please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot
Copy link
Copy Markdown
Contributor

A definition author has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@simonbuchan
Copy link
Copy Markdown
Contributor Author

If the maintainer has any opinion on if environment packages like this should have a versioned dependency on @types/node, let me know and I'll add it now since we're doing a major version upgrade.

@mhegazy mhegazy merged commit 7835016 into DefinitelyTyped:master Apr 9, 2018
@simonbuchan simonbuchan deleted the aws-lambda-node-8 branch April 10, 2018 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author is Owner The author of this PR is a listed owner of the package.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants