vercel / micro

Asynchronous HTTP microservices
MIT License
10.59k stars 458 forks source link

Add ESLint and TypeScript #458

Closed pmbanugo closed 2 years ago

pmbanugo commented 2 years ago

Closes https://github.com/vercel/micro/issues/457

This PR adds TypeScript and rewrites the library code using TypeScript.

Highlight:

leerob commented 2 years ago

Amazing! Will dive into this and take a look.

pmbanugo commented 2 years ago

Hi @leerob It's ready for review.

leerob commented 2 years ago

I think we'll need to add a test script for CI.

CleanShot 2022-07-24 at 13 51 35@2x
pmbanugo commented 2 years ago

I think we'll need to add a test script for CI.

CleanShot 2022-07-24 at 13 51 35@2x

@leerob I've updated the script, it should work now.

pmbanugo commented 2 years ago

That should work but it's failing 😓 I'm not sure why, but I'll check again.

pmbanugo commented 2 years ago

@leerob Updated... If it doesn't work this time, perhaps you can try clearing the cache and rerunning the build.

leerob commented 2 years ago

It works! 🎉

pmbanugo commented 2 years ago

Will try to get one more review on here tomorrow, but LGTM.

Hi, @leerob just following up on this 😄

leerob commented 2 years ago

Planning to go ahead and merge/release https://github.com/vercel/micro/pull/460, and then let's release this as a major version 👍

pmbanugo commented 2 years ago

@leerob Do you want me to update my branch and use the reverted change, or go ahead with what I currently have with serve and http.Server? I guess you would want the second option as part of the major version release.

leerob commented 2 years ago

What do you think? I think we probably keep the breaking changes.

pmbanugo commented 2 years ago

I think we keep the breaking change because that way we can use it programmatically with fastify or something similar. I'll make the necessary changes and update the PR soon.

pmbanugo commented 2 years ago

I left it with the breaking change and updated the documentation