Js-ipfs: browser compatibility

Created on 12 Nov 2016  路  3Comments  路  Source: ipfs/js-ipfs

Most helpful comment

Upgrade to version 3.0.0, includes this and canonicalization.

All 3 comments

Issue is this:

CI is finally green, browsers are not perfect atm, most are failing due to one or the other issue

Firefox fails with this

Firefox 49.0.0 (Linux 0.0.0) ERROR
  SyntaxError: missing = in const declaration
  at webpack:///~/cbor/lib/encoder.js:383:0 <- test/browser.js:41233

though this code runs fine in Chrome.

Which I tracked down to being about either const being used inside for() or using const without a initialize value. So, in the end, turns out the issue is in cbor library we use, specifically here: https://github.com/hildjj/node-cbor/blob/d2d3fee6f9e2beddbf78efa18326ebce2f7f516d/lib/encoder.js#L383

I've submitted a patch here: https://github.com/hildjj/node-cbor/pull/39

Upgrade to version 3.0.0, includes this and canonicalization.

Thank you @hildjj !!! 馃帀

@VictorBjelkholm I've updated https://github.com/ipld/js-ipld-dag-cbor/commit/05170d74f1c82bb54d177103280d91a522841b78 this should be good now :) rerunning CI

Was this page helpful?
0 / 5 - 0 ratings

Related issues

daviddias picture daviddias  路  4Comments

pedrouid picture pedrouid  路  3Comments

lifeBCE picture lifeBCE  路  3Comments

witten picture witten  路  4Comments

daviddias picture daviddias  路  3Comments