@nxtedition/rocksdb 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +294 -0
  2. package/LICENSE +21 -0
  3. package/README.md +102 -0
  4. package/UPGRADING.md +91 -0
  5. package/binding.cc +2120 -0
  6. package/binding.gyp +73 -0
  7. package/binding.js +1 -0
  8. package/chained-batch.js +30 -0
  9. package/deps/rocksdb/build_version.cc +4 -0
  10. package/deps/rocksdb/rocksdb.gyp +475 -0
  11. package/deps/snappy/freebsd/config.h +135 -0
  12. package/deps/snappy/freebsd/snappy-stubs-public.h +100 -0
  13. package/deps/snappy/linux/config.h +135 -0
  14. package/deps/snappy/linux/snappy-stubs-public.h +100 -0
  15. package/deps/snappy/mac/config.h +137 -0
  16. package/deps/snappy/mac/snappy-stubs-public.h +100 -0
  17. package/deps/snappy/openbsd/config.h +135 -0
  18. package/deps/snappy/openbsd/snappy-stubs-public.h +100 -0
  19. package/deps/snappy/snappy-1.1.7/COPYING +54 -0
  20. package/deps/snappy/snappy-1.1.7/cmake/SnappyConfig.cmake +1 -0
  21. package/deps/snappy/snappy-1.1.7/cmake/config.h.in +62 -0
  22. package/deps/snappy/snappy-1.1.7/snappy-c.cc +90 -0
  23. package/deps/snappy/snappy-1.1.7/snappy-c.h +138 -0
  24. package/deps/snappy/snappy-1.1.7/snappy-internal.h +224 -0
  25. package/deps/snappy/snappy-1.1.7/snappy-sinksource.cc +104 -0
  26. package/deps/snappy/snappy-1.1.7/snappy-sinksource.h +182 -0
  27. package/deps/snappy/snappy-1.1.7/snappy-stubs-internal.cc +42 -0
  28. package/deps/snappy/snappy-1.1.7/snappy-stubs-internal.h +561 -0
  29. package/deps/snappy/snappy-1.1.7/snappy-stubs-public.h.in +94 -0
  30. package/deps/snappy/snappy-1.1.7/snappy-test.cc +612 -0
  31. package/deps/snappy/snappy-1.1.7/snappy-test.h +573 -0
  32. package/deps/snappy/snappy-1.1.7/snappy.cc +1515 -0
  33. package/deps/snappy/snappy-1.1.7/snappy.h +203 -0
  34. package/deps/snappy/snappy-1.1.7/snappy_unittest.cc +1410 -0
  35. package/deps/snappy/snappy.gyp +90 -0
  36. package/deps/snappy/solaris/config.h +135 -0
  37. package/deps/snappy/solaris/snappy-stubs-public.h +100 -0
  38. package/deps/snappy/win32/config.h +29 -0
  39. package/deps/snappy/win32/snappy-stubs-public.h +100 -0
  40. package/iterator.js +50 -0
  41. package/leveldown.js +164 -0
  42. package/package.json +70 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,294 @@
1
+ # Changelog
2
+
3
+ ## [5.2.1] - 2022-03-25
4
+
5
+ ### Fixed
6
+
7
+ - Fix `getMany()` memory leak ([#193](https://github.com/Level/rocksdb/issues/193)) ([`680f94b`](https://github.com/Level/rocksdb/commit/680f94b)) (Vincent Weevers).
8
+
9
+ ## [5.2.0] - 2021-11-27
10
+
11
+ ### Changed
12
+
13
+ - Refactor: add Entry struct to abstract away key-value pairs ([`f9f99ec`](https://github.com/Level/rocksdb/commit/f9f99ec)) (Meirion Hughes, Vincent Weevers)
14
+ - Refactor: avoid storing `napi_env` ([`efb5721`](https://github.com/Level/rocksdb/commit/efb5721)) (Meirion Hughes, Vincent Weevers)
15
+ - Refactor: move CheckEndCallback to Iterator ([`caa28a5`](https://github.com/Level/rocksdb/commit/caa28a5)) (Meirion Hughes, Vincent Weevers)
16
+
17
+ ### Added
18
+
19
+ - Add `db.getMany(keys)` ([`e6ae598`](https://github.com/Level/rocksdb/commit/e6ae598)) (Meirion Hughes, Vincent Weevers)
20
+
21
+ ### Fixed
22
+
23
+ - Optimize `db.iterator()` ([`9f9b13c`](https://github.com/Level/rocksdb/commit/9f9b13c)) (Meirion Hughes, Vincent Weevers)
24
+ - Cleanup hanging iterator also when `next()` errored ([`b67bfe7`](https://github.com/Level/rocksdb/commit/b67bfe7)) (Meirion Hughes, Vincent Weevers)
25
+ - Prevent GC of db during `clear()` and other operations ([`b9878e8`](https://github.com/Level/rocksdb/commit/b9878e8)) (Meirion Hughes, Vincent Weevers)
26
+ - Make `db.clear()` 27x faster by doing it natively ([`32e9b5d`](https://github.com/Level/rocksdb/commit/32e9b5d)) (Meirion Hughes, Vincent Weevers)
27
+ - Close database on environment exit ([`54fc5df`](https://github.com/Level/rocksdb/commit/54fc5df)) (Meirion Hughes, Vincent Weevers).
28
+
29
+ ## [5.1.1] - 2021-09-28
30
+
31
+ ### Fixed
32
+
33
+ - Build a universal binary to support M1 (Apple silicon) ([#181](https://github.com/Level/rocksdb/issues/181)) ([`0bda9ba`](https://github.com/Level/rocksdb/commit/0bda9ba)) (Juan Gonzalez).
34
+
35
+ ## [5.1.0] - 2021-08-28
36
+
37
+ ### Added
38
+
39
+ - Add prebuilt binary for Alpine ([#174](https://github.com/Level/rocksdb/issues/174)) ([`185951d`](https://github.com/Level/rocksdb/commit/185951d)) (Vincent Weevers)
40
+
41
+ ### Fixed
42
+
43
+ - Support `approximateSize()` on db bigger than 4 GB ([#175](https://github.com/Level/rocksdb/issues/175)) ([`891bb7a`](https://github.com/Level/rocksdb/commit/891bb7a)) (Lars Kuhtz)
44
+ - Remove `march=native` flag for Apple silicon compatibility ([#171](https://github.com/Level/rocksdb/issues/171)) ([`f945be6`](https://github.com/Level/rocksdb/commit/f945be6)) (Juan Gonzalez)
45
+
46
+ ## [5.0.0] - 2021-04-17
47
+
48
+ _If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
49
+
50
+ ### Changed
51
+
52
+ - **Breaking:** bump `abstract-leveldown` ([`e6b9182`](https://github.com/Level/rocksdb/commit/e6b9182), [`271894f`](https://github.com/Level/rocksdb/commit/271894f)) (Vincent Weevers)
53
+ - **Breaking:** upgrade to RocksDB 6.17.3 ([`060d182`](https://github.com/Level/rocksdb/commit/060d182)) (Denis Yaremov)
54
+ - Move RocksDB to git submodule ([`1b6ea11`](https://github.com/Level/rocksdb/commit/1b6ea11), [`28b37fa`](https://github.com/Level/rocksdb/commit/28b37fa)) (Philippe Schommers)
55
+ - Replace Ubuntu 16.04 with CentOS 7 for prebuilds ([#153](https://github.com/Level/rocksdb/issues/153)) ([`6b2ebb7`](https://github.com/Level/rocksdb/commit/6b2ebb7)) (Vincent Weevers). This makes the prebuilt binary for linux compatible with Debian 8, Ubuntu 14.04, RHEL 7, CentOS 7 and other flavors with an old glibc.
56
+ - Bump `node-gyp` from 5.x to 7.x ([`2d20d18`](https://github.com/Level/rocksdb/commit/2d20d18), [`9d36809`](https://github.com/Level/rocksdb/commit/9d36809)) (Vincent Weevers)
57
+ - Bump `node-gyp-build` and unlock `napi-macros` ([`4c45b5f`](https://github.com/Level/rocksdb/commit/4c45b5f)) (Vincent Weevers)
58
+ - Skip stack exhaustion test ([`69e3dcb`](https://github.com/Level/rocksdb/commit/69e3dcb)) (Vincent Weevers)
59
+ - Refactor initial seek ([`949afd2`](https://github.com/Level/rocksdb/commit/949afd2)) (Vincent Weevers)
60
+ - Make iterator seek target a local variable ([`9b08726`](https://github.com/Level/rocksdb/commit/9b08726)) (Vincent Weevers)
61
+ - Refactor initialization of range options ([`99918c5`](https://github.com/Level/rocksdb/commit/99918c5)) (Vincent Weevers)
62
+
63
+ ### Added
64
+
65
+ - Add manifest ([Level/community#83](https://github.com/Level/community/issues/83)) ([`5eee577`](https://github.com/Level/rocksdb/commit/5eee577)) (Vincent Weevers)
66
+ - Test that empty range options are ignored ([`4888b97`](https://github.com/Level/rocksdb/commit/4888b97)) (Vincent Weevers)
67
+
68
+ ### Removed
69
+
70
+ - **Breaking:** drop node 8 ([Level/community#98](https://github.com/Level/community/issues/98)) ([`05aefaa`](https://github.com/Level/rocksdb/commit/05aefaa), [`fd69183`](https://github.com/Level/rocksdb/commit/fd69183)) (Vincent Weevers)
71
+ - Remove default export ([Level/community#87](https://github.com/Level/community/issues/87)) ([`43c1544`](https://github.com/Level/rocksdb/commit/43c1544)) (Vincent Weevers)
72
+
73
+ ### Fixed
74
+
75
+ - Hide symbols on mac with `-fvisibility=hidden` ([#150](https://github.com/Level/rocksdb/issues/150)) ([`e2e09c9`](https://github.com/Level/rocksdb/commit/e2e09c9)) (Vincent Weevers)
76
+ - Close db in `stack-blower` test ([`1925392`](https://github.com/Level/rocksdb/commit/1925392)) (Vincent Weevers)
77
+ - Fix `test-gc` script ([`2c41d3b`](https://github.com/Level/rocksdb/commit/2c41d3b)) (Vincent Weevers)
78
+
79
+ ## [4.1.0] - 2019-09-20
80
+
81
+ ### Added
82
+
83
+ - Support clear() ([Level/community#79](https://github.com/Level/community/issues/79)) ([`b9d58fb`](https://github.com/Level/rocksdb/commit/b9d58fb)) ([**@vweevers**](https://github.com/vweevers))
84
+
85
+ ## [4.0.1] - 2019-09-07
86
+
87
+ ### Changed
88
+
89
+ - Remove `fast-future` in favor of native cache limit ([#133](https://github.com/Level/rocksdb/issues/133)) ([**@vweevers**](https://github.com/vweevers))
90
+ - Upgrade `napi-macros` from `~1.8.1` to `~2.0.0` ([#132](https://github.com/Level/rocksdb/issues/132)) ([**@vweevers**](https://github.com/vweevers))
91
+ - Upgrade `hallmark` devDependency from `^0.1.0` to `^2.0.0` ([#127](https://github.com/Level/rocksdb/issues/127), [#138](https://github.com/Level/rocksdb/issues/138)) ([**@vweevers**](https://github.com/vweevers))
92
+ - Upgrade `standard` devDependency from `^12.0.0` to `^14.0.0` ([#126](https://github.com/Level/rocksdb/issues/126), [#137](https://github.com/Level/rocksdb/issues/137)) ([**@vweevers**](https://github.com/vweevers))
93
+ - Upgrade `rimraf` devDependency from `^2.6.1` to `^3.0.0` ([#135](https://github.com/Level/rocksdb/issues/135)) ([**@vweevers**](https://github.com/vweevers))
94
+ - Upgrade `electron` devDependency from `^5.0.1` to `^6.0.0` ([#130](https://github.com/Level/rocksdb/issues/130)) ([**@vweevers**](https://github.com/vweevers))
95
+ - Upgrade `delayed` devDependency from `^1.0.1` to `^2.0.0` ([#124](https://github.com/Level/rocksdb/issues/124)) ([**@vweevers**](https://github.com/vweevers))
96
+ - Upgrade `readfiletree` devDependency from `~0.0.1` to `^1.0.0` ([#122](https://github.com/Level/rocksdb/issues/122)) ([**@vweevers**](https://github.com/vweevers))
97
+ - Upgrade `du` devDependency from `~0.1.0` to `^1.0.0` ([#123](https://github.com/Level/rocksdb/issues/123)) ([**@vweevers**](https://github.com/vweevers))
98
+ - Upgrade `mkfiletree` devDependency from `^1.0.1` to `^2.0.0` ([#121](https://github.com/Level/rocksdb/issues/121)) ([**@vweevers**](https://github.com/vweevers))
99
+ - Upgrade `node-gyp` devDependency from `^4.0.0` to `^5.0.0` ([#119](https://github.com/Level/rocksdb/issues/119)) ([**@vweevers**](https://github.com/vweevers))
100
+
101
+ ### Fixed
102
+
103
+ - Fix batch compression test to actually compress ([#134](https://github.com/Level/rocksdb/issues/134)) ([**@vweevers**](https://github.com/vweevers))
104
+
105
+ ## [4.0.0] - 2019-06-08
106
+
107
+ _Many commits between 3.1.0 and 4.0.0 are not listed here, because they became irrelevant once we rewrote `rocksdb` as an N-API addon by importing code from `leveldown` - essentially starting from scratch. This version of `rocksdb` includes all relevant changes and bugfixes of (up to and including) [`leveldown@5.1.0`](https://github.com/Level/leveldown/blob/master/CHANGELOG.md). Please refer to [`UPGRADING.md`](UPGRADING.md) for a complete description of breaking changes in the context of `rocksdb`._
108
+
109
+ ### Changed
110
+
111
+ - Replace source with N-API binding and JS from [`leveldown`](https://github.com/Level/leveldown) ([`c6957d0`](https://github.com/Level/rocksdb/commit/c6957d0)) ([#111](https://github.com/Level/rocksdb/issues/111)) ([**@vweevers**](https://github.com/vweevers))
112
+ - Restore RocksDB includes and options ([`3843dc0`](https://github.com/Level/rocksdb/commit/3843dc0)) ([#111](https://github.com/Level/rocksdb/issues/111)) ([**@vweevers**](https://github.com/vweevers))
113
+ - Restore RocksDB test specifics ([`334af2c`](https://github.com/Level/rocksdb/commit/334af2c)) ([#111](https://github.com/Level/rocksdb/issues/111)) ([**@vweevers**](https://github.com/vweevers))
114
+ - Setup [`prebuildify`](https://github.com/prebuild/prebuildify) and Electron tests ([`69f5f66`](https://github.com/Level/rocksdb/commit/69f5f66), [`ea6d0df`](https://github.com/Level/rocksdb/commit/ea6d0df)) ([#111](https://github.com/Level/rocksdb/issues/111)) ([**@vweevers**](https://github.com/vweevers))
115
+ - Disable info log by default and add `infoLogLevel` option ([#114](https://github.com/Level/rocksdb/issues/114)) ([`002d836`](https://github.com/Level/rocksdb/commit/002d836)) ([**@vweevers**](https://github.com/vweevers)) (this removed the need for [`53599da`](https://github.com/Level/rocksdb/commit/53599da))
116
+ - Replace `async` devDependency with `async-each` ([#116](https://github.com/Level/rocksdb/issues/116)) ([`5678c16`](https://github.com/Level/rocksdb/commit/5678c16)) ([**@vweevers**](https://github.com/vweevers))
117
+ - Tweak `README.md` and package description ([#112](https://github.com/Level/rocksdb/issues/112)) ([`a0f6ace`](https://github.com/Level/rocksdb/commit/a0f6ace)) ([**@vweevers**](https://github.com/vweevers))
118
+ - Remove outdated `Getting Support` section from `README.md` ([`2c2ebc5`](https://github.com/Level/rocksdb/commit/2c2ebc5)) ([**@vweevers**](https://github.com/vweevers))
119
+ - Upgrade `tempy` devDependency from `^0.2.1` to `^0.3.0` ([`66f16bd`](https://github.com/Level/rocksdb/commit/66f16bd)) ([**@vweevers**](https://github.com/vweevers))
120
+ - Upgrade `nyc` devDependency from `^13.2.0` to `^14.0.0` ([#104](https://github.com/Level/rocksdb/issues/104)) ([`03746d0`](https://github.com/Level/rocksdb/commit/03746d0)) ([**@vweevers**](https://github.com/vweevers))
121
+
122
+ ### Removed
123
+
124
+ - Drop node < 8.6.0 ([`b294106`](https://github.com/Level/rocksdb/commit/b294106)) ([#111](https://github.com/Level/rocksdb/issues/111)) ([**@vweevers**](https://github.com/vweevers))
125
+ - Remove outdated `Dockerfile` and `.dntrc` ([`fab2d10`](https://github.com/Level/rocksdb/commit/fab2d10)) ([**@vweevers**](https://github.com/vweevers))
126
+ - Remove benchmarks ([#77](https://github.com/Level/rocksdb/issues/77)) ([**@vweevers**](https://github.com/vweevers)) (since moved to [`level-bench`](https://github.com/Level/bench))
127
+ - Remove 32 bits from AppVeyor ([#77](https://github.com/Level/rocksdb/issues/77)) ([**@ralphtheninja**](https://github.com/ralphtheninja))
128
+
129
+ ### Fixed
130
+
131
+ - Fix Level badge ([`84bc345`](https://github.com/Level/rocksdb/commit/84bc345)) ([**@vweevers**](https://github.com/vweevers))
132
+
133
+ ## [3.1.0] - 2019-04-21
134
+
135
+ ### Changed
136
+
137
+ - Upgrade `bindings` from `~1.3.0` to `~1.5.0` ([#95](https://github.com/Level/rocksdb/issues/95)) ([**@vweevers**](https://github.com/vweevers))
138
+ - Upgrade `nan` from `~2.11.0` to `~2.13.2` ([#89](https://github.com/Level/rocksdb/issues/89), [#97](https://github.com/Level/rocksdb/issues/97)) ([**@vweevers**](https://github.com/vweevers))
139
+ - Upgrade `nyc` devDependency from `^12.0.2` to `^13.2.0` ([#92](https://github.com/Level/rocksdb/issues/92)) ([**@vweevers**](https://github.com/vweevers))
140
+ - Apply common project tweaks ([#90](https://github.com/Level/rocksdb/issues/90), [#91](https://github.com/Level/rocksdb/issues/91)) ([**@vweevers**](https://github.com/vweevers))
141
+
142
+ ### Added
143
+
144
+ - Add `readOnly` option ([#98](https://github.com/Level/rocksdb/issues/98)) ([**@eugeneware**](https://github.com/eugeneware))
145
+
146
+ ### Removed
147
+
148
+ - Remove `prebuild` script from `package.json` ([#102](https://github.com/Level/rocksdb/issues/102)) ([**@vweevers**](https://github.com/vweevers))
149
+ - Remove link to dead website ([`2430b09`](https://github.com/Level/rocksdb/commit/2430b09)) ([**@vweevers**](https://github.com/vweevers))
150
+
151
+ ### Fixed
152
+
153
+ - Fix subtests by adding `t.plan()` ([#94](https://github.com/Level/rocksdb/issues/94)) ([**@vweevers**](https://github.com/vweevers))
154
+ - Gitignore debug builds of dependencies ([#101](https://github.com/Level/rocksdb/issues/101)) ([**@vweevers**](https://github.com/vweevers))
155
+ - Npmignore Windows builds, RocksDB docs, tools and more ([#101](https://github.com/Level/rocksdb/issues/101)) ([**@vweevers**](https://github.com/vweevers))
156
+
157
+ ## [3.0.3] - 2018-12-09
158
+
159
+ ### Changed
160
+
161
+ - Upgrade `slump` devDependency from `~2.0.0` to `~3.0.0` ([#76](https://github.com/Level/rocksdb/issues/76)) ([**@vweevers**](https://github.com/vweevers))
162
+
163
+ ### Fixed
164
+
165
+ - Add `sys/sysmacros.h` for build on modern glibc ([#86](https://github.com/Level/rocksdb/issues/86)) ([**@lachesis**](https://github.com/lachesis))
166
+
167
+ ### Removed
168
+
169
+ - Remove unused `port-libuv` directory ([#81](https://github.com/Level/rocksdb/issues/81)) ([**@filoozom**](https://github.com/filoozom))
170
+
171
+ ## [3.0.2] - 2018-10-25
172
+
173
+ ### Changed
174
+
175
+ - Upgrade `Snappy` to `1.1.7` ([**@filoozom**](https://github.com/filoozom))
176
+
177
+ ## [3.0.1] - 2018-05-22
178
+
179
+ ### Added
180
+
181
+ - Add upgrade guide ([**@ralphtheninja**](https://github.com/ralphtheninja))
182
+
183
+ ### Changed
184
+
185
+ - Upgrade to `abstract-leveldown@~5.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
186
+
187
+ ## [3.0.0] - 2018-05-21
188
+
189
+ _If you are upgrading: please see [`UPGRADING.md`](UPGRADING.md)._
190
+
191
+ ### Added
192
+
193
+ - Add node 10 to Travis and AppVeyor ([**@ralphtheninja**](https://github.com/ralphtheninja))
194
+ - Add default export ([**@meirionhughes**](https://github.com/meirionhughes))
195
+ - Add `standard` ([**@ralphtheninja**](https://github.com/ralphtheninja))
196
+
197
+ ### Changed
198
+
199
+ - Upgrade to `nan@2.10.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
200
+ - Upgrade to `prebuild-install@4.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
201
+ - Upgrade to `verify-travis-appveyor@3.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
202
+ - Replace deprecated `node-uuid` with `uuid` ([**@ralphtheninja**](https://github.com/ralphtheninja))
203
+
204
+ ### Fixed
205
+
206
+ - Fix nan deprecation warnings ([**@ralphtheninja**](https://github.com/ralphtheninja))
207
+
208
+ ### Removed
209
+
210
+ - Remove node 4 from Travis and AppVeyor ([**@ralphtheninja**](https://github.com/ralphtheninja))
211
+ - Remove TypeScript typings ([**@meirionhughes**](https://github.com/meirionhughes), [**@ralphtheninja**](https://github.com/ralphtheninja))
212
+
213
+ ## [2.0.0] - 2018-02-12
214
+
215
+ ### Added
216
+
217
+ - Add `verify-travis-appveyor` to tests ([**@ralphtheninja**](https://github.com/ralphtheninja))
218
+ - Add node 9 to Travis and AppVeyor ([**@ralphtheninja**](https://github.com/ralphtheninja))
219
+
220
+ ### Changed
221
+
222
+ - Upgrade to `abstract-leveldown@3.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
223
+ - Tweak badges in README ([**@vweevers**](https://github.com/vweevers))
224
+ - Simplify AppVeyor configuration ([**@vweevers**](https://github.com/vweevers))
225
+ - Upgrade to `nan@2.8.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
226
+ - Upgrade to `prebuild@7.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
227
+ - Upgrade to `abstract-leveldown@4.0.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
228
+
229
+ ### Fixed
230
+
231
+ - Fix destroy on Windows ([**@vweevers**](https://github.com/vweevers))
232
+
233
+ ### Removed
234
+
235
+ - Remove node 7 from Travis and AppVeyor ([**@ralphtheninja**](https://github.com/ralphtheninja))
236
+
237
+ ## [1.1.0] - 2017-09-16
238
+
239
+ ### Added
240
+
241
+ - Add TypeScript typings ([**@meirionhughes**](https://github.com/meirionhughes))
242
+
243
+ ### Changed
244
+
245
+ - Upgrade to `nan@2.7.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
246
+ - Upgrade to `abstract-leveldown@2.7.0` ([**@ralphtheninja**](https://github.com/ralphtheninja))
247
+
248
+ ## [1.0.1] - 2017-08-27
249
+
250
+ ### Added
251
+
252
+ - Add Greenkeeper badge ([**@ralphtheninja**](https://github.com/ralphtheninja))
253
+
254
+ ### Changed
255
+
256
+ - Update dependencies ([**@ralphtheninja**](https://github.com/ralphtheninja))
257
+
258
+ ## [1.0.0] - 2017-07-01
259
+
260
+ _Earlier versions were published before `v1.0.0` but the code was then a branch inside [`leveldown`](https://github.com/Level/leveldown). This version marks the point where that code was extracted into its own repository thanks to the work of [`@mcollina`](https://github.com/mcollina)._
261
+
262
+ [5.2.1]: https://github.com/Level/rocksdb/releases/tag/v5.2.1
263
+
264
+ [5.2.0]: https://github.com/Level/rocksdb/releases/tag/v5.2.0
265
+
266
+ [5.1.1]: https://github.com/Level/rocksdb/compare/v5.1.0...v5.1.1
267
+
268
+ [5.1.0]: https://github.com/Level/rocksdb/releases/tag/v5.1.0
269
+
270
+ [5.0.0]: https://github.com/Level/rocksdb/releases/tag/v5.0.0
271
+
272
+ [4.1.0]: https://github.com/Level/rocksdb/releases/tag/v4.1.0
273
+
274
+ [4.0.1]: https://github.com/Level/rocksdb/releases/tag/v4.0.1
275
+
276
+ [4.0.0]: https://github.com/Level/rocksdb/releases/tag/v4.0.0
277
+
278
+ [3.1.0]: https://github.com/Level/rocksdb/releases/tag/v3.1.0
279
+
280
+ [3.0.3]: https://github.com/Level/rocksdb/releases/tag/v3.0.3
281
+
282
+ [3.0.2]: https://github.com/Level/rocksdb/releases/tag/v3.0.2
283
+
284
+ [3.0.1]: https://github.com/Level/rocksdb/releases/tag/v3.0.1
285
+
286
+ [3.0.0]: https://github.com/Level/rocksdb/releases/tag/v3.0.0
287
+
288
+ [2.0.0]: https://github.com/Level/rocksdb/releases/tag/v2.0.0
289
+
290
+ [1.1.0]: https://github.com/Level/rocksdb/releases/tag/v1.1.0
291
+
292
+ [1.0.1]: https://github.com/Level/rocksdb/releases/tag/v1.0.1
293
+
294
+ [1.0.0]: https://github.com/Level/rocksdb/releases/tag/v1.0.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2012 Rod Vagg and the contributors to rocksdb.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,102 @@
1
+ # rocksdb
2
+
3
+ > A low-level Node.js RocksDB binding. An [`abstract-leveldown`](https://github.com/Level/abstract-leveldown) compliant store.
4
+
5
+ [![level badge][level-badge]](https://github.com/Level/awesome)
6
+ [![npm](https://img.shields.io/npm/v/rocksdb.svg)](https://www.npmjs.com/package/rocksdb)
7
+ [![Node version](https://img.shields.io/node/v/rocksdb.svg)](https://www.npmjs.com/package/rocksdb)
8
+ [![Test](https://img.shields.io/github/workflow/status/Level/rocksdb/Test?label=test)](https://github.com/Level/rocksdb/actions/workflows/test.yml)
9
+ [![Coverage](https://img.shields.io/codecov/c/github/Level/rocksdb?label=\&logo=codecov\&logoColor=fff)](https://codecov.io/gh/Level/rocksdb)
10
+ [![Standard](https://img.shields.io/badge/standard-informational?logo=javascript\&logoColor=fff)](https://standardjs.com)
11
+ [![Common Changelog](https://common-changelog.org/badge.svg)](https://common-changelog.org)
12
+ [![Donate](https://img.shields.io/badge/donate-orange?logo=open-collective\&logoColor=fff)](https://opencollective.com/level)
13
+
14
+ ## Table of Contents
15
+
16
+ <details><summary>Click to expand</summary>
17
+
18
+ - [Introduction](#introduction)
19
+ - [Supported Platforms](#supported-platforms)
20
+ - [API](#api)
21
+ - [Contributing](#contributing)
22
+ - [Git Submodules](#git-submodules)
23
+ - [Publishing](#publishing)
24
+ - [Donate](#donate)
25
+ - [License](#license)
26
+
27
+ </details>
28
+
29
+ ## Introduction
30
+
31
+ This module closely follows [`leveldown`](https://github.com/Level/leveldown) and implements the same API. The difference is that `leveldown` is a binding for [LevelDB](https://github.com/google/leveldb) while `rocksdb` is a binding for [RocksDB, Facebook's fork of LevelDB](https://github.com/facebook/rocksdb).
32
+
33
+ It is **strongly recommended** that you use `levelup` in preference to `rocksdb` unless you have measurable performance reasons to do so. `levelup` is optimized for usability and safety. Although we are working to improve the safety of the `rocksdb` interface it is still easy to crash your Node process if you don't do things in just the right way.
34
+
35
+ **If you are upgrading:** please see [UPGRADING.md](UPGRADING.md).
36
+
37
+ ## Supported Platforms
38
+
39
+ We aim to support _at least_ Active LTS and Current Node.js releases, Electron 5.0.0, as well as any future Node.js and Electron releases thanks to [N-API](https://nodejs.org/api/n-api.html). The minimum node version for `rocksdb` is `10.12.0`.
40
+
41
+ The `rocksdb` npm package ships with prebuilt binaries for popular 64-bit platforms and is known to work on:
42
+
43
+ - **Linux** (including ARM platforms such as Raspberry Pi and Kindle)
44
+ - **Mac OS**
45
+ - **Solaris** (SmartOS & Nodejitsu)
46
+ - **FreeBSD**
47
+ - **Windows**
48
+
49
+ When installing `rocksdb`, [`node-gyp-build`](https://github.com/prebuild/node-gyp-build) will check if a compatible binary exists and fallback to a compile step if it doesn't. In that case you'll need a [valid `node-gyp` installation](https://github.com/nodejs/node-gyp#installation).
50
+
51
+ If you don't want to use the prebuilt binary for the platform you are installing on, specify the `--build-from-source` flag when you install. If you are working on `rocksdb` itself and want to re-compile the C++ code it's enough to do `npm install`.
52
+
53
+ ## API
54
+
55
+ Please refer to [`leveldown`](https://github.com/Level/leveldown#api) for API documentation. The `db.open(options, callback)` method of `rocksdb` has a few additional options:
56
+
57
+ - `readOnly` (boolean, default `false`): open database in read-only mode.
58
+ - `infoLogLevel` (string, default `null`): verbosity of info log. One of `'debug'`, `'info'`, `'warn'`, `'error'`, `'fatal'`, `'header'` or `null` (disable).
59
+
60
+ ## Contributing
61
+
62
+ [`Level/rocksdb`](https://github.com/Level/rocksdb) is an **OPEN Open Source Project**. This means that:
63
+
64
+ > Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
65
+
66
+ See the [Contribution Guide](https://github.com/Level/community/blob/master/CONTRIBUTING.md) for more details.
67
+
68
+ ### Git Submodules
69
+
70
+ This project uses Git Submodules. This means that you should clone it recursively if you're planning on working on it:
71
+
72
+ ```bash
73
+ $ git clone --recurse-submodules https://github.com/Level/rocksdb.git
74
+ ```
75
+
76
+ Alternatively, you can initialize submodules after cloning:
77
+
78
+ ```bash
79
+ $ git submodule update --init --recursive
80
+ ```
81
+
82
+ ### Publishing
83
+
84
+ 1. Increment the version: `npm version ..`
85
+ 2. Push to GitHub: `git push --follow-tags`
86
+ 3. Wait for CI to complete
87
+ 4. Download prebuilds into `./prebuilds`: `npm run download-prebuilds`
88
+ 5. Optionally verify loading a prebuild: `npm run test-prebuild`
89
+ 6. Optionally verify which files npm will include: `canadian-pub`
90
+ 7. Finally: `npm publish`
91
+
92
+ ## Donate
93
+
94
+ Support us with a monthly donation on [Open Collective](https://opencollective.com/level) and help us continue our work.
95
+
96
+ ## License
97
+
98
+ [MIT](LICENSE)
99
+
100
+ _`rocksdb` builds on the excellent work of the LevelDB and Snappy teams from Google and additional contributors to the LevelDB fork by Facebook. LevelDB and Snappy are both issued under the [New BSD License](http://opensource.org/licenses/BSD-3-Clause). A large portion of `rocksdb` Windows support comes from the [Windows LevelDB port](http://code.google.com/r/kkowalczyk-leveldb/) (archived) by [Krzysztof Kowalczyk](http://blog.kowalczyk.info/) ([`@kjk`](https://twitter.com/kjk)). If you're using `rocksdb` on Windows, you should give him your thanks!_
101
+
102
+ [level-badge]: https://leveljs.org/img/badge.svg
package/UPGRADING.md ADDED
@@ -0,0 +1,91 @@
1
+ # Upgrade Guide
2
+
3
+ This document describes breaking changes and how to upgrade. For a complete list of changes including minor and patch releases, please refer to the [changelog](CHANGELOG.md).
4
+
5
+ ## 5.0.0
6
+
7
+ Legacy range options have been removed ([Level/community#86](https://github.com/Level/community/issues/86)). If you previously did:
8
+
9
+ ```js
10
+ db.iterator({ start: 'a', end: 'z' })
11
+ ```
12
+
13
+ An error would now be thrown and you must instead do:
14
+
15
+ ```js
16
+ db.iterator({ gte: 'a', lte: 'z' })
17
+ ```
18
+
19
+ A db created or opened with this release cannot be opened by earlier versions, because RocksDB has been upgraded to 6.17.3 which effectively changes the default [`format_version`](https://rocksdb.org/blog/2019/03/08/format-version-4.html) from 2 to 4.
20
+
21
+ This release also drops support of Node.js 8 ([Level/community#98](https://github.com/Level/community/issues/98)).
22
+
23
+ ## 4.0.0
24
+
25
+ **This is a rewrite to N-API and an upgrade to `abstract-leveldown` v6, which solves long-standing issues around serialization and type support.**
26
+
27
+ ### N-API rewrite
28
+
29
+ N-API is the latest interface for native addons in Node.js. Main benefit is that `rocksdb` became independent of the V8 version, which means it will be compatible with future versions of Node.js. As long as the native code doesn't change, it doesn't need to be recompiled as new versions of Node.js are released. This helps greatly with both maintenance and when delivering code to consumers.
30
+
31
+ Because N-API has an experimental status in node 6 and early 8.x releases, support of node 6 has been dropped and the minimum node version for `rocksdb` is now 8.6.0. Conversely, for node >= 12, `rocksdb@4` is the minimum version.
32
+
33
+ ### Prebuilt binaries are now shipped in npm package
34
+
35
+ Previously, they were downloaded from GitHub by an npm `postinstall` script. Prebuilds for 32 bits Windows are no longer included.
36
+
37
+ ### Info log is disabled by default
38
+
39
+ RocksDB writes debug information to this log (a file on disk). Should you need this RocksDB feature, it can be enabled with a new `infoLogLevel` option. Please see [`README.md`](README.md) for details.
40
+
41
+ ### Range options are now serialized
42
+
43
+ Previously, range options like `lt` were passed through as-is by `abstract-leveldown`, unlike keys. For `rocksdb` it means that range option types other than a string or Buffer will be stringified.
44
+
45
+ ### The rules for range options have been relaxed
46
+
47
+ Because `null`, `undefined`, zero-length strings and zero-length buffers are significant types in encodings like `bytewise` and `charwise`, they became valid as range options in `abstract-leveldown`. This means `db.iterator({ gt: undefined })` is not the same as `db.iterator({})`.
48
+
49
+ In the case of `rocksdb`, when used by itself, the aforementioned change means that `db.iterator({ gt: undefined })` is now effectively the same as `db.iterator({ gt: 'undefined' })`, making it explicit that `rocksdb` only supports strings and buffers.
50
+
51
+ ### Seeking became part of official `abstract-leveldown` API
52
+
53
+ As a result of this, the `target` argument in `iterator.seek(target)` is now serialized. Meaning any type other than a string or Buffer will be stringified. Like before, if the result is a zero-length string or Buffer, an error will be thrown.
54
+
55
+ ### Nullish values are rejected
56
+
57
+ In addition to rejecting `null` and `undefined` as _keys_, `abstract-leveldown` now also rejects these types as _values_, due to preexisting significance in streams and iterators.
58
+
59
+ ### Zero-length array keys are rejected
60
+
61
+ Though this was already the case, `abstract-leveldown` has replaced the behavior with an explicit `Array.isArray()` check and a new error message.
62
+
63
+ ### The `sync` option of `chainedBatch` has moved
64
+
65
+ The `sync` option has moved to `chainedBatch.write(options)`. Previously, `sync` was half-documented and half-implemented.
66
+
67
+ ### Various segmentation faults have been fixed
68
+
69
+ It is now safe to call `db.close()` before operations like `db.put()` complete, to call `db.iterator()` on a non-open db and to call `db.close()` having created many iterators regardless of their state (idle, nexting, ending or ended). To achieve this, `rocksdb` waits for pending operations before closing:
70
+
71
+ ```js
72
+ db.put('key', 'value', function (err) {
73
+ console.log('this happens first')
74
+ })
75
+
76
+ db.close(function (err) {
77
+ console.log('this happens second')
78
+ })
79
+ ```
80
+
81
+ ## 3.0.0
82
+
83
+ Dropped support for node 4. No other breaking changes.
84
+
85
+ ## 2.0.0
86
+
87
+ #### `.batch(array)` enforces objects
88
+
89
+ This major release contains an upgrade to `abstract-leveldown` with a [breaking change](https://github.com/Level/abstract-leveldown/commit/a2621ad70571f6ade9d2be42632ece042e068805) for the array version of `.batch()`. This change ensures all elements in the batch array are objects.
90
+
91
+ If you previously passed arrays to `.batch()` that contained `undefined` or `null`, they would be silently ignored. Now this will produce an error.