~/talk

Zero-dependency CLI Applications with Node.js

Talkat OpenJS World 2022 · 2022-06-06..06-10· [nodejs, developer-experience]
slides:none on file

Node 18 adds concrete APIs that let CLIs drop npm packages: node:util.parseArgs parses flags (booleans, shorts, errors on wrong forms), global fetch does HTTP via undici and Web Streams, and node:test provides sync/async tests and a runner. fs.mkdir, fs.rm and experimental fs.cp support recursive make/delete/copy (rm mirrors rimraf behavior). An example project called bad installs packages, adds deps to package.json and removes node_modules — it works as a proof of concept and relies on these built-ins.

AI-written summary · about

  1. 0:00Introduction
  2. 1:02What are dependencies
  3. 2:28Why zero dependencies
  4. 2:50What are CLI apps
  5. 4:15New Node.js features
  6. 7:26Parsing arguments with util.parseArgs
  7. 10:37Using fetch in Node.js
  8. 12:23Node.js test runner
  9. 14:31Recursive file operations
  10. 17:39Future Node.js ideas
  11. 20:05Building a package manager
  12. 21:48Future plans for BAD
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.