-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
Version 2 #585
Comments
Can we rename the generics in the core declarations file? https://github.com/willfarrell/middy/blob/c5464931349a81bad412c52588a1245acb88b39e/packages/core/index.d.ts#L28 Instead of T, R, C we can go to something more descriptive like TEvent, TContext, TCallback? Would this break backwards compatibility with anything? (I don't think it would) |
v2 is going to be a breaking change. I think this is a great opportunity to make the names more descriptive. |
After some reflection and discussion with others, I've decided to roll back to using |
The profiler has been removed as a requirement for v2 alpha. Opening up for discussion on the best approach #599 |
Hey :), do you know when the first v2 alpha will be released? |
Thanks for the question @prisis. It's mostly there right now. @lmammino and I are have a discussion scheduled to resolve some of the outstanding issues, and potentially breaking changes to the current branch. I may release the first alpha without TS support (the biggest missing piece), just to get it out there and start IRL testing. I'll have a better idea next week, but could be as early as the end of the month. I will post here when a published alpha is ready for other the download and test. |
After some reflection and discussion with @lmammino. ESM support will be remove from this version. This will decrease the barrier to upgrade and reduce the complexity of packaging. We will consider adding this back in based on community feedback and broader adoption around esm. |
Did you try developit/microbundle for bundling all the packages? |
I'm not familiar with this one specifically. But am with others. This approach makes more sense when you expect the package to be included in the browser and you want every flavour or packaging to fix your needs. On nodejs, providing multiple can over complicate the documentation and over all developer experience. By only supporting commonjs both This also keeps maintenance cost low. |
Hi, I'm just discovering this project (which seems awesome). Do you plan to write some documentation for beginners? Something like 'how to run your lambda on your local machine?' or 'how to write a simple test with middy?' Cheers |
@ghostd We're always looking to improve out documentation for those just getting started. However we can't document everything. Keeping the focused on Middy ensures we're not wasting valuable resources where others are already covering well.
|
@ghostd create a const path = require("path")
const express = require("express")
const lambdaLocal = require("lambda-local")
const cors = require("cors")
const app = express()
app.use(express.text())
app.use(cors())
app.use("/{your url}", async (req, res) => {
const result = await lambdaLocal.execute({
lambdaPath: path.join(__dirname, "dist", "index.js"),
lambdaHandler: "handler",
envfile: path.join(__dirname, ".env"),
event: {
headers: req.headers, // Pass on request headers
body: req.body, // Pass on request body
queryStringParameters: req.query,
},
timeoutMs: 5000,
})
// Respond to HTTP request
res.status(result.statusCode).set(result.headers).end(result.body)
})
app.listen(3000, () => console.log("listening on port: 3000")) |
@prisis Nice snippet, thanks! |
Alpha has been released. Now on npm. |
@willfarrell Good stuff! Anywhere we could gather some release notes on what was added/changed apart from the checklist on this issue? |
You bet. See /docs/CHAGNELOG.md for high level & /docs/UPGRADE.md for the granular details on |
TypeScript definitions will be merged soon. Expect a beta release in the coming days! |
Would you consider V2 production ready? |
Yes, myself and others been using it in production since the first alpha release in January. We're planning when the stable release will happen soon, we hope to lock down a date next week. |
See /docs/CHAGNELOG.md & /docs/UPGRADE.md on
release/2.x
for what has changed.TODO / Ideas
context
manipulationIf anyone has comments, suggestions, or must-have features. Please post them here.
Documentation
internal
Missing / Blocked
util
stay in core or move to own package?main
branchTesting
Dependencies
aws-sdk/clients/rds
missingpromise()
pattern Support.promise()
pattern for RDS.Signer.getAuthToken aws/aws-sdk-js#3595ajv
ajv
: optimize initialization Reduce code size by optionally refactoring errors into a function ajv-validator/ajv#1098ajv-errors
withi18n
support Question: Multi-Language Custom Errors ajv-validator/ajv-errors#81json-schema-traverse
: Only publish required files epoberezkin/json-schema-traverse#34 Add files field to reduce package size #6 epoberezkin/json-schema-traverse#8busyboy
dicer
: Only publish required files mscdex/dicer#21http-errors
setprototypeof
: Only publish required files wesleytodd/setprototypeof#17json-mask
: Only publish required files nemtsov/json-mask#125qs
: Only publish required files ljharb/qs#389Observations
The text was updated successfully, but these errors were encountered: