Tag: node

Creating an npm package in 2022

September 15, 2022 By Mark Otto 0

Best Practices for Creating a Modern npm Package — A step-by-step “as of 2022” walkthrough of creating your own npm package using current best practices. It’s very thorough and certainly worth revisiting, even if you’ve built a package already. As always, though, there’s more than…

Using ML to rewrite a test suite to Playwright

September 8, 2022 By Mark Otto 0

🤖  Rewriting Tests from Cypress to Playwright with AI — Gajus needed to move an entire integration test suite from one framework to another – boring and laborious job, right? Gajus put AI to work, first in the shape of GitHub’s Copilot, but then using…

The ins and outs of ‘bin’ scripts

September 1, 2022 By Mark Otto 0

Tinybench: A Tiny and Simple Benchmarking Library — No dependencies, but uses whatever precise timing capabilities are available (e.g. process.hrtime). You can then benchmark whatever functions you want, specify how long or how many times to benchmark for, and get a variety of stats in return.…

Popular Node.js practices to reconsider

August 25, 2022 By Mark Otto 0

Popular Node.js Patterns and Tools to Reconsider? — Yoni is well known for his work in cataloging Node best practices but he thinks we should reflect upon entrenched approaches over time. Here he presents nine common approaches to reconsider, including the use of Dotenv, Passport.js,…

Native modules become ‘built-ins’

August 11, 2022 By Mark Otto 0

☀️ We’re taking a week off for a brief summer vacation and will be back on August 25, so when you don’t get an issue of Node Weekly next week, it’s our fault, not yours 😉__Peter Cooper, your editor. How To Use Multithreading in Node.js…

A new way to query your dependencies.

August 4, 2022 By Mark Otto 0

Introducing the New npm Dependency Selector Syntax — Another week, another new npm command! npm query is a new top-level command (as of npm v8.16.0) that lets you query and filter the dependencies of your project with a CSS-like dependency selector format so you can…

Using Rust to build Node modules

July 28, 2022 By Mark Otto 0

Introducing Even More Security Enhancements to npm — GitHub continues to up npm’s security game with enhancements that affect most of us in some way or another. There’s a streamlined login and publishing experience with the npm CLI, you can connect your GitHub and Twitter…

cd /home/nodejs/news

July 21, 2022 By Mark Otto 0

Working with File System Paths — Dr. Axel puts on his scuba gear and resumes his deep dive into Node with a look at ways to manipulate file system paths using core packages, including taking into account differences between Windows and POSIX systems. Dr. Axel Rauschmayer…

Node 18.6 and custom ESM loaders

July 14, 2022 By Mark Otto 0

Custom ESM Loaders: Who, What, When, Where, Why, How? — That’s a lot of questions! Custom loaders aren’t necessarily something you’ll use directly a lot, but are useful behind the scenes for controlling how modules are loaded – this post shows off some examples. Node…

All’s shell that ends shell.

July 7, 2022 By Mark Otto 0

Executing Shell Commands from Node.js — Dr. Axel’s journey through the backrooms of Node.js continues with another in-depth guide – this time tackling running other programs from our Node apps. The focus is on the built-in child_process module here, but you might also want to…