@ -309,8 +309,7 @@ automatically considered in-memory only. It cannot end with a <code>~</code> whi
perform crash-safe writes. Not used if <code>options.inMemoryOnly</code> is <code>true</code>.</p>
- [.inMemoryOnly] <code>boolean</code><code> = false</code> - <p>If set to true, no data will be written in storage. This option has
priority over <code>options.filename</code>.</p>
- [.mode] <code>object</code> - <p>Permissions to use for FS. Only used for
Node.js storage module.</p>
- [.modes] <code>object</code> - <p>Permissions to use for FS. Only used for Node.js storage module. Will not work on Windows.</p>
- [.fileMode] <code>number</code><code> = 0o644</code> - <p>Permissions to use for database files</p>
- [.dirMode] <code>number</code><code> = 0o755</code> - <p>Permissions to use for database directories</p>
- [.timestampData] <code>boolean</code><code> = false</code> - <p>If set to true, createdAt and updatedAt will be created and
@ -838,7 +837,7 @@ with <code>appendfsync</code> option set to <code>no</code>.</p>
- [.corruptAlertThreshold] <code>Number</code> - <p>Optional, threshold after which an alert is thrown if too much data is corrupt</p>
- [.beforeDeserialization] [<code>serializationHook</code>](#serializationHook) - <p>Hook you can use to transform data after it was serialized and before it is written to disk.</p>
- [.afterSerialization] [<code>serializationHook</code>](#serializationHook) - <p>Inverse of <code>afterSerialization</code>.</p>
- [.mode] <code>object</code> - <p>Modes to use for FS permissions.</p>
- [.modes] <code>object</code> - <p>Modes to use for FS permissions. Will not work on Windows.</p>
- [.fileMode] <code>number</code><code> = 0o644</code> - <p>Mode to use for files.</p>
- [.dirMode] <code>number</code><code> = 0o755</code> - <p>Mode to use for directories.</p>
@ -13,7 +13,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
- An auto-generated JSDoc file is generated: [API.md](./API.md).
- Added `Datastore#dropDatabaseAsync` and its callback equivalent.
- The Error given when the `Datastore#corruptAlertThreshold` is reached now has three properties: `dataLength` which is the amount of lines in the database file (excluding empty lines), `corruptItems` which is the amount of corrupted lines, `corruptionRate` which the rate of corruption between 0 and 1.
- Added a `mode` option which allows to set the file and / or directory modes, by default, it uses `0o644` for files and `0o755` for directories, which may be breaking.
- Added a `modes: { fileMode, dirMode }` option to the Datastore which allows to set the file and / or directory modes, by default, it uses `0o644` for files and `0o755` for directories, which may be breaking.
### Changed
- The `corruptionAlertThreshold` now doesn't take into account empty lines, and the error message is slightly changed.