node breaking changes
npm5 curated breaking changes across major versions of node. Use this as a migration checklist before bumping dependencies.
- 20 \u2192 22api
`node --watch` is stable (no flag needed).
MigrationReplace `nodemon` with `node --watch index.js` for simple use cases.
- 20 \u2192 22api
Built-in WebSocket client (no `ws` package needed for simple clients).
Migration`const ws = new WebSocket('wss://...')` works natively. Use `ws` package for server-side still.
- 20 \u2192 22runtime
require(ESM) is supported (synchronous require of ES modules without top-level await).
MigrationWorks without flag since 22.12. For 22.0-22.11 use `--experimental-require-module`. TLA modules still cannot be required.
- 18 \u2192 20api
Built-in `--env-file` flag: load .env without dotenv.
MigrationRun `node --env-file=.env index.js`. Still use dotenv if you need variable interpolation.
- 18 \u2192 20runtime
V8 upgraded to 11.3; some older native addons may need rebuild.
MigrationRun `npm rebuild` after upgrading. Watch for `NODE_MODULE_VERSION` mismatches in native packages.
Get this data programmatically \u2014 free, no authentication.
curl https://depscope.dev/api/breaking/npm/node