---
title: "Automating code updates with codemods"
publication: "Node Weekly"
issue: 495
published_at: "2023-07-18"
canonical_url: "https://nodeweekly.com/issues/495"
---

Plus Prisma 5.0, a YouTube API wrapper for Node, a new static site generator, and a giant JavaScript donut. |        

#​495 — July 18, 2023 

[Read on the Web](https://nodeweekly.com/issues/495)  

Together with [![Postman logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_330,h_100/e_make_transparent/co_white,e_outline:7/ym5p9yhtqry2ntuhfxk4.png)](https://www.postman.com/product/tools/?utm_source=cooper_press&utm_medium=email&utm_campaign=node_weekly&utm_term=july_18_2023&utm_content=primary_api_tools) 

![Node.js Weekly](https://res.cloudinary.com/cpress/image/upload/v1653576619/lgfqinzbdqttwmhvljxb.png) 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/keflbktjwnyrggfqcorh.jpg)](https://dev.clintonblackburn.com/2023/07/15/upgrading-typeorm-with-jscodeshift.html)  

[Upgrading TypeORM with `jscodeshift`](https://dev.clintonblackburn.com/2023/07/15/upgrading-typeorm-with-jscodeshift.html) — [TypeORM](https://typeorm.io/) is an ORM that supports both Data Mapper and Active Record patterns, and last year it introduced [some breaking changes](https://github.com/typeorm/typeorm/releases/tag/0.3.0) 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   [![\](https://copm.s3.amazonaws.com/ed2dc926.jpeg)](https://www.postman.com/product/tools/?utm_source=cooper_press&utm_medium=email&utm_campaign=node_weekly&utm_term=july_18_2023&utm_content=primary_api_tools) 

[The Leading API Platform for Building and Using APIs](https://www.postman.com/product/tools/?utm_source=cooper_press&utm_medium=email&utm_campaign=node_weekly&utm_term=july_18_2023&utm_content=primary_api_tools) — 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 sponsor   

[Pacquet: A New, _Experimental_ Package Manager for Node](https://github.com/anonrig/pacquet) — 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   

_ASIDES:_ 

- [Prisma 5.0 has been released](https://www.prisma.io/blog/prisma-5-f66prwkjx72s) and the team did [▶️ an hour long livestream](https://www.youtube.com/watch?v=6rlKp_eBdZA) showing off the improvements. There's also a [mega changelog](https://github.com/prisma/prisma/releases/tag/5.0.0) of the various updates – performance is the name of the game for v5.
- The OpenJS Foundation has [shared its latest Node.js security progress report:](https://openjsf.org/blog/2023/07/17/node-js-security-progress-report-17-reports-closed/) _"The Node.js team closed 17 reports in June which is a big increase from the 2 completed in May."_
- GitHub is rolling out a beta of [passwordless, passkey based authentication on GitHub․com.](https://github.blog/2023-07-12-introducing-passwordless-authentication-on-github-com/)
- 🍩 [donut.js](https://github.com/EvanZhouDev/donut-js) is a JavaScript take on [donut.c](https://www.a1k0n.net/2006/09/15/obfuscated-c-donut.html), a famous bit of obfuscated C.   

[Deploying a Fastify and Vue 3 Static Site to Heroku](https://www.lirantal.com/blog/deploying-a-fastify-vue-3-static-site-to-heroku) — One way to get the benefits of a static site architecture but retain the option to flexibly add server-side functionality later. 

Liran Tal   

[Useful Functions for a (Deno) HTTP Server](https://jollytoad.deno.dev/blog/http_fns) — 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](https://deno.land/x/http_fns@v0.0.21) can provide a more functional approach to common HTTP tasks. Possible food for thought even in Node with things like [Hono](https://hono.dev/) picking up pace. 

Jollytoad   

[You Might Not Need Jest — The Node.js Native Test Runner Is Great](https://pawelgrzybek.com/you-might-not-need-jest-the-node-js-native-test-runner-is-great/) 
Paweł Grzybek   

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/yikknjjetgek8ktgiye2.jpg)](https://github.com/LuanRT/YouTube.js)  

[YouTube.js 5.5: A Wrapper Around YouTube's Private 'InnerTube' API](https://github.com/LuanRT/YouTube.js) — A year ago I wondered if this would continue to work, but apparently it does, and it uses the same behind the scenes API as official YouTube clients (you've gotta love the name 'inner tube'..). As always, though, your mileage may vary. 

LuanRT   

[fusion.ssg: A Minimal Framework for Static Websites](https://fusionssg.com/) — Think React may be overkill for a simple, static project? This new framework might be all you need. Here’s [▶️ a video demo](https://www.youtube.com/watch?v=PuoOGCEs1gk) of it in operation. 

Jeff Schwartz   

[Your Fully Managed HTML to PDF or PNG Microservice](https://doppio.sh?from=nodeweekly) — API for developers that enables you to generate beautiful documents and store them directly in your own S3 bucket. 

Doppio.sh sponsor   

[nve 16.1: Run Things With a Specific Node.js Version](https://github.com/ehmicky/nve) — 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](https://github.com/ehmicky/nve/releases/tag/16.1.0) lets you specify a Node version stored in a `package.json`, `.nvmrc`, or similar file. 

ehmicky   

[modbus-serial: Pure JS MODBUS-RTU Implementation](https://github.com/yaacov/node-modbus-serial) — [Modbus](https://en.wikipedia.org/wiki/Modbus) is a standard communications protocol used by industrial devices, in robotics, irrigation controllers, etc. and works over serial connections or TCP. 

Yaacov Zamir        

📰 Classifieds   

🤔 JWTs are low-latency and offer better interoperability than session cookies for authentication, but they can also be less secure. [Learn more about the tradeoffs on the Stytch blog.](https://stytch.com/blog/jwts-vs-sessions-which-is-right-for-you/?utm_source=cooperpress&utm_medium=paid_sponsorship&utm_campaign=SP_Coopernews_Q32023&utm_content=jwt-vs-session) 

--- 

💻 Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. [Create a free profile now](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-nodeweekly%29&utm_content=find-your-next-job). 

--- 

📅 [TS Congress](https://typescriptcongress.com/) is an online TypeScript event taking place this September 21-22. There's already a fantastic (and growing) [line-up of speakers.](https://typescriptcongress.com/#speakers)     

_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.       

[BullMQ 4.5: Reliable, Redis-Based Distributed Queue for Node](https://github.com/taskforcesh/bullmq) — A fast, reliable Redis-based distributed queue for Node with a focus on stability and atomicity. 

Taskforce․sh Inc.   

[Knex.js 2.5: A Query Builder for Multiple Databases](https://github.com/knex/knex) — Knex is a popular ‘batteries included’ SQL query builder that supports Postgres, MySQL, SQL Server, SQLite3, and other SQL databases. [v2.5](https://github.com/knex/knex/releases/tag/2.5.0) adds mostly small bits and pieces including a helper for [using UUIDs in schemas.](https://github.com/knex/knex/pull/5617) 

knex   

[Kanel: Generate TypeScript Types from Postgres](https://kristiandupont.github.io/kanel/) — It works by inspecting a live database and outputs code you can add to a TypeScript project and use with something like [Knex](https://knexjs.org/) (above) – [GitHub repo.](https://github.com/kristiandupont/kanel) 

Kristian Dupont   

Psst.. if you're a Postgres user, check out [our weekly Postgres newsletter](https://postgresweekly.com/) as well ;-)  

- [Octokit.js 3.0](https://github.com/octokit/octokit.js)
 ↳ Official GitHub SDK for browsers, Node, and Deno.
- [Fastify 4.20](https://github.com/fastify/fastify)
 ↳ The fast, low overhead web framework.
- [HyperExpress 6.8](https://github.com/kartikk221/hyper-express)
 ↳ High-perf HTTP / WebSocket server.
- [Nest 10.1](https://github.com/nestjs/nest)
 ↳ Popular server-side framework.
- [Mercurius 13.1](https://github.com/mercurius-js/mercurius)
 ↳ GraphQL adapter for Fastify.    

**Got a link for us?** Reply and tell us. We can't include everything but we'll look at anything you send. _Thanks!_ 

--- 

**Sponsorship:** Email `[kristina@cooperpress.com](mailto:kristina@cooperpress.com)` for details. 

--- 

Published by Cooper Press Ltd.
Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom 

[Cancel your subscription](https://nodeweekly.com/leave/*|UID|*) or [change your address](https://nodeweekly.com/edit_subscription/*|UID|*).
