From 301cc6ff419c3aa090ab38e67d08a6ee015be057 Mon Sep 17 00:00:00 2001 From: Mikey Date: Sat, 13 May 2023 00:35:26 +1200 Subject: [PATCH] use json-canon instead of canonicalize (#7) --- lib/feed-v1/get-msg-id.js | 2 +- lib/feed-v1/index.js | 2 +- lib/feed-v1/represent-content.js | 2 +- lib/feed-v1/validation.js | 2 +- package.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/feed-v1/get-msg-id.js b/lib/feed-v1/get-msg-id.js index 571799a..a6a00b5 100644 --- a/lib/feed-v1/get-msg-id.js +++ b/lib/feed-v1/get-msg-id.js @@ -1,6 +1,6 @@ const blake3 = require('blake3') const base58 = require('bs58') -const stringify = require('canonicalize') +const stringify = require('json-canon') /** * @typedef {import('./index').Msg} Msg diff --git a/lib/feed-v1/index.js b/lib/feed-v1/index.js index 57efce7..c96f699 100644 --- a/lib/feed-v1/index.js +++ b/lib/feed-v1/index.js @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: LGPL-3.0-only -const stringify = require('canonicalize') +const stringify = require('json-canon') const ed25519 = require('ssb-keys/sodium') const base58 = require('bs58') const union = require('set.prototype.union') diff --git a/lib/feed-v1/represent-content.js b/lib/feed-v1/represent-content.js index cebf337..d5615e8 100644 --- a/lib/feed-v1/represent-content.js +++ b/lib/feed-v1/represent-content.js @@ -1,6 +1,6 @@ const blake3 = require('blake3') const base58 = require('bs58') -const stringify = require('canonicalize') +const stringify = require('json-canon') /** * @param {any} content diff --git a/lib/feed-v1/validation.js b/lib/feed-v1/validation.js index 364fe1f..6f8f18e 100644 --- a/lib/feed-v1/validation.js +++ b/lib/feed-v1/validation.js @@ -1,6 +1,6 @@ const base58 = require('bs58') const ed25519 = require('ssb-keys/sodium') -const stringify = require('canonicalize') +const stringify = require('json-canon') const Tangle = require('./tangle') const representContent = require('./represent-content') diff --git a/package.json b/package.json index 8568ddd..b34e359 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,7 @@ "async-append-only-log": "^4.3.10", "blake3": "^2.1.7", "bs58": "^5.0.0", - "canonicalize": "^2.0.0", + "json-canon": "^1.0.0", "obz": "^1.1.0", "promisify-4loc": "^1.0.0", "push-stream": "^11.2.0",