[Pkg-javascript-commits] [node-jsonstream] 194/214: Remove "occasional problems parsing and unparsing very precise numbers"

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 1 12:58:59 UTC 2017


This is an automated email from the git hooks/post-receive script.

rouca pushed a commit to branch master
in repository node-jsonstream.

commit 15d4090a76b3c48e99f957d286649ce05ba2e5b9
Author: jeromew <jerome.wagner at m4x.org>
Date:   Mon Jul 25 10:47:57 2016 +0000

    Remove "occasional problems parsing and unparsing very precise numbers"
---
 package.json      |  2 +-
 readme.markdown   | 10 +++-------
 test/parsejson.js |  5 +----
 3 files changed, 5 insertions(+), 12 deletions(-)

diff --git a/package.json b/package.json
index 9d6d081..782a720 100644
--- a/package.json
+++ b/package.json
@@ -17,7 +17,7 @@
     "parsing"
   ],
   "dependencies": {
-    "jsonparse": "^1.1.0",
+    "jsonparse": "^1.2.0",
     "through": ">=2.2.7 <3"
   },
   "devDependencies": {
diff --git a/readme.markdown b/readme.markdown
index 532bdd7..6266c20 100644
--- a/readme.markdown
+++ b/readme.markdown
@@ -168,13 +168,9 @@ curl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies
 
 ## numbers
 
-There are occasional problems parsing and unparsing very precise numbers.
-
-I have opened an issue here:
-
-https://github.com/creationix/jsonparse/issues/2
-
-+1
+numbers will be emitted as numbers.
+huge numbers that cannot be represented in memory as javascript numbers will be emitted as strings.
+cf https://github.com/creationix/jsonparse/commit/044b268f01c4b8f97fb936fc85d3bcfba179e5bb for details.
 
 ## Acknowlegements
 
diff --git a/test/parsejson.js b/test/parsejson.js
index 0279887..a943334 100644
--- a/test/parsejson.js
+++ b/test/parsejson.js
@@ -15,10 +15,7 @@ while (times --) {
 
   p.onValue = function (v) {
     console.error('parsed', v)
-    assert.equal(
-      String(v).slice(0,12),
-      String(r).slice(0,12)
-    )
+    assert.equal(v,r)
   }
   console.error('correct', r)
   p.write (new Buffer(JSON.stringify([r])))

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-jsonstream.git



More information about the Pkg-javascript-commits mailing list