Warehouse is a simple JSON-based database library for Node.js, providing a robust interface for managing data through Models, Schemas, and a flexible querying system. It is notably the underlying data store for the Hexo static site generator. The current stable version is 6.0.0, released recently in 2024, indicating active development. The project maintains a consistent release cadence with significant updates, including performance improvements and type refinements in recent major versions. Key differentiators include its focus on a structured schema-driven approach for JSON data, a powerful query engine, and strong TypeScript support, making it suitable for applications requiring local data persistence and structured access without a full-fledged SQL or NoSQL server. It has dropped support for older Node.js versions, currently requiring Node.js 18 or higher.
npm install warehouseVerified import paths — ran on the pinned version, not inferred.
Initializes a Warehouse database, defines a 'Post' model with a schema including a default date, and demonstrates inserting a new post.
Upgrade your Node.js environment to version 18 or higher before upgrading to Warehouse v6.0.0.
Refactor any direct `Database` instantiations or custom `SchemaType` definitions to use modern JavaScript class syntax (`class MyClass extends Base { ... }`). Refer to the official documentation or release notes for examples.Review your model export logic and replace deprecated `exportAsync()` calls with the new API methods introduced in v4.0.0 as per the documentation.
Always check the `engines` field in `package.json` or the release notes (`BREAKING CHANGES`) before upgrading major versions of 'warehouse' to ensure Node.js compatibility and update your environment accordingly.
Upgrade to Warehouse v4.0.2 or higher to resolve the underlying bug related to JSONStream handling.
Ensure you are importing `Database` correctly for your module system (`require('warehouse')` or `import Database from 'warehouse'`) and that you are instantiating it with the `new` keyword (e.g., `const db = new Database();`).Upgrade your Node.js environment to meet the minimum version specified in the `engines` field of the `warehouse` package's `package.json` file.
No dependency data recorded yet.