orbitdb-archive / ipfs-log

Append-only log CRDT on IPFS
https://orbitdb.github.io/ipfs-log/
MIT License
398 stars 55 forks source link

Fix missing identity in entry.fromMultihash #171

Closed shamb0t closed 6 years ago

shamb0t commented 6 years ago

This PR fixes the missing identity field in Entry.fromMulthash Adds check for equality in fromMultihash test

haadcode commented 6 years ago

Looks good but test are erroring with: "/home/ubuntu/orbitdb/ipfs-log/test/entry.spec.js 201:9 error 'assert.deepEqual' was deprecated since v10.0.0. Use 'assert.deepStrictEqual' or 'assert.strict.deepEqual' instead node/no-deprecated-api"

haadcode commented 6 years ago

Not tests, linting

shamb0t commented 6 years ago

Yea its the linter, but deepStrictEqual is failing:

    AssertionError [ERR_ASSERTION]: { hash: 'QmVDZw6kFVnfBur62cdjJvypP7E8xuJ9mGb2fScBapdqe9',
  id: 'A',
  payload: 'hello again',
  next: [ 'QmVPLSEsaiypMFtaZEPwGp deepStrictEqual { hash: 'QmVDZw6kFVnfBur62cdjJvypP7E8xuJ9mGb2fScBapdqe9',
  id: 'A',
  payload: 'hello again',
  next: [ 'QmVPLSEsaiypMFtaZEPwGp
      + expected - actual

I think the way deep comparisons are done has changed?

haadcode commented 6 years ago

"Use 'assert.deepStrictEqual' or 'assert.strict.deepEqual' instead node/no-deprecated-api"

I think this was introduced through the linting rules (which is fine I think since nodejs 10 is soon LTS and we should officially support/use it).

haadcode commented 6 years ago

Looks good now and tests are passing! 👍

@shamb0t do you feel this can be merged now or do you still want to update it?

shamb0t commented 6 years ago

Good to merge :+1: