Compare commits

...

4 Commits

Author SHA1 Message Date
Timothée Rebours d4c096b07a Fix type of Cursor to extend Promise<Document<T>> instead of Promise<T> (#45) 11 months ago
Timothée Rebours 29cce2da81 lint 11 months ago
tex0l 20b0ec441e
Merge pull request #34 from maxdaniel98/chunk-split-fix 11 months ago
Max van den Bosch 1b06173209
Add require Buffer to allow for Buffer.isBuffer() 2 years ago
  1. 5
      CHANGELOG.md
  2. 2
      index.d.ts
  3. 1
      lib/byline.js

@ -6,6 +6,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased
### Fixed
- Explicitly import `buffer` [#34](https://github.com/seald/nedb/pull/34).
- Fix `Cursor`'s typings [#45](https://github.com/seald/nedb/issues/45)
## [4.0.3] - 2023-12-13 ## [4.0.3] - 2023-12-13
### Fixed ### Fixed
- Fixed EPERM Exception when datastore is at the root of a disk on Windows [#48](https://github.com/seald/nedb/issues/48) - Fixed EPERM Exception when datastore is at the root of a disk on Windows [#48](https://github.com/seald/nedb/issues/48)

2
index.d.ts vendored

@ -149,7 +149,7 @@ declare class Nedb<Schema = Record<string, any>> extends EventEmitter {
} }
declare namespace Nedb { declare namespace Nedb {
interface Cursor<T> extends Promise<T> { interface Cursor<T> extends Promise<Document<T>> {
sort(query: any): Cursor<T>; sort(query: any): Cursor<T>;
skip(n: number): Cursor<T>; skip(n: number): Cursor<T>;
limit(n: number): Cursor<T>; limit(n: number): Cursor<T>;

@ -25,6 +25,7 @@
*/ */
const stream = require('stream') const stream = require('stream')
const timers = require('timers') const timers = require('timers')
const { Buffer } = require('buffer')
const createLineStream = (readStream, options) => { const createLineStream = (readStream, options) => {
if (!readStream) throw new Error('expected readStream') if (!readStream) throw new Error('expected readStream')

Loading…
Cancel
Save