bfj 9.1.0 → 9.1.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.
package/HISTORY.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # History
2
2
 
3
+ ## 9.1.1
4
+
5
+ ### Bug fixes
6
+
7
+ * streamify: ensure array/object value are always followed by comma (a3ad4cbced8997f4030d8cf3a2466b2d3234611d)
8
+
3
9
  ## 9.1.0
4
10
 
5
11
  ### New features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bfj",
3
- "version": "9.1.0",
3
+ "version": "9.1.1",
4
4
  "description": "Big-friendly JSON. Asynchronous streaming functions for large JSON data sets.",
5
5
  "homepage": "https://gitlab.com/philbooth/bfj",
6
6
  "bugs": "https://gitlab.com/philbooth/bfj/issues",
package/src/streamify.js CHANGED
@@ -219,6 +219,7 @@ function streamify (data, options = {}) {
219
219
  async function value (v) {
220
220
  await before()
221
221
  await addJson(`${v}`)
222
+ needsComma = true
222
223
  }
223
224
 
224
225
  async function endArray () {
@@ -423,6 +423,28 @@ suite('integration:', () => {
423
423
  })
424
424
  })
425
425
 
426
+ // https://gitlab.com/philbooth/bfj/-/issues/72
427
+ suite('issue #72:', () => {
428
+ let result
429
+
430
+ setup(async () => {
431
+ result = await bfj.stringify([
432
+ {
433
+ foo: 'bar',
434
+ wibble: 'blee',
435
+ },
436
+ {
437
+ foo: 'bar',
438
+ wibble: 'blee',
439
+ },
440
+ ])
441
+ })
442
+
443
+ test('result was correct', () => {
444
+ assert.strictEqual(result, '[{"foo":"bar","wibble":"blee"},{"foo":"bar","wibble":"blee"}]')
445
+ })
446
+ })
447
+
426
448
  suite('write object:', () => {
427
449
  let failed, file, result
428
450