#380 — March 18, 2021

Read on the Web

👋 Hi. This week we’ve got another package maintainer interview for you, this time with frontend engineer Krasimir Tsonev, the creator of a Puppeteer test runner called Miss-Piggy (you’ll find out why it’s called that too) — it’s at the very end of the issue. Thanks for reading!
__
Peter Cooper, your editor

Node Weekly

Looking Towards the Next 10 Years of Node.js — Node.js is nearly twelve years old now, but the core team are thinking about the future and have launched an effort called Next 10 to engage the entire community to think about Node’s future. A key part you can get involved with right now is taking this Next 10 survey.

Node.js Core Team

Ghost 4.0: Popular Open Source Publishing Tool and CMS — Ghost began life a sort of Node.js-powered alternative to WordPress but has become a platform in its own right. This major new point release adds a new dashboard, membership features, integration tweaks, and neat frontend changes such as responsive, lazy-loading images everywhere, and performance gains. GitHub repo.

Ghost

New Course: Production-Grade Next.js with Scott Moss — No matter if you’re making a blog, marketing page, or a full-stack app, Next.js has the tools you need. This detailed course runs through everything you need to build a production-ready, full-stack app.

Frontend Masters sponsor

Worker Threads Monitoring for Node.js Now in N|SolidN|Solid is a commercially supported Node distribution aimed at ‘enterprise’ use cases which means providing lots of monitoring and observability features is key.

Liz Parody (NodeSource)

Quick Bits

  • V8 9.0 is on the way.
  • 👍 Source Karma is a fun tool to see how people react to you on GitHub by the reactions you’ve had on GitHub issues.

💻 Jobs

Senior Software Engineering Consultant – [100% Remote]  — Co-founded by Justin Searls, Test Double is an engineering consultancy on a mission to improve the way the world builds software. Work on challenging projects with a collaborative, passionate team. 100% employee owned, contract and full-time roles available.

TestDouble

Find Software Engineering Jobs with Hired — Take 5 minutes to build your free profile & start getting interviews for your next job. Companies on Hired are actively hiring right now.

Hired

📗 Tutorials and Stories

Seven Ways to Debug Jest Tests at the Terminal — (Almost) all the ways you can debug a Jest test in the command line.

Nikola Đuza

A Regular Expression Surprise in JavaScript — A look at how how applying the DRY (Don’t Repeat Yourself) approach to regular expressions in JavaScript can be tricky.

Michał Musialik

Maintaining REST API Documentation with Node.js — Part I“To achieve our goals we’ll use swagger-ui-express as a UI client and ts-openapi, a newly created Node component that allows us to declare our API schemas in Node.”

Nelson Gomes

▶  Lightweight Server-Side Rendering with Fastify and Preact — A developer shows off his new project. Look at those Lighthouse scores 🙂

Sebastien Ringrose

Scout APM: A Node Developer’s Best Friend. Try Free for 14 Days — Streamline troubleshooting with real-time alerts & tracing logic that ties issues to source code. Plans from $39/month.

Scout APM sponsor

Are You Using Promises and

1
async

/

1
await

Safely? — Using promises and

1
async

/

1
await

are now basically table stakes with Node development and this article aims to increase your confidence with them just a tiny bit.

Simon Plenderleith

Awesome Git Aliases — Git is almost the universal source control system now so most of you are probably using it. Aliases are just one way you can get more out of it and these very simple examples may give you food for thought.

Landon Schropp

How I Organize My

1
npm

Scripts — How one developer organizes the scripts he creates to be run using

1
npm

.

Gleb Bahmutov

🛠 Code and Tools

probe-image-size 7.0: Get Image Dimensions Without Full Download — Given a URL or filename, this can get the image’s dimensions from a wide variety of images (JPG, GIF, PNG, WebP, BMP, TIFF, PSD, and more).

Vitaly Puzrin

node-html-parser: Fast HTML Parser with Basic Element Query Support“it intends to parse massive HTML files in lowest price, thus the performance is the top priority.”

Tao Qiufeng and ashi009

Unleash: An Open Source Node Powered ‘Feature Toggle’ Service — The sort of system you’d use if you want to remotely toggle features on and off within an app. Built in JavaScript but has clients for Java, Go, Ruby, Python and .NET Core as well.

Unleash

Node.js Client for Google Cloud SpeechCloud Speech is Google’s service for performing machine learning powered speech to text conversion (i.e. transcription).

Google APIs

Seamlessly Integrate Video into Your Node App

Mux sponsor

parse-duration 0.5: Convert a Human Readable Duration to Milliseconds

Jake Rosoman

readdirp: Recursive Version of

1
fs.readdir

with a Streaming API

Paul Miller


💬 A quick Q&A with…
Krasimir Tsonev
engineer, writer, and open-source contributor.

Krasimir is the creator of miss-piggy, a small test runner for Puppeteer. We caught up with him to ask a few questions:

How would you describe Miss Piggy?

It’s a tiny layer on top of Puppeteer that comes with a friendly declarative API. Under the hood it uses Puppeteer to visit pages, do clicks, fill forms, basically simulating user interaction. Then it runs expectations on the page’s source code, page’s url, http requests and Google’s dataLayer.

Where did you get the idea for the name ‘Miss Piggy’?

Well, Kermit was taken 🙂 I wanted the name close to “puppeteer” and as a kid I loved Sesame Street show so I started checking which of its characters was available as an npm name. It looked like most of them were taken(!) So, I came up with “miss-piggy“.

Did you learn anything from building Miss Piggy that you might not have if you’d used something like jest-puppeteer instead?

Oh, yes for sure. I believe that every little thing that we are doing is a learning experience. jest-puppeteer would probably save me from building my own test runner. So I guess I sharpen my skills in that direction. But also, in this project, I learned more about Puppeteer and its API.

Are you planning to create any other libraries using the same simple, minimalist approach as Miss Piggy?

Actually, last couple of years I’m trying to write as less code as possible. That’s not because I don’t like coding. It’s because I don’t like complex code. To achieve such goals I have to work with libraries that have minimalistic and at the same time powerful APIs. I expect this from the other people so I can’t avoid doing it myself. Everything that I’ll eventually open-source will (I hope) follow the same approach. Doing one thing and doing it well.

You can follow Krasimir on Twitter, and find out more about his work here.


0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *