---
title: "The Node.js best practices list gets a 2023 update"
publication: "Node Weekly"
issue: 496
published_at: "2023-07-25"
canonical_url: "https://nodeweekly.com/issues/496"
---

Plus inking React-powered CLI apps, a Discord bot framework, and North Korea gets in on the npm action. |        

#​496 — July 25, 2023 

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

Together with [![Dynaboard logo\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_500,h_100/e_make_transparent/co_white,e_outline:7/xh5y6qe2tcrjx1vxyfer.png)](https://dynaboard.com/?utm_source=cooperpress-nw&utm_medium=email&utm_campaign=60seconds-q32023) 

![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/ggwwqp1eovgky6fhgn5k.jpg)](https://github.com/goldbergyoni/nodebestpractices)  

[The Node.js Best Practices List: 2023 Edition](https://github.com/goldbergyoni/nodebestpractices) — A valuable, long standing resource has been “modernized to 2023 standards” (complete with recommendations of more modern libraries) with lots of work by creator Yoni and an ever growing team of contributors. The topics remain the same, however, covering areas like code style, project architecture, and taking apps into production. _(If you’re already familiar with this list, you can skim through the #new and #updated hashtags on the page.)_ 

Yoni Goldberg et al.   

[Microsoft TypeChat: An Approach for Type-Safe LLM Responses](https://microsoft.github.io/TypeChat/blog/introducing-typechat/) — It’s interesting to see a new project from Microsoft with so many prominent names attached to it, but demonstrates the huge excitement within MS for ML and large language models (LLMs). _TypeChat_’s goal is to work around the issue of LLMs outputting unstructured natural language and instead to direct such output into a predictable, _typed_ form. 

Hejlsberg, Lucco, Rosenwasser et al.   [![\](https://copm.s3.amazonaws.com/d75ecf1e.png)](https://dynaboard.com/?utm_source=cooperpress-nw&utm_medium=email&utm_campaign=60seconds-q32023) 

[How To Build a Web App in 60 Seconds Using AI](https://dynaboard.com/?utm_source=cooperpress-nw&utm_medium=email&utm_campaign=60seconds-q32023) — Dynaboard's low-code IDE offers 40+ built-in UI components & easy DB connections. Use AI to generate any SQL, JS & CSS. 

Dynaboard sponsor   

[Node v18.17.0 (LTS) Released](https://nodejs.org/en/blog/release/v18.17.0) — Not a huge update of the LTS release, more a ‘keeping up to date’ release, but Node 18 gains Ada 2.0 (the WHATWG-compliant URL parser), as well as improvements to Web Crypto API support. 

Danielle Adams   

📣 [Node v20.5.0 (Current)](https://nodejs.org/en/blog/release/v20.5.0) has also been released, but without any significant changes or new features.  

[pkg-size: Find the True Size of an npm Package](https://pkg-size.dev/) — A well designed tool that can quickly show you the true size of an npm package (including dependencies) using the _actual packages_ by npm installing them in a WebContainer-powered virtual environment, all in your browser. Hiroki has [a Twitter thread](https://twitter.com/privatenumbr/status/1681206731127554048) where he explains more about how it works. 

Hiroki Osame   

_ASIDES:_ 

- [Bun](https://bun.sh/) is an alternative JavaScript runtime built atop WebKit's _JavaScriptCore_, as opposed to Deno which uses V8, like Node. Like Deno, however, Node compatibility is important to Bun and [Bun 0.7](https://bun.sh/blog/bun-v0.7.0) improves Node compatibility, Vite support, implements Web Workers, and has a new `--smol` option to run in memory-constrained environments (it uses 1/6th as much memory in one benchmark).
- The idea for Node to [natively support `.env` files](https://github.com/orgs/nodejs/discussions/44975) was first floated last year, but now there's [a pull request making progress](https://github.com/nodejs/node/pull/48890) on the matter.
- If you're a VS Code and TypeScript user who's tired of lengthy, hard to decipher error messages, [Pretty TypeScript Errors](https://marketplace.visualstudio.com/items?itemName=yoavbls.pretty-ts-errors#prettytserrors) is a VS Code extension worth checking out.
- North Korea's newest export: [malicious npm packages?](https://blog.phylum.io/junes-sophisticated-npm-attack-attributed-to-north-korea/)   

[The 2023 State of the API Report is Here](https://www.postman.com/state-of-api/?utm_source=cooper_press&utm_medium=email&utm_campaign=node_weekly&utm_term=july_25_2023&utm_content=secondary_state_of_the_api_2023) — The State of the API is the world's largest survey and report on APIs, with findings from over 40K developers and API professionals. 

Postman sponsor   

[Generating JS and Python SDKs from a Canonical Rust SDK](https://postgresml.org/blog/how-we-generate-javascript-and-python-sdks-from-our-canonical-rust-sdk) — [PostgresML](https://postgresml.org/) is an extension that adds machine learning functions into Postgres. Its team loves and prefers Rust but most of its users are using JavaScript or Python. What to do? Simultaneously write multi-language libraries using Rust.. 

Silas Marvin (PostgresML)   

[Content-Security-Policy (CSP) Testing Using Cypress](https://glebbahmutov.com/blog/csp-testing-using-cypress/) 
Gleb Bahmutov   

[Using npm Workspaces with Docker](https://nathanfries.com/posts/docker-npm-workspaces/) 
Nathan Fries   

🛠 Code & Tools 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/z237ot63rjhrmdxubijj.jpg)](https://github.com/vadimdemedes/ink)  

[Ink 4.3: Build Interactive CLI Apps using React](https://github.com/vadimdemedes/ink) — A terminal-based React renderer so you can build command line apps using React-style components. It's mature and used by [all sorts of folks.](https://github.com/vadimdemedes/ink#whos-using-ink) 

Vadim Demedes   

[Necord: A Framework for Creating Discord Bots](https://necord.org/) — It uses Nest and Discord.js under the hood. Some example apps show [how easy it is](https://github.com/necordjs/examples/blob/master/02-slash-commands/src/app.commands.ts) to deploy bot functions. [GitHub repo.](https://github.com/necordjs/necord) 

Necord   

[MailDev: SMTP Server and Web Interface for Testing Emails](https://maildev.github.io/maildev/) — If your app needs to send email, rather than sending it to a live account, you could send it to this app which lets you get a local preview without having to think about spam filters, etc. 

Dan Farrelly        

📰 Classifieds   

💻 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). 

--- 

📧 Did you know we have [a Postgres newsletter too?](https://postgresweekly.com/) We cover everything from SQL through to the latest in vector storage, GIS, hosted platforms, and Postgres extensions.     

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

[fast-png 6.2: Pure JS PNG Image Decoder and Encoder](https://github.com/image-js/fast-png) — Pass it a PNG to decode via a TypedArray or Buffer, or a Canvas ImageData (or compatible object) to encode into PNG. 

Michaël Zasso   

[brotli-wasm 2.0: A Brotli Compressor and Decompressor](https://github.com/httptoolkit/brotli-wasm) — Covers both Node _and_ the browser by means of WebAssembly. 

HTTP Toolkit   

- [Jasmine 5.1](https://github.com/jasmine/jasmine/blob/main/release_notes/5.1.0.md)
 ↳ JavaScript testing framework.
- [better-sqlite3 8.5](https://github.com/WiseLibs/better-sqlite3)
 ↳ A nicer way to work with SQLite3.
- [BullMQ 4.6](https://github.com/taskforcesh/bullmq)
 ↳ Message queue and job processing for Node.
- [adminJS 7.1](https://adminjs.co/)
 ↳ Admin panel for Node webapps.
- [Mongoose 7.4](https://github.com/Automattic/mongoose/releases/tag/7.4.0)
 ↳ MongoDB object modeling.
- [Typegoose 11.4](https://github.com/typegoose/typegoose)
 ↳ Define Mongoose models with TypeScript classes.
- [LDAPts 5.0](https://github.com/ldapts/ldapts)
 ↳ TypeScript LDAP client.
- [oclif 3.10.0](https://github.com/oclif/oclif)
 ↳ CLI framework.
- [pnpm 8.6.10](https://github.com/pnpm/pnpm/releases/tag/v8.6.10)    

**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|*).
