Js-ipfs: Awesome Endeavour - unsafe-eval no more!

Created on 5 Sep 2017  Â·  17Comments  Â·  Source: ipfs/js-ipfs

Most helpful comment

image

All 17 comments

Code coverage is dropping dramatically with this change because it is trying to check if we test the newly generated code:

Just published a release of aegir which allows to ignore files from coverage: aegir coverage --ignore src/somefile.js

Good news, we don't need to migrate, just use this version of protocol-buffers I made which switches to regular functions instead of generating them and evaling:

https://github.com/dignifiedquire/protocol-buffers/tree/fixes

perf is a bit worse, but not that bad

npm (encode) x 482,202 ops/sec ±3.14% (85 runs sampled)
npm (decode) x 1,863,500 ops/sec ±1.23% (91 runs sampled)
npm(encode + decode) x 349,692 ops/sec ±1.66% (82 runs sampled)
local (encode) x 423,864 ops/sec ±1.51% (88 runs sampled)
local (decode) x 1,042,350 ops/sec ±1.19% (94 runs sampled)
local(encode + decode) x 294,290 ops/sec ±1.39% (89 runs sampled)

Awesome @dignifiedquire !

Might make it a real module and not a fork (i.e maintained, CI, published to npm, etc)?

Probably yes

Renamed to protons: https://github.com/dignifiedquire/protons publish coming soon

Awesome. Make sure to have a reference in the README to the original module and the reason that lead to the fork, other people will find useful.

there already is?

@diasdavid PRs are ready for you to review

Ok, everything merged, released and all the deps in the middle were also updated to make sure that npm always installs the latest patch version.

Test away :)

Missed two modules

npm ls protocol-buffers
[email protected] /Users/dignifiedquire/opensource/ipfs/js-ipfs
├─┬ [email protected]
│ └─┬ [email protected]
│   └── [email protected]  deduped
└─┬ [email protected]
  └── [email protected]
> npm ls protocol-buffers
[email protected] /Users/imp/code/js-ipfs
└── (empty)

Closing?

image

Was this page helpful?
0 / 5 - 0 ratings