{"id":16446613,"url":"https://github.com/tshemsedinov/drop-nodejs14","last_synced_at":"2025-08-17T14:43:17.340Z","repository":{"id":154240171,"uuid":"631470462","full_name":"tshemsedinov/Drop-Nodejs14","owner":"tshemsedinov","description":"Drop Node.js 14 support","archived":false,"fork":false,"pushed_at":"2023-08-02T16:49:01.000Z","size":38,"stargazers_count":65,"open_issues_count":0,"forks_count":5,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-03T17:52:58.678Z","etag":null,"topics":["backend","frontend","javascript","metarhia","nodejs"],"latest_commit_sha":null,"homepage":"https://metarhia.com","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tshemsedinov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-04-23T05:48:52.000Z","updated_at":"2025-03-12T22:05:40.000Z","dependencies_parsed_at":"2023-05-20T13:00:16.152Z","dependency_job_id":null,"html_url":"https://github.com/tshemsedinov/Drop-Nodejs14","commit_stats":null,"previous_names":["tshemsedinov/drop-nodejs14"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tshemsedinov/Drop-Nodejs14","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tshemsedinov%2FDrop-Nodejs14","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tshemsedinov%2FDrop-Nodejs14/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tshemsedinov%2FDrop-Nodejs14/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tshemsedinov%2FDrop-Nodejs14/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tshemsedinov","download_url":"https://codeload.github.com/tshemsedinov/Drop-Nodejs14/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tshemsedinov%2FDrop-Nodejs14/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264487039,"owners_count":23616189,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["backend","frontend","javascript","metarhia","nodejs"],"created_at":"2024-10-11T09:48:13.984Z","updated_at":"2025-07-09T15:39:56.460Z","avatar_url":"https://github.com/tshemsedinov.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Drop Node.js 14 support in your projects\n\n- Now: April 2023, we have Node.js 18.16.0 LTS, 16.20.0 (maintenance) and 20.0.0 (latest)\n- Going to drop Node.js 14 support in all HowProgrammingWorks and Node.js courses, Metarhia codebase\n- Now we can rely on Node.js 16.20.0 capabilities\n- See release schedule: https://github.com/nodejs/release#release-schedule\n\n### Refactoring checklist as of April 2023\n\n- Due to the move from `npm 6` to `npm 8`, convert `package_lock.json` to `lockfileVersion 2`\n- Now we can use true `#privateField` syntax instead of `_pseudoPrivateField` or closures for \"Information Hiding\" principle\n- Change deprecated `cluster.isMaster` to `cluster.isPrimary`, change `cluster.setupMaster` to `cluster.setupPrimary`\n- Check all `require` calls to use `node:` prefix for all internal node.js modules, for example: `node:fs`\n- Use `crypto.randomUUID()` to generate UUID instead of manual generation or third-party modules\n- Stop using `fs.exists`; use `fs.stat` or `fs.access` instead, see example:\n```js\nconst toBool = [() =\u003e true, () =\u003e false];\nconst exists = await fs.promises.access(filePath).then(...toBool);\n```\n- Stop using `fs.rmdir(path, { recursive: true })`; use `fs.rm(path, { recursive: true })` instead, see docs: https://nodejs.org/api/fs.html#fsrmpath-options-callback\n- Check `stream.destroyed` instead of the `.aborted` property, and listen for `close` event instead of `abort` and `aborted` events for `ClientRequest`, `ServerResponse`, and `IncomingMessage`\n- Stop using deprecated `Server.connections`; use `Server.getConnections()` instead, see docs: https://nodejs.org/api/net.html#servergetconnectionscallback\n- Do not use default `index.js` as of Node.js 16.0.0; the main entry point should be explicitly defined\n- Stop using `emitter.listeners` property; use `emitter.listeners(eventName)` and `events.getEventListeners(emitter, eventName)` instead to get copy of listeners collection, see docs: https://nodejs.org/api/events.html#eventsgeteventlistenersemitterortarget-eventname\n- Now `response` (http.ServerResponse) has a reference to `request` instance (http.IncomingMessage): `response.req`\n- Stop using `node:url` API; use JavaScript URL class instead\n- Note that unhandled promise rejections are deprecated and will terminate the process with a non-zero exit code. Add a `process.on('uncaughtException', (reason, origin) =\u003e {})` handler to prevent process termination\n- Stop using deprecated `process.on('multipleResolves', handler)`\n- Don't change `process.config` (frozen)\n- Check for deprecated `Thenable` support in streams\n- Ensure only integer values are used for `process.exit(code)` and `process.exitCode`\n- The well-known MODP groups modp1, modp2, and modp5 are deprecated due to their lack of security against practical attacks\n- Use `http.createServer({ noDelay, keepAlive, keepAliveInitialDelay })`, no need in `request.setNoDelay` anymore\n- New `os.machine()` returns one of machine types as a string: `arm`, `arm64`, `aarch64`, `mips`, `mips64`, `ppc64`, `ppc64le`, `s390`, `s390x`, `i386`, `i686`, `x86_64`\n\n### Explore new features\n\nAvailable in all currently supported Node.js versions as of April 2023\n\n- Use `error.cause` to chain errors like: `new Error('message', { cause: error })`, see docs: https://nodejs.org/api/errors.html#errorcause\n- Use `AbortController` and `AbortSignal` in different async I/O APIs: `exec/fork/spawn`, `events.once`, `readFile`, `stream.Writable/Readable`, and so on\n- Use `AsyncLocalStorage`, `AsyncResource`, see docs: https://nodejs.org/api/async_context.html\n- Use multiple new promisified APIs: `node:stream/promises`, `node:dns/promises`, `node:assert/strict`\n- Use `node:timers/promises`, for example `await setTimeout(100)`\n- Use `WeakReferences` and `FinalizationRegistry`\n- Use new `Promise` method `any`\n- Use `node:http` improvements: `server.maxRequestsPerSocket`, `response.strictContentLength`, `message.headersDistinct`, `message.trailersDistinct`, `outgoingMessage.appendHeader`, `http.setMaxIdleHTTPParsers`, see docs: https://nodejs.org/api/http.html\n- Discover multiple improvements in `node:crypto`\n- Discover multiple improvements in Event API: `Event` and `EventTarget` classes: https://nodejs.org/api/events.html#eventtarget-and-event-api\n- Discover class `BlockList` from `node:net`: https://nodejs.org/api/net.html#class-netblocklist\n- Discover perf_hooks improvements like `createHistogram`, `PerformanceMark`, `getEntries`, `PerformanceMeasure`, `PerformanceResourceTiming`, multiple changes of `PerformanceObserver` and `Histogram`, new `perf_hooks.performance`: https://nodejs.org/api/perf_hooks.html\n- Discover new Web Crypto API: https://nodejs.org/api/webcrypto.html\n- Discover new `node:worker_threads` features `getEnvironmentData` and `setEnvironmentData`, new classes `BroadcastChannel`, `EventTarget`, and `MessagePort`, see docs: https://nodejs.org/api/worker_threads.html\n- Discover Node.js native test runner from `node:test`: https://nodejs.org/api/test.html\n- Take a look at the Diagnostics Channel API: https://nodejs.org/api/diagnostics_channel.html\n- See `node:net` changes: `Server` event `drop`, `socket.connect` options: `noDelay`, `keepAlive`, and `keepAliveInitialDelay`, `socket.localFamily`, and `socket.resetAndDestroy`\n- Discover Promise hooks API from `node:v8`m see docs: https://nodejs.org/api/v8.html#promise-hooks\n\n### Note that you can't freely use\n\n- Following features are still experimental in at least one of supported node.js versions `--watch`, `process.getActiveResourcesInfo`, `fs.cp`, and `fsPromises.cp`, `Readable` methods `map`, `filter`, `compose`, `iterator`, `forEach` and so on\n- Fetch API is experimental in node.js 16.x and 17.x, and available without `--no-experimental-fetch` flag only from 18.0 and above, use `undici` from npm for previous node.js versions: https://github.com/nodejs/undici\n- ESM and CJS loaders API is currently being redesigned and will still change\n- Startup Snapshot API and Web Streams API are still experimental, see docs: https://nodejs.org/api/v8.html#startup-snapshot-api\n\n### Use node.js features instead of dependencies\n\n- Use `nodejs/undici` instead of npm modules `request`, `axios`, `node-fetch`\n- Prefer to use `node:child_process` and `node:worker_trheads` for CPU utilization and multithreading instead of `node:cluster`\n- Prefer to use npm module `ws` + browser native implementation of `Websocket` instead of `socket.io`\n- Use native `node:crypto.script` for password hashing or `argon2` from npm instead of `bcrypt` or other npm modules\n- Use `node:async_hooks` instead of `zone.js` or deprecated built-in node.js `domain` module\n- Prefer to use `docker` instead of `pm2` or `forever` npm modules\n- Prefer to use `fastify` or native `node:http` + collection of routes `Map\u003cstring, Function\u003e` instead of archaic `express`, `connect`, `koa`\n- Use `Intl` and ES6 built-in features instead of `moment.js`\n- Use `${templateStrings}` instead of `ejs` or other npm modules for templating\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftshemsedinov%2Fdrop-nodejs14","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftshemsedinov%2Fdrop-nodejs14","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftshemsedinov%2Fdrop-nodejs14/lists"}