From f5f0581014d64e631cdabad8d3100f82c1dd8938 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Tue, 31 Oct 2023 19:10:50 +0100 Subject: [PATCH 01/10] Add test for migrating from old keyring (failing) --- package-lock.json | 412 +++++++++++++++++++++++++++++++++ package.json | 6 +- test/from-old-versions.test.js | 41 ++++ test/helpers/test-bot.js | 5 +- 4 files changed, 459 insertions(+), 5 deletions(-) create mode 100644 test/from-old-versions.test.js diff --git a/package-lock.json b/package-lock.json index 069df3e..b162071 100644 --- a/package-lock.json +++ b/package-lock.json @@ -35,9 +35,13 @@ "cross-env": "^7.0.3", "is-canonical-base64": "^1.1.1", "scuttle-testbot": "^2.1.0", + "scuttle-testbot-1-11-0": "npm:scuttle-testbot@1.11.0", + "ssb-backlinks-2-1-1": "npm:ssb-backlinks@2.1.1", "ssb-box2": "^7.2.0", "ssb-db2": "^7.1.1", + "ssb-query-2-4-5": "npm:ssb-query@2.4.5", "ssb-replicate": "^1.3.3", + "ssb-tribes-3-1-3": "npm:ssb-tribes@3.1.3", "standard": "^17.1.0", "tap-arc": "^0.4.0", "tape": "^5.7.0" @@ -655,6 +659,21 @@ } ] }, + "node_modules/base64-url": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/base64-url/-/base64-url-2.3.3.tgz", + "integrity": "sha512-dLMhIsK7OplcDauDH/tZLvK7JmUZK3A7KiQpjNzsBrM6Etw7hzNI1tLEywqJk9NnwkgWuFKSlx/IUO7vF6Mo8Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/binary-search": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/binary-search/-/binary-search-1.3.6.tgz", + "integrity": "sha512-nbE1WxOTTrUWIfsfZ4aHGYu5DOuNkbxGokjV6Z2kxfJK3uaAb8zNK1muzOeipoLHZjInT4Br88BHpzevc681xA==", + "dev": true + }, "node_modules/binary-search-bounds": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/binary-search-bounds/-/binary-search-bounds-2.0.5.tgz", @@ -893,6 +912,64 @@ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" }, + "node_modules/compare-at-paths": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/compare-at-paths/-/compare-at-paths-1.0.0.tgz", + "integrity": "sha512-Ke1ejo/RZ+Hzku4gcW34uPMOR4Cpq87MAotELgV9mwiAzDN726cu+eWo0zWg1vRIfyf6yK5bW9uIW+c/SksQ5w==", + "dev": true, + "dependencies": { + "libnested": "^1.3.2", + "tape": "^4.9.1", + "typewiselite": "^1.0.0" + } + }, + "node_modules/compare-at-paths/node_modules/deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "dependencies": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/compare-at-paths/node_modules/tape": { + "version": "4.17.0", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.17.0.tgz", + "integrity": "sha512-KCuXjYxCZ3ru40dmND+oCLsXyuA8hoseu2SS404Px5ouyS0A99v8X/mdiLqsR5MTAyamMBN7PRwt2Dv3+xGIxw==", + "dev": true, + "dependencies": { + "@ljharb/resumer": "~0.0.1", + "@ljharb/through": "~2.3.9", + "call-bind": "~1.0.2", + "deep-equal": "~1.1.1", + "defined": "~1.0.1", + "dotignore": "~0.1.2", + "for-each": "~0.3.3", + "glob": "~7.2.3", + "has": "~1.0.3", + "inherits": "~2.0.4", + "is-regex": "~1.1.4", + "minimist": "~1.2.8", + "mock-property": "~1.0.0", + "object-inspect": "~1.12.3", + "resolve": "~1.22.6", + "string.prototype.trim": "~1.2.8" + }, + "bin": { + "tape": "bin/tape" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -2033,6 +2110,51 @@ "pull-write": "^1.1.1" } }, + "node_modules/flumeview-links": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/flumeview-links/-/flumeview-links-2.1.0.tgz", + "integrity": "sha512-VzqbNJ9qYE9eopCrhWXlPSoIoW4xanMy6YFyVSaYAwQIPoIZ+F1s1D3vmzOLXGhPesgHiXAlxmFSzXM5C9DKbQ==", + "dev": true, + "dependencies": { + "deep-equal": "^2.0.3", + "flumeview-level": "^4.0.3", + "map-filter-reduce": "^3.2.2", + "pull-flatmap": "0.0.1", + "pull-stream": "^3.6.14" + } + }, + "node_modules/flumeview-query": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/flumeview-query/-/flumeview-query-8.0.0.tgz", + "integrity": "sha512-uPTT5I26ePMc6Xhjebu1aiaHAd7P3EqyE9SZB6B9ZIvXtMXhFYNk7iO1yzh1ZXp3aYzdYmrI9k8mSz9urZ9gNQ==", + "dev": true, + "dependencies": { + "deep-equal": "^1.0.1", + "flumeview-level": "^4.0.3", + "map-filter-reduce": "^3.2.0", + "pull-flatmap": "0.0.1", + "pull-paramap": "^1.1.3", + "pull-sink-through": "0.0.0", + "pull-stream": "^3.4.0" + } + }, + "node_modules/flumeview-query/node_modules/deep-equal": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "dev": true, + "dependencies": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/flumeview-reduce": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/flumeview-reduce/-/flumeview-reduce-1.4.0.tgz", @@ -3203,6 +3325,12 @@ "node": ">= 0.8.0" } }, + "node_modules/libnested": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/libnested/-/libnested-1.5.2.tgz", + "integrity": "sha512-DbiwHL8454goYRp5Xn9vUA5XU6x8rNh8BmZ7ywSTUhVBIiDS7ev/FT6+AwU2/ZKW2jEOC7WKhpkJfExaQwosRA==", + "dev": true + }, "node_modules/libsodium": { "version": "0.7.13", "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.13.tgz", @@ -3328,6 +3456,20 @@ "resolved": "https://registry.npmjs.org/ltgt/-/ltgt-2.2.1.tgz", "integrity": "sha512-AI2r85+4MquTw9ZYqabu4nMwy9Oftlfa/e/52t9IjtfG+mGBbTNdAoZ3RQKLHR6r0wQnwZnPIEh/Ya6XTWAKNA==" }, + "node_modules/map-filter-reduce": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/map-filter-reduce/-/map-filter-reduce-3.2.2.tgz", + "integrity": "sha512-p+NIGQbEBxlw/qWwG+NME98G/9kjOQI70hmaH8QEZtIWfTmfMYLKQW4PJChP4izPHNAxlOfv/qefP0+2ZXn84A==", + "dev": true, + "dependencies": { + "binary-search": "^1.2.0", + "compare-at-paths": "^1.0.0", + "pull-sink-through": "0.0.0", + "pull-sort": "^1.0.1", + "pull-stream": "^3.4.3", + "typewiselite": "^1.0.0" + } + }, "node_modules/map-merge": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/map-merge/-/map-merge-1.1.0.tgz", @@ -4123,6 +4265,12 @@ "pull-pause": "~0.0.2" } }, + "node_modules/pull-flatmap": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/pull-flatmap/-/pull-flatmap-0.0.1.tgz", + "integrity": "sha512-9BgwZPZ6J22kPf9ExoVI3m2yMHdCK8uPf58p6L63t36IgH7NrCX+p3QV8cQ4JmYjwvXDZzimVuJ7IW7iLxm7cA==", + "dev": true + }, "node_modules/pull-goodbye": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/pull-goodbye/-/pull-goodbye-0.0.3.tgz", @@ -4260,6 +4408,22 @@ "integrity": "sha512-CBkejkE5nX50SiSEzu0Qoz4POTJMS/mw8G6aj3h3M/RJoKgggLxyF0IyTZ0mmpXFlXRcLmLmIEW4xeYn7AeDYw==", "dev": true }, + "node_modules/pull-sink-through": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/pull-sink-through/-/pull-sink-through-0.0.0.tgz", + "integrity": "sha512-XjpF/3+WRsWfw+XhPgj3I/6WO15VYOKLsXAtWt1sRKOqA6N7bnarut5zuE2GcxbAzspaQxKmMcbUYZ8QorPxcQ==", + "dev": true + }, + "node_modules/pull-sort": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pull-sort/-/pull-sort-1.0.2.tgz", + "integrity": "sha512-jGcAHMP+0Le+bEIhSODlbNNd3jW+S6XrXOlhVzfcKU5HQZjP92OzQSgHHSlwvWRsiTWi+UGgbFpL/5gGgmFoVQ==", + "dev": true, + "dependencies": { + "pull-defer": "^0.2.3", + "pull-stream": "^3.6.9" + } + }, "node_modules/pull-stream": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/pull-stream/-/pull-stream-3.7.0.tgz", @@ -4731,6 +4895,137 @@ "ssb-keys": "^8.5.0" } }, + "node_modules/scuttle-testbot-1-11-0": { + "name": "scuttle-testbot", + "version": "1.11.0", + "resolved": "https://registry.npmjs.org/scuttle-testbot/-/scuttle-testbot-1.11.0.tgz", + "integrity": "sha512-30X+PcTChP4DO/F4bBJLH8TORsOCjQlOWzc1whVWtY/HRZly1oYLhcSKddbPe10kmfo+5JAI35o/sp23toya6w==", + "dev": true, + "dependencies": { + "color-tag": "^1.0.2", + "pull-paramap": "^1.2.2", + "pull-stream": "^3.6.14", + "rimraf": "^3.0.0", + "secret-stack": "^6.4.0", + "ssb-conn": "^6.0.3", + "ssb-db": "^20.4.1", + "ssb-db2": "^6.2.7", + "ssb-keys": "^8.4.1" + } + }, + "node_modules/scuttle-testbot-1-11-0/node_modules/flumecodec": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/flumecodec/-/flumecodec-0.0.1.tgz", + "integrity": "sha512-JT0xivzdV7uTucjsLMw6JhK2e1K5TmU4fGmoQqnrJbydgY/V6+m71QoxX5ZtRR1pKoD48uhPDWWE6G5MlNoGkg==", + "dev": true, + "dependencies": { + "level-codec": "^6.2.0" + } + }, + "node_modules/scuttle-testbot-1-11-0/node_modules/flumecodec/node_modules/level-codec": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/level-codec/-/level-codec-6.2.0.tgz", + "integrity": "sha512-J437PvCMZZKNT88+VRh6dkmh1ndZzwGwDzb5ZZl3QEsl+U9wIlt8hG+Y1gXVOhH75gf8JyceKGiG6WFUBbxyGQ==", + "dev": true + }, + "node_modules/scuttle-testbot-1-11-0/node_modules/private-group-spec": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/private-group-spec/-/private-group-spec-1.2.0.tgz", + "integrity": "sha512-O7SfG+vZIZgqDXy/wjsuTRI5LaozW4rxaZBpGmwlcDfjIvxvYWNboyNm1PoQUU6j4dQ02V1tOQVLDq9u2RzolA==", + "dev": true, + "dependencies": { + "is-my-ssb-valid": "^1.2.0" + } + }, + "node_modules/scuttle-testbot-1-11-0/node_modules/ssb-box2": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ssb-box2/-/ssb-box2-3.0.1.tgz", + "integrity": "sha512-jQhrsEyrpqnUciEb1qzqc/SJCAx3hTm48BMzMy1bE//xQthWRahigTffflOM7pdRieGlxwGlHc8PpagBBZOkhA==", + "dev": true, + "dependencies": { + "envelope-js": "^1.3.0", + "private-group-spec": "^1.2.0", + "ssb-bfe": "^3.7.0", + "ssb-keyring": "^2.2.0", + "ssb-private-group-keys": "^0.4.1", + "ssb-ref": "^2.16.0", + "ssb-uri2": "^2.4.0" + } + }, + "node_modules/scuttle-testbot-1-11-0/node_modules/ssb-db2": { + "version": "6.3.3", + "resolved": "https://registry.npmjs.org/ssb-db2/-/ssb-db2-6.3.3.tgz", + "integrity": "sha512-H5WztPw1lJmUR1e12McRABT4OStiwygDutirHhx1P520ssu5pTmuKrcUM/uSaEPbEPsLif17HpdKKd1fK2uxYg==", + "dev": true, + "dependencies": { + "async-append-only-log": "^4.3.7", + "atomic-file-rw": "^0.3.0", + "binary-search-bounds": "^2.0.4", + "bipf": "^1.9.0", + "clarify-error": "^1.0.0", + "debug": "^4.3.1", + "fastintcompression": "0.0.4", + "flumecodec": "0.0.1", + "flumelog-offset": "3.4.4", + "hoox": "0.0.1", + "jitdb": "^7.0.0", + "level": "^6.0.1", + "level-codec": "^9.0.2", + "lodash.debounce": "^4.0.8", + "mkdirp": "^1.0.4", + "multicb": "1.2.2", + "mutexify": "^1.3.1", + "obz": "^1.1.0", + "p-defer": "^3.0.0", + "pull-cat": "^1.1.11", + "pull-drain-gently": "^1.1.0", + "pull-level": "^2.0.4", + "pull-notify": "^0.1.2", + "pull-paramap": "^1.2.2", + "pull-stream": "^3.6.14", + "push-stream": "^11.0.0", + "rimraf": "^3.0.2", + "ssb-about-self": "^1.0.1", + "ssb-box": "^1.0.0", + "ssb-box2": "^3.0.0", + "ssb-classic": "^1.1.0", + "ssb-keys": "^8.4.0", + "ssb-ref": "^2.14.3", + "ssb-uri2": "^2.2.0", + "too-hot": "^1.0.0", + "typedarray-to-buffer": "^4.0.0" + } + }, + "node_modules/scuttle-testbot-1-11-0/node_modules/ssb-keyring": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/ssb-keyring/-/ssb-keyring-2.2.0.tgz", + "integrity": "sha512-pXNzYsQbtdWoWAjEPT5lVrZs/Px4ypJU2m4S34tTN6KivZukHPcflj1/IbZSDj7kHJGQhJRcyqGQ3MxgQdFBrA==", + "dev": true, + "dependencies": { + "charwise": "^3.0.1", + "level": "^6.0.1", + "mkdirp": "^1.0.4", + "private-group-spec": "^1.1.3", + "pull-level": "^2.0.4", + "pull-stream": "^3.6.14", + "ssb-private-group-keys": "^1.0.0", + "ssb-ref": "^2.16.0", + "ssb-uri2": "^2.4.0" + } + }, + "node_modules/scuttle-testbot-1-11-0/node_modules/ssb-keyring/node_modules/ssb-private-group-keys": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/ssb-private-group-keys/-/ssb-private-group-keys-1.1.2.tgz", + "integrity": "sha512-0UPPmxy61qmbDmP71J2vhX6UPfCtXa/CNehxYTgk2+AaLXsnA0perGZAiOWm9niGEU50TYYC5/jsIfjz4IiD9A==", + "dev": true, + "dependencies": { + "envelope-js": "^1.3.2", + "futoin-hkdf": "^1.5.1", + "private-group-spec": "^1.1.3", + "sodium-universal": "^3.1.0", + "ssb-bfe": "^3.5.0" + } + }, "node_modules/secret-handshake": { "version": "1.1.21", "resolved": "https://registry.npmjs.org/secret-handshake/-/secret-handshake-1.1.21.tgz", @@ -5040,6 +5335,19 @@ "ssb-db2": ">=3.4.0" } }, + "node_modules/ssb-backlinks-2-1-1": { + "name": "ssb-backlinks", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ssb-backlinks/-/ssb-backlinks-2.1.1.tgz", + "integrity": "sha512-iv/B5EyjvNiKOeT3RkTuBRyU14GJ1sf5wnr07JOWeVI3OyNzedZ8z229yzZSaGHTYpbiSOcs9Z2CR8CkLQupQQ==", + "dev": true, + "dependencies": { + "base64-url": "^2.3.3", + "flumeview-links": "^2.1.0", + "pull-stream": "^3.6.14", + "ssb-ref": "^2.14.0" + } + }, "node_modules/ssb-bfe": { "version": "3.7.0", "resolved": "https://registry.npmjs.org/ssb-bfe/-/ssb-bfe-3.7.0.tgz", @@ -5427,6 +5735,32 @@ "ssb-bfe": "^3.5.0" } }, + "node_modules/ssb-keyring": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ssb-keyring/-/ssb-keyring-1.1.1.tgz", + "integrity": "sha512-d2QUWb4WklxBtujDwuW23eum75XbHB5RuVuk1QN2+OBN+7N6Z5ceG6xelKaSXwFLuZPQZ+jCg+aBdxzYZSny/Q==", + "dev": true, + "dependencies": { + "charwise": "^3.0.1", + "level": "^6.0.1", + "mkdirp": "^1.0.4", + "private-group-spec": "^1.1.0", + "pull-level": "^2.0.4", + "pull-stream": "^3.6.14", + "sodium-native": "^3.2.0", + "ssb-private-group-keys": "^0.4.1", + "ssb-ref": "^2.16.0" + } + }, + "node_modules/ssb-keyring/node_modules/private-group-spec": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/private-group-spec/-/private-group-spec-1.2.0.tgz", + "integrity": "sha512-O7SfG+vZIZgqDXy/wjsuTRI5LaozW4rxaZBpGmwlcDfjIvxvYWNboyNm1PoQUU6j4dQ02V1tOQVLDq9u2RzolA==", + "dev": true, + "dependencies": { + "is-my-ssb-valid": "^1.2.0" + } + }, "node_modules/ssb-keys": { "version": "8.5.0", "resolved": "https://registry.npmjs.org/ssb-keys/-/ssb-keys-8.5.0.tgz", @@ -5486,6 +5820,18 @@ "is-my-ssb-valid": "^1.2.0" } }, + "node_modules/ssb-query-2-4-5": { + "name": "ssb-query", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/ssb-query/-/ssb-query-2.4.5.tgz", + "integrity": "sha512-/QX6+DJkghqq1ZTbgYpOvaI+gx2O7ee1TRUM9yiOlVjh1XAQBevcBj0zO+W3TsNllX86urqBrySd/AEfFfUpIw==", + "dev": true, + "dependencies": { + "explain-error": "^1.0.1", + "flumeview-query": "^8.0.0", + "pull-stream": "^3.6.2" + } + }, "node_modules/ssb-ref": { "version": "2.16.0", "resolved": "https://registry.npmjs.org/ssb-ref/-/ssb-ref-2.16.0.tgz", @@ -5541,6 +5887,66 @@ "ssb-ref": "^2.14.0" } }, + "node_modules/ssb-tribes-3-1-3": { + "name": "ssb-tribes", + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/ssb-tribes/-/ssb-tribes-3.1.3.tgz", + "integrity": "sha512-/XfVQ9FlG102ISCZUn9k9uv83KIqJUt4w1Z6oNGmzSGxs+3WA2fxUglSyxC5Y5Zv2b4JuyF/VXs4ddfOhYI6Hg==", + "dev": true, + "dependencies": { + "@tangle/linear-append": "^2.0.1", + "@tangle/overwrite": "^3.0.1", + "@tangle/reduce": "^5.0.4", + "@tangle/strategy": "^4.1.2", + "charwise": "^3.0.1", + "envelope-js": "^1.3.2", + "envelope-spec": "^1.1.1", + "futoin-hkdf": "^1.5.2", + "is-my-json-valid": "^2.20.5", + "is-my-ssb-valid": "^1.2.2", + "level": "^6.0.1", + "lodash.set": "^4.3.2", + "mkdirp": "^1.0.4", + "obz": "^1.0.3", + "private-group-spec": "^1.1.3", + "pull-level": "^2.0.4", + "pull-paramap": "^1.2.2", + "pull-stream": "^3.7.0", + "sodium-native": "^3.2.0", + "ssb-bfe": "^3.7.0", + "ssb-crut": "^4.6.2", + "ssb-keyring": "^1.1.0", + "ssb-keys": "^8.4.1", + "ssb-private-group-keys": "^0.4.1", + "ssb-ref": "^2.14.3", + "ssb-schema-definitions": "^3.1.0" + } + }, + "node_modules/ssb-tribes-3-1-3/node_modules/private-group-spec": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/private-group-spec/-/private-group-spec-1.2.0.tgz", + "integrity": "sha512-O7SfG+vZIZgqDXy/wjsuTRI5LaozW4rxaZBpGmwlcDfjIvxvYWNboyNm1PoQUU6j4dQ02V1tOQVLDq9u2RzolA==", + "dev": true, + "dependencies": { + "is-my-ssb-valid": "^1.2.0" + } + }, + "node_modules/ssb-tribes-3-1-3/node_modules/ssb-crut": { + "version": "4.6.4", + "resolved": "https://registry.npmjs.org/ssb-crut/-/ssb-crut-4.6.4.tgz", + "integrity": "sha512-RNuD4rYgGT56+bIe6Oy/eM38tyXN5eULdrT53ZXXrGT+bPM/Yk10V3dl+FRioDA+ErUp4l0Fk334PHb478GMMQ==", + "dev": true, + "dependencies": { + "@tangle/reduce": "^5.0.4", + "@tangle/strategy": "^4.1.2", + "fast-json-stable-stringify": "^2.1.0", + "is-my-ssb-valid": "^1.2.2", + "lodash.merge": "^4.6.2", + "pull-paramap": "^1.2.2", + "pull-stream": "^3.7.0", + "ssb-schema-definitions": "^3.2.1" + } + }, "node_modules/ssb-typescript": { "version": "2.8.0", "resolved": "https://registry.npmjs.org/ssb-typescript/-/ssb-typescript-2.8.0.tgz", @@ -6127,6 +6533,12 @@ "integrity": "sha512-B2B+wo5gC7VRAqcFEiUCjS6CJ1vmeYZ7uzY3Jsu6UNStHiF+W0vkhZAmQaj5m9sC2KVrpyHGRzGuhz3M6+n/8A==", "dev": true }, + "node_modules/typewiselite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typewiselite/-/typewiselite-1.0.0.tgz", + "integrity": "sha512-J9alhjVHupW3Wfz6qFRGgQw0N3gr8hOkw6zm7FZ6UR1Cse/oD9/JVok7DNE9TT9IbciDHX2Ex9+ksE6cRmtymw==", + "dev": true + }, "node_modules/uint48be": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/uint48be/-/uint48be-2.0.1.tgz", diff --git a/package.json b/package.json index 2382753..b223037 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,11 @@ "ssb-replicate": "^1.3.3", "standard": "^17.1.0", "tap-arc": "^0.4.0", - "tape": "^5.7.0" + "tape": "^5.7.0", + "ssb-tribes-3-1-3": "npm:ssb-tribes@3.1.3", + "ssb-backlinks-2-1-1": "npm:ssb-backlinks@2.1.1", + "ssb-query-2-4-5": "npm:ssb-query@2.4.5", + "scuttle-testbot-1-11-0": "npm:scuttle-testbot@1.11.0" }, "keywords": [ "scuttlebutt", diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js new file mode 100644 index 0000000..2be4f8f --- /dev/null +++ b/test/from-old-versions.test.js @@ -0,0 +1,41 @@ +const test = require('tape') +const { promisify: p } = require('util') + +const OldTestBot = require('scuttle-testbot-1-11-0') +const NewBot = require('./helpers/test-bot') + +const OldBot = (opts) => { + let stack = OldTestBot // eslint-disable-line + .use(require('ssb-backlinks-2-1-1')) + .use(require('ssb-query-2-4-5')) + .use(require('ssb-tribes-3-1-3')) + + return stack(opts) +} + +test('can continue from old keyring from ssb-tribes 3.1.3', async t => { + const oldAlice = OldBot({ name: 'alice' }) + + + const oldGroup = await p(oldAlice.tribes.create)({}) + + t.equal(typeof oldGroup.groupId, 'string', "got a group id") + + const oldList = await p(oldAlice.tribes.list)() + t.deepEqual(oldList, [oldGroup.groupId], 'group got listed') + + // TODO: get group as well + + await p(oldAlice.close)(true) + + await p(setTimeout)(500) + + const newAlice = NewBot({ name: 'alice' }) + + const newList = await p(newAlice.tribes.list)() + t.deepEqual(newList, oldList, 'new bot has same group list as old') + + // TODO: make sure old get matches new get + + await p(newAlice.close)() +}) \ No newline at end of file diff --git a/test/helpers/test-bot.js b/test/helpers/test-bot.js index 7db2d4f..304e7b4 100644 --- a/test/helpers/test-bot.js +++ b/test/helpers/test-bot.js @@ -12,15 +12,12 @@ module.exports = function TestBot (opts = {}) { // } let stack = Server // eslint-disable-line - // .use(require('ssb-backlinks')) - // .use(require('ssb-query')) .use(require('ssb-db2/core')) .use(require('ssb-classic')) .use(require('ssb-db2/compat')) .use(require('ssb-db2/compat/feedstate')) - // .use(require("ssb-db2/compat/publish")) .use(require('ssb-box2')) - .use(require('../..')) // ssb-tribes - NOTE load it after ssb-backlinks + .use(require('../..')) if (opts.installReplicate === true) { stack = stack.use(require('ssb-replicate')) From fe7e0d5a6c9911fc96397097a40439b0b154568d Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Tue, 31 Oct 2023 19:55:50 +0100 Subject: [PATCH 02/10] Set box2.path in test to use old keystore --- index.js | 2 ++ package-lock.json | 6 +++--- package.json | 2 +- test/from-old-versions.test.js | 11 +++++++++-- test/helpers/test-bot.js | 6 ++---- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index c8cd188..9cac063 100644 --- a/index.js +++ b/index.js @@ -50,6 +50,8 @@ module.exports = { function init (ssb, config) { if (!(config.box2 && config.box2.legacyMode)) throw Error('ssb-tribes error: config.box2.legacyMode needs to be `true`') + // TODO: check if the old keyring path exists, in that case require config.box2.path to be set to point to it + const state = { keys: ssb.keys, feedId: bfe.encode(ssb.id), diff --git a/package-lock.json b/package-lock.json index b162071..6dbc694 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "scuttle-testbot": "^2.1.0", "scuttle-testbot-1-11-0": "npm:scuttle-testbot@1.11.0", "ssb-backlinks-2-1-1": "npm:ssb-backlinks@2.1.1", - "ssb-box2": "^7.2.0", + "ssb-box2": "github:ssbc/ssb-box2#box2-path", "ssb-db2": "^7.1.1", "ssb-query-2-4-5": "npm:ssb-query@2.4.5", "ssb-replicate": "^1.3.3", @@ -5381,9 +5381,9 @@ }, "node_modules/ssb-box2": { "version": "7.2.0", - "resolved": "https://registry.npmjs.org/ssb-box2/-/ssb-box2-7.2.0.tgz", - "integrity": "sha512-LOIgzULj8wNPNk89zmLTRcc35Xq35uOuG/4Rq74ae4pPVY50oYEir7mdRNRiAjuIPTxbVmY6YwXVUehBEkxk1w==", + "resolved": "git+ssh://git@github.com/ssbc/ssb-box2.git#ac9db4ab7e224518c4296e91757793a018bee640", "dev": true, + "license": "LGPL-3.0-only", "dependencies": { "envelope-js": "^1.3.2", "private-group-spec": "^2.1.1", diff --git a/package.json b/package.json index b223037..baa1b4d 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "cross-env": "^7.0.3", "is-canonical-base64": "^1.1.1", "scuttle-testbot": "^2.1.0", - "ssb-box2": "^7.2.0", + "ssb-box2": "github:ssbc/ssb-box2#box2-path", "ssb-db2": "^7.1.1", "ssb-replicate": "^1.3.3", "standard": "^17.1.0", diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index 2be4f8f..02745f0 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -16,7 +16,6 @@ const OldBot = (opts) => { test('can continue from old keyring from ssb-tribes 3.1.3', async t => { const oldAlice = OldBot({ name: 'alice' }) - const oldGroup = await p(oldAlice.tribes.create)({}) t.equal(typeof oldGroup.groupId, 'string', "got a group id") @@ -30,7 +29,15 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { await p(setTimeout)(500) - const newAlice = NewBot({ name: 'alice' }) + // TODO: try creating bot without box2.path, but it should crash since it sees the old keystore + + const newAlice = NewBot({ + name: 'alice', + startUnclean: true, + box2: { + path: 'tribes/keystore', + } + }) const newList = await p(newAlice.tribes.list)() t.deepEqual(newList, oldList, 'new bot has same group list as old') diff --git a/test/helpers/test-bot.js b/test/helpers/test-bot.js index 304e7b4..9bce1a8 100644 --- a/test/helpers/test-bot.js +++ b/test/helpers/test-bot.js @@ -23,16 +23,14 @@ module.exports = function TestBot (opts = {}) { stack = stack.use(require('ssb-replicate')) } - if (opts.name) opts.name = 'ssb-tribes/' + opts.name - const ssb = stack({ + ...opts, box2: { legacyMode: true, - ...opts.box2 + ...opts.box2, }, // we don't want testbot to import db2 for us, we want more granularity and control of dep versions db1: true, - ...opts }) if (opts.debug) { From b2067f25999fc38ab7ef2eb62c33c6e3daf836dc Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 1 Nov 2023 13:30:05 +0100 Subject: [PATCH 03/10] Add failing assert that tribes throws on finding old unused keystore --- test/from-old-versions.test.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index 02745f0..b182362 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -29,11 +29,16 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { await p(setTimeout)(500) - // TODO: try creating bot without box2.path, but it should crash since it sees the old keystore - - const newAlice = NewBot({ + const newOpts = { name: 'alice', startUnclean: true, + } + t.throws(() => { + NewBot(newOpts) + }, /found old keystore/, "Error when there's an old keystore but we don't use it") + + const newAlice = NewBot({ + ...newOpts, box2: { path: 'tribes/keystore', } From 1670fde6ce368605f80f912b70f23d8bfb83c55a Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 1 Nov 2023 14:26:25 +0100 Subject: [PATCH 04/10] Skip throw-on-finding-old-keystore test for now --- index.js | 7 ++++++- test/from-old-versions.test.js | 8 +++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 9cac063..31ec55f 100644 --- a/index.js +++ b/index.js @@ -1,3 +1,4 @@ +const fs = require('fs') const set = require('lodash.set') const { isFeed, isCloakedMsg: isGroup } = require('ssb-ref') const bfe = require('ssb-bfe') @@ -8,6 +9,7 @@ const listen = require('./listen') const { GetGroupTangle, tanglePrune, groupId: buildGroupId, poBoxKeys } = require('./lib') const Method = require('./method') +const { join } = require('path') module.exports = { name: 'tribes', @@ -50,7 +52,10 @@ module.exports = { function init (ssb, config) { if (!(config.box2 && config.box2.legacyMode)) throw Error('ssb-tribes error: config.box2.legacyMode needs to be `true`') - // TODO: check if the old keyring path exists, in that case require config.box2.path to be set to point to it + // where old versions of ssb-tribes used to store the keyring. now we use ssb-box2 (which uses keyring internally) which defaults to a different location. if we detect that there's something at the old path we need to prompt the user to config ssb-box2 differently + const oldKeyringPathExists = fs.existsSync(join(config.path, 'tribes/keystore')) + const box2PathPointsToOldLocation = (config.box2 && config.box2.path) === 'tribes/keystore' + if (oldKeyringPathExists && !box2PathPointsToOldLocation) throw Error('ssb-tribes found an old keystore at SSB_PATH/tribes/keystore but ssb-box2 is not configured to use it. Please set config.box2.path = "tribes/keystore"') const state = { keys: ssb.keys, diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index b182362..c56bd1a 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -1,3 +1,4 @@ +const fsPromise = require('fs/promises') const test = require('tape') const { promisify: p } = require('util') @@ -33,9 +34,10 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { name: 'alice', startUnclean: true, } - t.throws(() => { - NewBot(newOpts) - }, /found old keystore/, "Error when there's an old keystore but we don't use it") + + //t.throws(() => { + // NewBot(newOpts) + //}, /found an old keystore/, "Error when there's an old keystore but we don't use it") const newAlice = NewBot({ ...newOpts, From 8bd577cde2c83fc502ae271ea07544de55eb5bca Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 1 Nov 2023 14:55:17 +0100 Subject: [PATCH 05/10] Match gets with old and new bot --- test/from-old-versions.test.js | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index c56bd1a..851a64b 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -19,12 +19,17 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { const oldGroup = await p(oldAlice.tribes.create)({}) - t.equal(typeof oldGroup.groupId, 'string', "got a group id") + t.equal(typeof oldGroup.groupId, 'string', "got a group id when creating using old bot") const oldList = await p(oldAlice.tribes.list)() - t.deepEqual(oldList, [oldGroup.groupId], 'group got listed') + t.deepEqual(oldList, [oldGroup.groupId], 'group got listed by old bot') - // TODO: get group as well + const oldGet = await p(oldAlice.tribes.get)(oldGroup.groupId) + + t.equal(oldGet.groupId, oldGroup.groupId, "got correct groupId") + t.equal(oldGet.key, oldGroup.groupKey, "got correct key") + t.equal(typeof oldGet.scheme, "string", "got scheme") + t.equal(typeof oldGet.root, "string", "got root") await p(oldAlice.close)(true) @@ -49,7 +54,14 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { const newList = await p(newAlice.tribes.list)() t.deepEqual(newList, oldList, 'new bot has same group list as old') - // TODO: make sure old get matches new get + const newGet = await p(newAlice.tribes.get)(oldGroup.groupId) + + t.deepEqual(newGet, { + groupId: oldGet.groupId, + writeKey: { key: oldGet.key, scheme: oldGet.scheme }, + readKeys: [{ key: oldGet.key, scheme: oldGet.scheme }], + root: oldGet.root, + }, "get with new bot matches get with old bot") await p(newAlice.close)() }) \ No newline at end of file From aac8cfe8338a570620b6c1afcbb506b581a09b37 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Wed, 1 Nov 2023 15:02:04 +0100 Subject: [PATCH 06/10] Fix lint --- test/from-old-versions.test.js | 25 ++++++++++++------------- test/helpers/test-bot.js | 4 ++-- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index 851a64b..6f77f72 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -1,4 +1,3 @@ -const fsPromise = require('fs/promises') const test = require('tape') const { promisify: p } = require('util') @@ -19,17 +18,17 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { const oldGroup = await p(oldAlice.tribes.create)({}) - t.equal(typeof oldGroup.groupId, 'string', "got a group id when creating using old bot") + t.equal(typeof oldGroup.groupId, 'string', 'got a group id when creating using old bot') const oldList = await p(oldAlice.tribes.list)() t.deepEqual(oldList, [oldGroup.groupId], 'group got listed by old bot') const oldGet = await p(oldAlice.tribes.get)(oldGroup.groupId) - t.equal(oldGet.groupId, oldGroup.groupId, "got correct groupId") - t.equal(oldGet.key, oldGroup.groupKey, "got correct key") - t.equal(typeof oldGet.scheme, "string", "got scheme") - t.equal(typeof oldGet.root, "string", "got root") + t.equal(oldGet.groupId, oldGroup.groupId, 'got correct groupId') + t.equal(oldGet.key, oldGroup.groupKey, 'got correct key') + t.equal(typeof oldGet.scheme, 'string', 'got scheme') + t.equal(typeof oldGet.root, 'string', 'got root') await p(oldAlice.close)(true) @@ -37,17 +36,17 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { const newOpts = { name: 'alice', - startUnclean: true, + startUnclean: true } - //t.throws(() => { + // t.throws(() => { // NewBot(newOpts) - //}, /found an old keystore/, "Error when there's an old keystore but we don't use it") + // }, /found an old keystore/, "Error when there's an old keystore but we don't use it") const newAlice = NewBot({ ...newOpts, box2: { - path: 'tribes/keystore', + path: 'tribes/keystore' } }) @@ -60,8 +59,8 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { groupId: oldGet.groupId, writeKey: { key: oldGet.key, scheme: oldGet.scheme }, readKeys: [{ key: oldGet.key, scheme: oldGet.scheme }], - root: oldGet.root, - }, "get with new bot matches get with old bot") + root: oldGet.root + }, 'get with new bot matches get with old bot') await p(newAlice.close)() -}) \ No newline at end of file +}) diff --git a/test/helpers/test-bot.js b/test/helpers/test-bot.js index 9bce1a8..557afb8 100644 --- a/test/helpers/test-bot.js +++ b/test/helpers/test-bot.js @@ -27,10 +27,10 @@ module.exports = function TestBot (opts = {}) { ...opts, box2: { legacyMode: true, - ...opts.box2, + ...opts.box2 }, // we don't want testbot to import db2 for us, we want more granularity and control of dep versions - db1: true, + db1: true }) if (opts.debug) { From 976498216c279f85e791bdf1d1bba5f260e6936c Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Tue, 7 Nov 2023 14:42:43 +0100 Subject: [PATCH 07/10] Update box2 --- package-lock.json | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6dbc694..6bc4401 100644 --- a/package-lock.json +++ b/package-lock.json @@ -37,7 +37,7 @@ "scuttle-testbot": "^2.1.0", "scuttle-testbot-1-11-0": "npm:scuttle-testbot@1.11.0", "ssb-backlinks-2-1-1": "npm:ssb-backlinks@2.1.1", - "ssb-box2": "github:ssbc/ssb-box2#box2-path", + "ssb-box2": "^7.4.0", "ssb-db2": "^7.1.1", "ssb-query-2-4-5": "npm:ssb-query@2.4.5", "ssb-replicate": "^1.3.3", @@ -5380,10 +5380,10 @@ } }, "node_modules/ssb-box2": { - "version": "7.2.0", - "resolved": "git+ssh://git@github.com/ssbc/ssb-box2.git#ac9db4ab7e224518c4296e91757793a018bee640", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/ssb-box2/-/ssb-box2-7.4.0.tgz", + "integrity": "sha512-LH4NeFnKrIYEYKJZOFWkaJKgjN5ZTTDdplFkuUGr7GA36oPfvapAz/xrFIVE3Q3I+ffBZmjbWGIQe/aiWuhi7A==", "dev": true, - "license": "LGPL-3.0-only", "dependencies": { "envelope-js": "^1.3.2", "private-group-spec": "^2.1.1", diff --git a/package.json b/package.json index baa1b4d..1fefbd2 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "cross-env": "^7.0.3", "is-canonical-base64": "^1.1.1", "scuttle-testbot": "^2.1.0", - "ssb-box2": "github:ssbc/ssb-box2#box2-path", + "ssb-box2": "^7.4.0", "ssb-db2": "^7.1.1", "ssb-replicate": "^1.3.3", "standard": "^17.1.0", From bf6a4f94876faa5b14b8955d24c4230670504b8e Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Tue, 7 Nov 2023 17:07:37 +0100 Subject: [PATCH 08/10] Kill crashed bot in test by running in separate process --- test/from-old-versions.test.js | 19 +++++++++++++++---- test/helpers/throw-bot.js | 14 ++++++++++++++ 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 test/helpers/throw-bot.js diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index 6f77f72..467e99d 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -1,8 +1,10 @@ const test = require('tape') const { promisify: p } = require('util') +const childProcess = require('node:child_process') const OldTestBot = require('scuttle-testbot-1-11-0') const NewBot = require('./helpers/test-bot') +const { join } = require('path') const OldBot = (opts) => { let stack = OldTestBot // eslint-disable-line @@ -34,15 +36,24 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { await p(setTimeout)(500) + // we have to do it this way because we have no normal way of killing a bot that's crashed and therefore releasing its DB locks. + const throwChild = childProcess.fork(join(__dirname, 'helpers/throw-bot.js')) + + await new Promise((res) => { + throwChild.on("message", (msg) => { + t.match(msg, /found an old keystore/, "error when there's an old keystore but we don't use it") + + throwChild.kill() + + res() + }) + }) + const newOpts = { name: 'alice', startUnclean: true } - // t.throws(() => { - // NewBot(newOpts) - // }, /found an old keystore/, "Error when there's an old keystore but we don't use it") - const newAlice = NewBot({ ...newOpts, box2: { diff --git a/test/helpers/throw-bot.js b/test/helpers/throw-bot.js new file mode 100644 index 0000000..e0d3bdb --- /dev/null +++ b/test/helpers/throw-bot.js @@ -0,0 +1,14 @@ +// this file is used in test/from-old-versions.test.js + +const NewBot = require('./test-bot') + +const newOpts = { + name: 'alice', + startUnclean: true +} + +try { + NewBot(newOpts) +} catch (err) { + process.send(err.message) +} From ad168473fa66f26edec1fdadab483efcde63f4cd Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Tue, 7 Nov 2023 17:20:22 +0100 Subject: [PATCH 09/10] Add timeout in test --- test/from-old-versions.test.js | 8 +++++--- test/helpers/test-bot.js | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index 467e99d..2aa7f1f 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -39,16 +39,18 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { // we have to do it this way because we have no normal way of killing a bot that's crashed and therefore releasing its DB locks. const throwChild = childProcess.fork(join(__dirname, 'helpers/throw-bot.js')) - await new Promise((res) => { - throwChild.on("message", (msg) => { + await new Promise((resolve) => { + throwChild.on('message', (msg) => { t.match(msg, /found an old keystore/, "error when there's an old keystore but we don't use it") throwChild.kill() - res() + resolve() }) }) + await p(setTimeout)(500) + const newOpts = { name: 'alice', startUnclean: true diff --git a/test/helpers/test-bot.js b/test/helpers/test-bot.js index cb80fde..fefe1cd 100644 --- a/test/helpers/test-bot.js +++ b/test/helpers/test-bot.js @@ -16,7 +16,7 @@ module.exports = function TestBot (opts = {}) { .use(require('ssb-classic')) .use(require('ssb-db2/compat')) .use(require('ssb-db2/compat/feedstate')) - .use(require("ssb-db2/compat/post")) + .use(require('ssb-db2/compat/post')) .use(require('ssb-box2')) .use(require('../..')) @@ -31,7 +31,7 @@ module.exports = function TestBot (opts = {}) { ...opts.box2 }, // we don't want testbot to import db1 or db2 for us, we want to control what db2 plugins get imported - noDefaultUse: true, + noDefaultUse: true }) if (opts.debug) { From 835a6df39141d59f5ee74442346787a497daaa61 Mon Sep 17 00:00:00 2001 From: Jacob Karlsson Date: Tue, 7 Nov 2023 17:27:52 +0100 Subject: [PATCH 10/10] Try bumping timeout --- test/from-old-versions.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/from-old-versions.test.js b/test/from-old-versions.test.js index 2aa7f1f..3782445 100644 --- a/test/from-old-versions.test.js +++ b/test/from-old-versions.test.js @@ -49,7 +49,7 @@ test('can continue from old keyring from ssb-tribes 3.1.3', async t => { }) }) - await p(setTimeout)(500) + await p(setTimeout)(1000) const newOpts = { name: 'alice',