Back to Explore

jprichardson/node-jsonfile

GitHub
1 updates · last 90 days1 watchersOpen source

Last release: 1 month ago

jsonfile is a Node.js module that makes it easy to read and write JSON files, avoiding manual JSON.stringify, fs.writeFile, and fs.readFile parsing in try/catch. It provides both callback and promise-based APIs for readFile and writeFile, plus synchronous variants (readFileSync, writeFileSync).

Project status

  • Active maintenance is evident, with an upstream push and the most recent update (6.2.1) on 2026-04-20, and a prior update (6.2.0) in 2025-08.
  • Apparent update cadence is roughly on the order of months, based on 6.2.0 (2025-08-12) to 6.2.1 (2026-04-20), about 8 months.

AI summary generated Today

AI-generated from public sources. May be inaccurate. Report

Recent updates

  • 6.2.1

    1 month ago

    Release 6.2.1 has no release notes provided by the publisher. The code diff shows a version bump plus new test coverage for non-serializable inputs to JSON writing, alongside a small change in the underlying stringify behavior that standardizes the thrown error.

    Breaking
  • 6.2.0

    9 months ago

    Version 6.2.0 makes a small but important change to how the module exports are assigned in index.js to support ESM named imports. The rest of the diff mainly updates CI configuration (migrating from Travis to GitHub Actions) and adjusts build/test badges and Node version coverage in CI.

  • 6.1.0

    10/31/2020

    Release 6.1.0 was published on 2020-10-31, but the publisher did not provide release notes (none provided). As a result, this upgrade cannot be assessed for new features, bug fixes, breaking changes, security updates, or dependency changes based on the provided information alone.

  • 6.0.1

    3/7/2020

    Release 6.0.1 updates the jsonfile package version and makes a small internal code style tweak. The primary functional change is a dependency upgrade, plus corresponding changelog maintenance.

  • 6.0.0

    2/24/2020

    Version 6.0.0 is a major release that drops support for Node 6 and Node 8 and refactors the module internals to use async/await with promise-based wrappers. It also tightens option handling so passing null for options is no longer tolerated (and CI configs were updated accordingly).

    Breaking
  • 5.0.0

    9/8/2018

    Version 5.0.0 refactors the async JSON file APIs (readFile, writeFile) to use universalify, enabling promise-based usage when no callback is provided. The release also updates CI/tooling configuration to add newer Node versions and remove older ones.

    BreakingFeatures
  • 4.0.0

    9/12/2017

    No publisher release notes were provided for version 4.0.0. The code changes in this release indicate multiple breaking behavior changes around JSON formatting and read error handling, plus CI/runtime support updates.

  • 3.0.1

    7/5/2017

    Release 3.0.1 makes a targeted change to jsonfile's asynchronous writeFile error handling. When JSON serialization fails and no callback is provided, the library now stops before writing the file, preventing an empty/invalid file from being created.

    Breaking
  • v3.0.0

    4/25/2017

    v3.0.0 updates the jsonfile library and includes changes to README and tests. The most significant change is behavioral: readFileSync's options.throws handling was modified, particularly around filesystem errors vs JSON parsing errors.

    Breaking
  • 2.4.0

    9/16/2016

    Release 2.4.0 was published on 2016-09-16, but no release notes content was provided by the publisher. As a result, there is no documented information here about new features, fixes, breaking changes, or dependency updates.