Skip to content
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

πŸ“… 12/26 @ 12:00pm PT - Refactoring a 10+ years old code base: nock (Part VII) #60

Closed
10 tasks done
gr2m opened this issue Dec 20, 2021 · 6 comments
Closed
10 tasks done
Labels
show Preparation issue for a live show

Comments

@gr2m
Copy link
Owner

gr2m commented Dec 20, 2021

πŸ’πŸ» Refactoring a 10+ years old code base: nock (Part VII)
πŸ“… Sunday, December 26, 2021
πŸ• 12:00am Pacific Time
πŸŽ™οΈ no guests
πŸ“ https://www.twitch.tv/gregorcodes
🏷️ opensource


Subscribe to this issues to get a notification before the show begins and a summary after the show concludes.

Refactoring a 10+ years old code base: nock (Part VII)

I will continue my refactoring work from the first 6 weeks: #59, #58, #55, #54, #53

We use the new module throughout nock's code base now. Unfortunately some tests are still failing, so that's what I hope to finish in this session.

If we get all existing tests to pass and reach 100% test coverage again, I'll move the internal intercept module to its own repository and publish it as its own npm module.

Outline

  • Quick recap of what we accomplished so far
  • Detour: https://github.com/gr2m/http-recorder - Node.js in-process http(s) recording in 100 LOC
  • Make remaining tests pass
    • tests/test_recorder.js
    • tests/test_back_filters.js
    • tests/test_back.js
  • Refactor the intercept module, in particular the normalization of request options. I have the gut feeling we should just use the URL api to parse a request string and make sure we set all the properties. Have another look at what the native http.RequestClient api is doing.
  • Refactor the nock codebase. Remove no longer used code and obsolete tests.
  • Create the nock/intercept repository and move the internal module there
  • Make sure the new repository is fully documented and has 100% test coverage
  • Setup continuous releases for the new module
  • install the new module as dependency of nock
  • Celebrate the win!

TODOs

Before the show

When show begins

After the show

  • Reset twitter profile after the show
  • recording available tweet

Recording

https://www.twitch.tv/videos/1244301943

Shownotes

nock/nock#2247 (comment)

@gr2m gr2m changed the title DO NOT EDIT - Await parsing by GitHub Actions πŸ“… 12/26 @ 12:00pm PT - Refactoring a 10+ years old code base: nock (Part VII) Dec 20, 2021
@gr2m gr2m added the show Preparation issue for a live show label Dec 20, 2021
@gr2m
Copy link
Owner Author

gr2m commented Dec 26, 2021

Going live in 30 minutes at https://twitch.tv/gregorcodes

@gr2m
Copy link
Owner Author

gr2m commented Dec 26, 2021

I'm now live on https://twitch.tv/gregorcodes

@gr2m
Copy link
Owner Author

gr2m commented Dec 26, 2021

All done for today! Recording will be available here in a moment:
https://www.twitch.tv/videos/1244301943

@gr2m gr2m closed this as completed Dec 26, 2021
@KristjanTammekivi
Copy link

Time for a new episode? :D

@gr2m
Copy link
Owner Author

gr2m commented Feb 4, 2022

it is! I'm sorry, we had a complex move over new years and the first weeks of January, got COVID (luckily only mild symptoms, our kids are high-risk ...), and are house hunting now, it's all very exhausting. But I will get back to it, I will finish up this work. We have one final move next week for now, and then I hope that by mid February I'll find time to do Sunday shows again

@KristjanTammekivi
Copy link

Well, take care, stay safe! I hope everything goes well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
show Preparation issue for a live show
Projects
None yet
Development

No branches or pull requests

2 participants