diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-10-11 14:07:08 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2018-11-28 10:43:10 +0900 |
commit | bbf16193881619a2947528883dd2c45edc06500b (patch) | |
tree | 13fa6577435b831e3c14bfa17fb6ca402537b0c6 | |
parent | 0f8ba63472ad8d880a8ee5a646d5eb538d1b8517 (diff) | |
download | jsontool-tizen.tar.gz jsontool-tizen.tar.bz2 jsontool-tizen.zip |
Bump to jsontool 9.0.6tizen_5.5.m2_releasesubmit/tizen_5.5_mobile_hotfix/20201026.185107submit/tizen_5.5/20191031.000007submit/tizen/20181128.014403accepted/tizen/unified/20181129.054226accepted/tizen/5.5/unified/mobile/hotfix/20201027.074025accepted/tizen/5.5/unified/20191031.011409tizen_5.5_tvtizen_5.5_mobile_hotfixtizen_5.5tizenaccepted/tizen_unifiedaccepted/tizen_5.5_unified_mobile_hotfixaccepted/tizen_5.5_unified
[Model] All
[BinType] AP
[Customer] OPEN
[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A
[Problem] jsontool version upgrade 9.0.4 -> 9.0.6
[Cause & Measure] version upgrade
[Checking Method]
[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A
Change-Id: I863fdf3ea236a4b0c4893588521eeb0731b2c645
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rwxr-xr-x | json | 22 | ||||
-rw-r--r-- | packaging/jsontool.spec | 2 |
2 files changed, 14 insertions, 10 deletions
@@ -8,7 +8,7 @@ * See <https://github.com/trentm/json> and <https://trentm.com/json/> */ -var VERSION = '9.0.4'; +var VERSION = '9.0.6'; var p = console.warn; var util = require('util'); @@ -627,7 +627,11 @@ function chunkEmitter(opts) { chunks.push(chunk); return; } - leftover = emitChunks(s, emitter); + if (chunk.lastIndexOf('\n') >= 0) { + leftover = emitChunks(s, emitter); + } else { + leftover = s; + } } }); } @@ -1027,7 +1031,9 @@ function lookupDatum(datum, lookup) { var d = datum; for (var i = 0; i < lookup.length; i++) { var bit = lookup[i]; - if (typeof (bit) === 'number' && bit < 0) { + if (d === null) { + return undefined; + } else if (typeof (bit) === 'number' && bit < 0) { d = d[d.length + bit]; } else { d = d[bit]; @@ -1078,7 +1084,7 @@ function printDatasets(datasets, filename, headers, opts) { } } if (filename) { - f.on('open', function() { + f.on('open', function () { f.end(); fs.renameSync(tmpPath, filename); if (!opts.quiet) { @@ -1299,7 +1305,7 @@ function main(argv) { // streaming var chunker = chunkEmitter(opts); chunker.on('error', function (error) { - warn('json: error: %s', err); + warn('json: error: %s', err.message); return drainStdoutAndExit(1); }); chunker.on('chunk', parseChunk); @@ -1308,7 +1314,7 @@ function main(argv) { 'cannot handle more than one file with -I'); getInput(opts, function (err, content, filename) { if (err) { - warn('json: error: %s', err) + warn('json: error: %s', err.message) return drainStdoutAndExit(1); } @@ -1342,7 +1348,7 @@ function main(argv) { // not streaming getInput(opts, function (err, buffer, filename) { if (err) { - warn('json: error: %s', err) + warn('json: error: %s', err.message) return drainStdoutAndExit(1); } // Take off a leading HTTP header if any and pass it through. @@ -1676,5 +1682,3 @@ if (require.main === module) { main(process.argv); } - - diff --git a/packaging/jsontool.spec b/packaging/jsontool.spec index db93483..3a3e25e 100644 --- a/packaging/jsontool.spec +++ b/packaging/jsontool.spec @@ -1,6 +1,6 @@ Name: jsontool Summary: Tool for json file validation, merging, modification, filtering etc. -Version: 9.0.3 +Version: 9.0.6 Release: 0 Group: Tools License: MIT |