Automating code updates with codemods

July 18, 2023 By Mark Otto 0

Node.js Weekly

Upgrading TypeORM with jscodeshiftTypeORM is an ORM that supports both Data Mapper and Active Record patterns, and last year it introduced some breaking changes that left the author of this post facing a lot of updates to be made. What to do? Write a ‘codemod’ to automate the job! Even if you don’t use TypeORM, this post might give you some ideas for other places to use a code rewriting approach.

Clinton Blackburn

The Leading API Platform for Building and Using APIs — Get access to a wide range of features for API testing, documentation, collaboration, mocking, and more. Automate repetitive tasks, stay organized, and build robust workflows to ensure your APIs remain reliable and performant.

Postman

Pacquet: A New, Experimental Package Manager for Node — Forget your npms, pnpms, and Yarns.. there’s a fresh face in town? Pacquet, written in Rust, is primarily a learning experiment for the author (who happens to be on Node.js core), but with package managers sharing ideas all the time, you never know..

Yagiz Nizipli

Useful Functions for a (Deno) HTTP Server — One way to think about an HTTP-based service is functionally, with requests going in, being processed, and a response heading out. The author explores Deno’s new Deno.serve function and how both it and the /x/http_fns functions can provide a more functional approach to common HTTP tasks. Possible food for thought even in Node with things like Hono picking up pace.

Jollytoad

🛠 Code & Tools

nve 16.1: Run Things With a Specific Node.js Version — Execute a file, command, or REPL using a specific version (or multiple versions) of Node. For example, you could run npm test over multiple versions at once. v16.1 lets you specify a Node version stored in a package.json, .nvmrc, or similar file.

ehmicky

Classifieds is a new way to share projects, events or services you may find useful, with a mix of free and paid options.

More details to follow.

Psst.. if you’re a Postgres user, check out our weekly Postgres newsletter as well 😉