digitalbazaar / jsonld-signatures

An implementation of the Linked Data Signatures specification for JSON-LD. Works in the browser and Node.js.
BSD 3-Clause "New" or "Revised" License
138 stars 41 forks source link

Use `jsonld@8` and `safe` mode instead of `expansionMap`. #166

Closed dlongley closed 2 years ago

dlongley commented 2 years ago

We need some better tests here that exercise safe mode.

dlongley commented 2 years ago

This has been tested against: https://github.com/digitalbazaar/ed25519-signature-2020

davidlehn commented 2 years ago
dlongley commented 2 years ago

@davidlehn,

  • jsonld.js also throws if expansionMap is used. Could that be used instead of all the checks here? Or would that be too confusing where the error came from?

I think it's clearer to throw from here for now.

  • I assume lib/expansionMap.js can be removed?

Yes, it's now been removed.

  • It's still an open question of where/how to add tests for this base library.

Yeah, and that will probably continue to be open so as to not hold this up.