Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@alwatr/node-fs

Alwatr439AGPL-3.0-only5.5.3TypeScript support: included

Enhanced file system operations in Node.js with asynchronous queue to prevent parallel writes.

node-fs, fs, file, filesystem, readFile, writeFile, readJson, writeJson, JSON, async, queue, cross-platform, ECMAScript, typescript, javascript, node, nodejs, esm, module, utility, util, utils, nanolib, alwatr

readme

ECMAScript Nano Libs

This repository contains numerous small utility packages. These packages serve various useful purposes and are written in nano ESModule without any dependencies.

Here is a brief overview of the included libraries:

  1. tsconfig-base: This is a foundational TypeScript configuration used for Alwatr projects.
  2. flat-string: The flat-string function flattens the underlying C structures of a concatenated JavaScript string.
  3. global-this: This TypeScript module provides a cross-platform alternative to globalThis named globalScope. This object works across different environments, including browsers (window), Node.js (global), and Web Workers (self).
  4. platform-info: This module offers a method to identify the current platform where the script is being executed. It defines a platformInfo constant that contains details about the current platform.
  5. prettier-config: These are Alwatr's shared configurations for Prettier.
  6. eslint-config: This is Alwatr's ECMAScript Style Guide presented as shareable ESLint configurations.
  7. deep-clone: This function allows you to clone deeply nested objects and arrays in JavaScript.
  8. nano-build: This is a tool for building/bundling ECMAScript, TypeScript, and JavaScript libraries. It's user-friendly, requires no setup, follows best practices, has no dependencies, and uses esbuild for improved performance.
  9. type-helper: Collection of useful typescript type helpers.
  10. wait: Comprehensive toolkit for managing asynchronous operations.
  11. exit-hook: A utility for registering exit handlers in Node.js.
  12. flatomise: A utility for creating promises that can be externally resolved or rejected.
  13. async-queue: A queue that executes async tasks in order like mutex and semaphore methodology for javascript and typescript.
  14. node-fs: Enhanced file system operations in Node.js, including reading, writing, and handling JSON files, with both synchronous and asynchronous options.
  15. is-number: A simple utility to check if a value is a number.
  16. parse-duration: A simple utility to parse a duration string into milliseconds number.
  17. local-storage: localJsonStorage is a utility object in our TypeScript package that provides methods for interacting with the local storage in a structured and versioned manner.
  18. polyfill-has-own: A polyfill for Object.hasOwn.
  19. fetch: Enhanced fetch API with cache strategy, retry pattern, timeout, helper methods and enhanced types.

For more detailed information and guidelines on how to use each package, please refer to each package's README.

Sponsors

The following companies, organizations, and individuals support Nanolib ongoing maintenance and development. Become a Sponsor to get your logo on our README and website.

Contributing

Contributions are welcome! Please read our contribution guidelines before submitting a pull request.

License

This project is licensed under the AGPL-3.0 License.

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

5.5.3 (2025-04-15)

Note: Version bump only for package @alwatr/node-fs

5.5.2 (2025-04-01)

Dependencies update

  • bump the development-dependencies group across 1 directory with 2 updates (c1320b4) by @dependabot[bot]

5.5.1 (2025-03-18)

Dependencies update

  • bump the development-dependencies group with 9 updates (7290aa3) by @dependabot[bot]

5.5.0 (2025-03-06)

Miscellaneous Chores

  • update username casing in changelog entries (9722ac9) by @

Dependencies update

  • bump the development-dependencies group across 1 directory with 11 updates (720c395) by @dependabot[bot]

5.4.0 (2025-02-18)

Dependencies update

  • bump @types/node from ^22.13.0 to ^22.13.4 and prettier from 3.4.2 to 3.5.1; update eslint-import-resolver-typescript to 3.8.2 (b9a8399) by @

5.3.0 (2025-02-03)

Miscellaneous Chores

Dependencies update

  • bump the development-dependencies group across 1 directory with 11 updates (cb79d07) by @
  • update typescript and @types/node to version 5.7.3 and 22.13.0 respectively across multiple packages (ddab05b) by @

5.1.0 (2024-11-04)

Features

  • node-fs: enhance makeEmptyFile to create directories recursively if they don't exist (723a770) by @

5.0.0 (2024-11-02)

⚠ BREAKING CHANGES

  • To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies.

Code Refactoring

  • use the same version as @alwatr/nanolib (60eb860) by @

5.3.0 (2025-02-03)

Miscellaneous Chores

  • edit README (3860b3d) by @ArmanAsadian

Dependencies update

  • bump the development-dependencies group across 1 directory with 11 updates (cb79d07) by @dependabot[bot]
  • update typescript and @types/node to version 5.7.3 and 22.13.0 respectively across multiple packages (ddab05b) by @alimd

5.1.0 (2024-11-04)

Features

  • node-fs: enhance makeEmptyFile to create directories recursively if they don't exist (723a770) by @alimd

5.0.0 (2024-11-02)

⚠ BREAKING CHANGES

  • To simplify version management and ensure consistency, all nanolib packages now use the same version as @alwatr/nanolib. This may require updates to your project's dependencies.

Features

  • node-fs/write-file: support buffer as content (3cce9e9) by @
  • node-fs: Add make-file-bench demo script (ca3a57a) by @
  • node-fs: base package (74cbe48) by @
  • node-fs: copy from store (5c23e01) by @
  • node-fs: definePackage and logger (3880703) by @
  • node-fs: demo (31f3740) by @
  • node-fs: enhance json types (e85d927) by @
  • node-fs: enhance type of JSON-related functions (69751ed) by @
  • node-fs: enhance writeJson type (9010c72) by @
  • node-fs: makeFile (186ba09) by @
  • node-fs: readFile under asyncQueue (ab12153) by @
  • node-fs: rewrite new writeFile method (7534ed1) by @
  • node-fs: writeFile under asyncQueue (6d8b3d7) by @
  • node-fs: writeJson method (581d4f9) by @
  • use package-tracer (cc3c5f9) by @

Bug Fixes

  • all dependeny topology (1c17f34) by @
  • exported types by add .js extensions to all imports (fc3d83e) by @
  • node-fs: Update import statement for make-file module (7bddaa0) by @

Code Refactoring

  • node-fs: readJson function (e9cf12d) by @
  • node-fs: remove unused import from common module (496a338) by @
  • node-fs: rewrite makeEmptyFile (a39590b) by @
  • node-fs: separate files (a2b15a4) by @
  • node-fs: separate read file functions (de2cf5d) by @
  • node-fs: separate readJson (5616b53) by @
  • node-fs: Update logger import and initialization (0f89c0f) by @
  • prevent side-effects (01e00e1) by @
  • use new type-helper global types and remove all import types (08b5d08) by @
  • use the same version as @alwatr/nanolib (60eb860) by @

Miscellaneous Chores

  • deps-dev: bump the development-dependencies group with 3 updates (0e0ec0f) by @
  • deps: update (1a45030) by @
  • deps: update (8e70dff) by @
  • include LICENSE and LEGAL files to publish (09f366f) by @
  • node-fs: beta version (1b43445) by @
  • node-fs: change the license to AGPL-3.0 (9728276) by @
  • node-fs: enhance demo test (b7370d6) by @
  • node-fs: review and test (69da5b7) by @
  • Update build and lint scripts (392d0b7) by @
  • Update package.json exports for @alwatr packages (dacb362) by @

Dependencies update

  • bump @types/node (3d80fed) by @
  • bump the development-dependencies group across 1 directory with 10 updates (9ed98ff) by @
  • bump the development-dependencies group across 1 directory with 2 updates (2dfda9e) by @
  • bump the development-dependencies group with 10 updates (fa4aaf0) by @
  • bump the development-dependencies group with 2 updates (be5d6c2) by @
  • bump the development-dependencies group with 8 updates (16847ac) by @
  • upd (451d025) by @
  • update (4434ba6) by @
  • update (c36ed50) by @
  • update all (53342f6) by @
  • update all dependencies (1e0c30e) by @
  • update all dependencies (0e908b4) by @
  • upgrade (6dbd300) by @

1.1.8 (2024-11-02)

Dependencies update

1.1.7 (2024-10-25)

Dependencies update

  • bump the development-dependencies group across 1 directory with 2 updates (2dfda9e) by @dependabot[bot]
  • bump the development-dependencies group with 8 updates (16847ac) by @dependabot[bot]

1.1.6 (2024-10-12)

Note: Version bump only for package @alwatr/node-fs

1.1.5 (2024-10-11)

Code Refactoring

  • prevent side-effects (01e00e1) by @mohammadhonarvar

1.1.4 (2024-10-11)

Miscellaneous Chores

  • include LICENSE and LEGAL files to publish (09f366f) by @alimd

1.1.3 (2024-10-11)

Note: Version bump only for package @alwatr/node-fs

1.1.2 (2024-10-10)

Dependencies update

  • bump the development-dependencies group with 10 updates (fa4aaf0) by @dependabot[bot]

1.1.1 (2024-10-08)

Note: Version bump only for package @alwatr/node-fs

1.1.0 (2024-09-29)

Features

  • node-fs/write-file: support buffer as content (3cce9e9) by @njfamirm
  • use package-tracer (cc3c5f9) by @mohammadhonarvar

Bug Fixes

  • all dependeny topology (1c17f34) by @mohammadhonarvar

Code Refactoring

  • node-fs: remove unused import from common module (496a338) by @alimd
  • node-fs: Update logger import and initialization (0f89c0f) by @alimd
  • use new type-helper global types and remove all import types (08b5d08) by @alimd

Miscellaneous Chores

  • node-fs: change the license to AGPL-3.0 (9728276) by @ArmanAsadian
  • Update build and lint scripts (392d0b7) by @alimd

Dependencies update

  • bump @types/node (3d80fed) by @dependabot[bot]

1.0.13 (2024-09-21)

Note: Version bump only for package @alwatr/node-fs

1.0.12 (2024-09-15)

Dependencies update

  • bump the development-dependencies group across 1 directory with 10 updates (9ed98ff) by @dependabot[bot]
  • update (c36ed50) by @alimd

1.0.11 (2024-08-31)

Miscellaneous Chores

1.0.10 (2024-08-31)

Note: Version bump only for package @alwatr/node-fs

1.0.9 (2024-08-31)

Dependencies update

  • update all dependencies (1e0c30e) by @alimd

1.0.8 (2024-07-04)

Dependencies update

  • update all dependencies (0e908b4) by @

1.0.7 (2024-05-12)

Dependencies update

1.0.6 (2024-04-25)

Note: Version bump only for package @alwatr/node-fs

1.0.5 (2024-03-28)

Note: Version bump only for package @alwatr/node-fs

1.0.4 (2024-01-31)

Bug Fixes

  • exported types by add .js extensions to all imports (fc3d83e) by @alimd

Miscellaneous Chores

1.0.3 (2024-01-24)

Note: Version bump only for package @alwatr/node-fs

1.0.2 (2024-01-20)

Note: Version bump only for package @alwatr/node-fs

1.0.1 (2024-01-16)

Note: Version bump only for package @alwatr/node-fs

1.0.0 (2024-01-16)

Features

  • node-fs: enhance type of JSON-related functions (69751ed) by @alimd

1.0.0-beta.0 (2024-01-08)

Bug Fixes

  • node-fs: Update import statement for make-file module (7bddaa0) by @alimd

Features

  • node-fs: Add make-file-bench demo script (ca3a57a) by @alimd
  • node-fs: base package (74cbe48) by @njfamirm
  • node-fs: copy from store (5c23e01) by @njfamirm
  • node-fs: definePackage and logger (3880703) by @njfamirm
  • node-fs: demo (31f3740) by @njfamirm
  • node-fs: enhance json types (e85d927) by @alimd
  • node-fs: enhance writeJson type (9010c72) by @alimd
  • node-fs: makeFile (186ba09) by @njfamirm
  • node-fs: readFile under asyncQueue (ab12153) by @alimd
  • node-fs: rewrite new writeFile method (7534ed1) by @alimd
  • node-fs: writeFile under asyncQueue (6d8b3d7) by @alimd
  • node-fs: writeJson method (581d4f9) by @alimd