Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

browser compatibility #586

Closed
daviddias opened this issue Nov 12, 2016 · 3 comments
Closed

browser compatibility #586

daviddias opened this issue Nov 12, 2016 · 3 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@daviddias
Copy link
Member

#485 (comment)

@daviddias daviddias added the kind/bug A bug in existing code (including security flaws) label Nov 12, 2016
@victorb
Copy link
Member

victorb commented Nov 18, 2016

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: hildjj/node-cbor#39

@hildjj
Copy link

hildjj commented Nov 20, 2016

Upgrade to version 3.0.0, includes this and canonicalization.

@daviddias
Copy link
Member Author

Thank you @hildjj !!! 🎉

@victorbjelkholm I've updated ipld/js-ipld-dag-cbor@05170d7 this should be good now :) rerunning CI

MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this issue May 22, 2020
fixes "expected 1.999 to be at least 2" in CI
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

4 participants