From af071d9eee49a0e11e101d73f0347b8fb08f54a0 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Thu, 22 Jul 2021 15:10:16 +0200 Subject: [PATCH 01/17] chore: switch to esm BREAKING CHANGE: built content includes ESM and CJS --- .aegir.js => .aegir.cjs | 0 index.js | 16 ------ package.json | 67 +++++++++++++++----------- compare.js => src/compare.js | 4 +- concat.js => src/concat.js | 4 +- equals.js => src/equals.js | 4 +- from-string.js => src/from-string.js | 6 +-- src/index.js | 15 ++++++ to-string.js => src/to-string.js | 6 +-- {util => src/util}/bases.js | 16 +++--- xor.js => src/xor.js | 4 +- test/compare.spec.js | 6 +-- test/concat.spec.js | 6 +-- test/equals.spec.js | 6 +-- test/from-string.spec.js | 12 ++--- test/to-string.spec.js | 6 +-- test/xor.spec.js | 6 +-- tsconfig.json | 25 +++++----- types/src/compare.d.ts | 8 +++ types/src/compare.d.ts.map | 1 + types/src/concat.d.ts | 8 +++ types/src/concat.d.ts.map | 1 + types/src/equals.d.ts | 8 +++ types/src/equals.d.ts.map | 1 + types/src/from-string.d.ts | 17 +++++++ types/src/from-string.d.ts.map | 1 + types/src/index.d.ts | 8 +++ types/src/index.d.ts.map | 1 + types/src/to-string.d.ts | 17 +++++++ types/src/to-string.d.ts.map | 1 + types/src/util/bases.d.ts | 35 ++++++++++++++ types/src/util/bases.d.ts.map | 1 + types/src/xor.d.ts | 8 +++ types/src/xor.d.ts.map | 1 + types/tsconfig-types.aegir.tsbuildinfo | 1 + 35 files changed, 223 insertions(+), 104 deletions(-) rename .aegir.js => .aegir.cjs (100%) delete mode 100644 index.js rename compare.js => src/compare.js (91%) rename concat.js => src/concat.js (92%) rename equals.js => src/equals.js (90%) rename from-string.js => src/from-string.js (89%) create mode 100644 src/index.js rename to-string.js => src/to-string.js (89%) rename {util => src/util}/bases.js (87%) rename xor.js => src/xor.js (91%) create mode 100644 types/src/compare.d.ts create mode 100644 types/src/compare.d.ts.map create mode 100644 types/src/concat.d.ts create mode 100644 types/src/concat.d.ts.map create mode 100644 types/src/equals.d.ts create mode 100644 types/src/equals.d.ts.map create mode 100644 types/src/from-string.d.ts create mode 100644 types/src/from-string.d.ts.map create mode 100644 types/src/index.d.ts create mode 100644 types/src/index.d.ts.map create mode 100644 types/src/to-string.d.ts create mode 100644 types/src/to-string.d.ts.map create mode 100644 types/src/util/bases.d.ts create mode 100644 types/src/util/bases.d.ts.map create mode 100644 types/src/xor.d.ts create mode 100644 types/src/xor.d.ts.map create mode 100644 types/tsconfig-types.aegir.tsbuildinfo diff --git a/.aegir.js b/.aegir.cjs similarity index 100% rename from .aegir.js rename to .aegir.cjs diff --git a/index.js b/index.js deleted file mode 100644 index f8ffa90..0000000 --- a/index.js +++ /dev/null @@ -1,16 +0,0 @@ -'use strict' -const compare = require('./compare') -const concat = require('./concat') -const equals = require('./equals') -const fromString = require('./from-string') -const toString = require('./to-string') -const xor = require('./xor') - -module.exports = { - compare, - concat, - equals, - fromString, - toString, - xor -} diff --git a/package.json b/package.json index e7cb377..8fd2314 100644 --- a/package.json +++ b/package.json @@ -2,40 +2,17 @@ "name": "uint8arrays", "version": "2.1.8", "description": "Utility functions to make dealing with Uint8Arrays easier", - "main": "index.js", + "main": "src/index.js", "author": "Alex Potsides ", "homepage": "https://github.com/achingbrain/uint8arrays", "bugs": "https://github.com/achingbrain/uint8arrays/issues", - "types": "dist/index.d.ts", - "typesVersions": { - "*": { - "*": [ - "dist/*" - ], - "index.js": [ - "dist/index.d.ts" - ] - } - }, - "files": [ - "compare.js", - "concat.js", - "equals.js", - "from-string.js", - "index.js", - "to-string.js", - "xor.js", - "dist/**/*.ts", - "dist/**/*.map", - "dist/**/*.js", - "util/*.js" - ], + "type": "module", + "types": "dist/types/index.d.ts", "repository": { "type": "git", "url": "https://github.com/achingbrain/uint8arrays.git" }, "scripts": { - "prepare": "aegir build --no-bundle", "test": "aegir test", "lint": "aegir ts -p check && aegir lint", "release": "aegir release", @@ -48,15 +25,51 @@ "multiformats": "^9.4.2" }, "devDependencies": { - "aegir": "^34.0.2", + "aegir": "https://gitpkg.now.sh/ipfs/aegir?feat/build-esm-modules-follow-up", "util": "^0.12.4" }, "eslintConfig": { "extends": "ipfs", + "parserOptions": { + "sourceType": "module" + }, "ignorePatterns": [ "!.aegir.js" ] }, + "typesVersions": { + "*": { + "*": [ + "types/*" + ], + "types/*": [ + "types/*" + ] + } + }, + "exports": { + ".": { + "import": "./src/index.js" + }, + "./compare": { + "import": "./src/compare.js" + }, + "./concat": { + "import": "./src/concat.js" + }, + "./equals": { + "import": "./src/equals.js" + }, + "./fromString": { + "import": "./src/from-string.js" + }, + "./toString": { + "import": "./src/to-string.js" + }, + "./xor": { + "import": "./src/xor.js" + } + }, "contributors": [ "achingbrain ", "Cayman ", diff --git a/compare.js b/src/compare.js similarity index 91% rename from compare.js rename to src/compare.js index 951d4cb..79a6ad4 100644 --- a/compare.js +++ b/src/compare.js @@ -1,5 +1,3 @@ -'use strict' - /** * Can be used with Array.sort to sort and array with Uint8Array entries * @@ -28,4 +26,4 @@ function compare (a, b) { return 0 } -module.exports = compare +export default compare diff --git a/concat.js b/src/concat.js similarity index 92% rename from concat.js rename to src/concat.js index c130089..47fdbee 100644 --- a/concat.js +++ b/src/concat.js @@ -1,5 +1,3 @@ -'use strict' - /** * Returns a new Uint8Array created by concatenating the passed ArrayLikes * @@ -22,4 +20,4 @@ function concat (arrays, length) { return output } -module.exports = concat +export default concat diff --git a/equals.js b/src/equals.js similarity index 90% rename from equals.js rename to src/equals.js index af149f6..077f33d 100644 --- a/equals.js +++ b/src/equals.js @@ -1,5 +1,3 @@ -'use strict' - /** * Returns true if the two passed Uint8Arrays have the same content * @@ -24,4 +22,4 @@ function equals (a, b) { return true } -module.exports = equals +export default equals diff --git a/from-string.js b/src/from-string.js similarity index 89% rename from from-string.js rename to src/from-string.js index e869c7e..bbcd27d 100644 --- a/from-string.js +++ b/src/from-string.js @@ -1,6 +1,4 @@ -'use strict' - -const bases = require('./util/bases') +import bases from './util/bases.js' /** * @typedef {import('./util/bases').SupportedEncodings} SupportedEncodings @@ -28,4 +26,4 @@ function fromString (string, encoding = 'utf8') { return base.decoder.decode(`${base.prefix}${string}`) } -module.exports = fromString +export default fromString diff --git a/src/index.js b/src/index.js new file mode 100644 index 0000000..6eda524 --- /dev/null +++ b/src/index.js @@ -0,0 +1,15 @@ +import compare from './compare.js' +import concat from './concat.js' +import equals from './equals.js' +import fromString from './from-string.js' +import toString from './to-string.js' +import xor from './xor.js' + +export { + compare, + concat, + equals, + fromString, + toString, + xor +} diff --git a/to-string.js b/src/to-string.js similarity index 89% rename from to-string.js rename to src/to-string.js index 670881c..57ddfa3 100644 --- a/to-string.js +++ b/src/to-string.js @@ -1,6 +1,4 @@ -'use strict' - -const bases = require('./util/bases') +import bases from './util/bases.js' /** * @typedef {import('./util/bases').SupportedEncodings} SupportedEncodings @@ -28,4 +26,4 @@ function toString (array, encoding = 'utf8') { return base.encoder.encode(array).substring(1) } -module.exports = toString +export default toString diff --git a/util/bases.js b/src/util/bases.js similarity index 87% rename from util/bases.js rename to src/util/bases.js index bc31fe1..79a0c18 100644 --- a/util/bases.js +++ b/src/util/bases.js @@ -1,6 +1,4 @@ - 'use strict' - -const { bases } = require('multiformats/basics') +import { bases } from 'multiformats/basics' /** * @typedef {import('multiformats/bases/interface').MultibaseCodec} MultibaseCodec @@ -62,14 +60,14 @@ const ascii = createCodec('ascii', 'a', (buf) => { * @type {Record} */ const BASES = { - 'utf8': string, + utf8: string, 'utf-8': string, - 'hex': bases.base16, - 'latin1': ascii, - 'ascii': ascii, - 'binary': ascii, + hex: bases.base16, + latin1: ascii, + ascii: ascii, + binary: ascii, ...bases } -module.exports = BASES +export default BASES diff --git a/xor.js b/src/xor.js similarity index 91% rename from xor.js rename to src/xor.js index dabbba9..c23fe4b 100644 --- a/xor.js +++ b/src/xor.js @@ -1,5 +1,3 @@ -'use strict' - /** * Returns the xor distance between two arrays * @@ -20,4 +18,4 @@ function xor (a, b) { return result } -module.exports = xor +export default xor diff --git a/test/compare.spec.js b/test/compare.spec.js index f0c144c..dbcf3ae 100644 --- a/test/compare.spec.js +++ b/test/compare.spec.js @@ -1,8 +1,8 @@ /* eslint-env mocha */ -'use strict' -const { expect } = require('aegir/utils/chai') -const compare = require('../compare') +// @ts-ignore +import { expect } from 'aegir/utils/chai.js' +import compare from '../src/compare.js' describe('Uint8Array compare', () => { it('is stable', () => { diff --git a/test/concat.spec.js b/test/concat.spec.js index ecb6354..26e5ce0 100644 --- a/test/concat.spec.js +++ b/test/concat.spec.js @@ -1,8 +1,8 @@ /* eslint-env mocha */ -'use strict' -const { expect } = require('aegir/utils/chai') -const concat = require('../concat') +// @ts-ignore +import { expect } from 'aegir/utils/chai.js' +import concat from '../src/concat.js' describe('Uint8Array concat', () => { it('concats two Uint8Arrays', () => { diff --git a/test/equals.spec.js b/test/equals.spec.js index 9129cf0..47e8af8 100644 --- a/test/equals.spec.js +++ b/test/equals.spec.js @@ -1,8 +1,8 @@ /* eslint-env mocha */ -'use strict' -const { expect } = require('aegir/utils/chai') -const equals = require('../equals') +// @ts-ignore +import { expect } from 'aegir/utils/chai.js' +import equals from '../src/equals.js' describe('Uint8Array equals', () => { it('finds two Uint8Arrays equal', () => { diff --git a/test/from-string.spec.js b/test/from-string.spec.js index abc64ca..439664b 100644 --- a/test/from-string.spec.js +++ b/test/from-string.spec.js @@ -1,12 +1,12 @@ /* eslint-env mocha */ -'use strict' -const { expect } = require('aegir/utils/chai') -const fromString = require('../from-string') -const toString = require('../to-string') -const bases = require('../util/bases') +// @ts-ignore +import { expect } from 'aegir/utils/chai.js' +import fromString from '../src/from-string.js' +import toString from '../src/to-string.js' +import bases from '../src/util/bases.js' -/** @type {import('../util/bases').SupportedEncodings[]} */ +/** @type {import('../src/util/bases').SupportedEncodings[]} */ // @ts-ignore Object.keys returns a string[] const supportedBases = Object.keys(bases) diff --git a/test/to-string.spec.js b/test/to-string.spec.js index ca5a9c7..e1787bf 100644 --- a/test/to-string.spec.js +++ b/test/to-string.spec.js @@ -1,8 +1,8 @@ /* eslint-env mocha */ -'use strict' -const { expect } = require('aegir/utils/chai') -const toString = require('../to-string') +// @ts-ignore +import { expect } from 'aegir/utils/chai.js' +import toString from '../src/to-string.js' describe('Uint8Array toString', () => { it('creates a String from a Uint8Array', () => { diff --git a/test/xor.spec.js b/test/xor.spec.js index 3ceb306..74b7adf 100644 --- a/test/xor.spec.js +++ b/test/xor.spec.js @@ -1,8 +1,8 @@ /* eslint-env mocha */ -'use strict' -const { expect } = require('aegir/utils/chai') -const xor = require('../xor') +// @ts-ignore +import { expect } from 'aegir/utils/chai.js' +import xor from '../src/xor.js' describe('Uint8Array xor', () => { it('xors 1,0 and 0,1', () => { diff --git a/tsconfig.json b/tsconfig.json index b0af813..18f313b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,15 @@ { - "extends": "aegir/src/config/tsconfig.aegir.json", - "compilerOptions": { - "outDir": "dist" - }, - "include": [ - "test", - "util", - "*.js", - ".aegir.js" - ] -} + "extends": "aegir/src/config/tsconfig.aegir.json", + "compilerOptions": { + "declarationDir": "./dist/types", + "importsNotUsedAsValues": "preserve" + }, + "include": [ + "src", + "test" + ], + "exclude": [ + "dist", + "node_modules" + ] +} \ No newline at end of file diff --git a/types/src/compare.d.ts b/types/src/compare.d.ts new file mode 100644 index 0000000..dd23039 --- /dev/null +++ b/types/src/compare.d.ts @@ -0,0 +1,8 @@ +/** + * Can be used with Array.sort to sort and array with Uint8Array entries + * + * @param {Uint8Array} a + * @param {Uint8Array} b + */ +export function compare(a: Uint8Array, b: Uint8Array): 0 | 1 | -1; +//# sourceMappingURL=compare.d.ts.map \ No newline at end of file diff --git a/types/src/compare.d.ts.map b/types/src/compare.d.ts.map new file mode 100644 index 0000000..e8238eb --- /dev/null +++ b/types/src/compare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../src/compare.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,2BAHW,UAAU,KACV,UAAU,cAsBpB"} \ No newline at end of file diff --git a/types/src/concat.d.ts b/types/src/concat.d.ts new file mode 100644 index 0000000..960ca19 --- /dev/null +++ b/types/src/concat.d.ts @@ -0,0 +1,8 @@ +/** + * Returns a new Uint8Array created by concatenating the passed ArrayLikes + * + * @param {Array>} arrays + * @param {number} [length] + */ +export function concat(arrays: Array>, length?: number | undefined): Uint8Array; +//# sourceMappingURL=concat.d.ts.map \ No newline at end of file diff --git a/types/src/concat.d.ts.map b/types/src/concat.d.ts.map new file mode 100644 index 0000000..75f533b --- /dev/null +++ b/types/src/concat.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../src/concat.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,+BAHW,MAAM,UAAU,MAAM,CAAC,CAAC,2CAiBlC"} \ No newline at end of file diff --git a/types/src/equals.d.ts b/types/src/equals.d.ts new file mode 100644 index 0000000..4c4df17 --- /dev/null +++ b/types/src/equals.d.ts @@ -0,0 +1,8 @@ +/** + * Returns true if the two passed Uint8Arrays have the same content + * + * @param {Uint8Array} a + * @param {Uint8Array} b + */ +export function equals(a: Uint8Array, b: Uint8Array): boolean; +//# sourceMappingURL=equals.d.ts.map \ No newline at end of file diff --git a/types/src/equals.d.ts.map b/types/src/equals.d.ts.map new file mode 100644 index 0000000..f4b4fb7 --- /dev/null +++ b/types/src/equals.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../src/equals.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,0BAHW,UAAU,KACV,UAAU,WAkBpB"} \ No newline at end of file diff --git a/types/src/from-string.d.ts b/types/src/from-string.d.ts new file mode 100644 index 0000000..a2a48d5 --- /dev/null +++ b/types/src/from-string.d.ts @@ -0,0 +1,17 @@ +/** + * @typedef {import('./util/bases').SupportedEncodings} SupportedEncodings + */ +/** + * Create a `Uint8Array` from the passed string + * + * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module. + * + * Also `ascii` which is similar to node's 'binary' encoding. + * + * @param {string} string + * @param {SupportedEncodings} [encoding=utf8] - utf8, base16, base64, base64urlpad, etc + * @returns {Uint8Array} + */ +export function fromString(string: string, encoding?: import("./util/bases.js").SupportedEncodings | undefined): Uint8Array; +export type SupportedEncodings = import('./util/bases').SupportedEncodings; +//# sourceMappingURL=from-string.d.ts.map \ No newline at end of file diff --git a/types/src/from-string.d.ts.map b/types/src/from-string.d.ts.map new file mode 100644 index 0000000..0b2f12f --- /dev/null +++ b/types/src/from-string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"from-string.d.ts","sourceRoot":"","sources":["../../src/from-string.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,mCAJW,MAAM,wEAEJ,UAAU,CAWtB;iCAvBY,OAAO,cAAc,EAAE,kBAAkB"} \ No newline at end of file diff --git a/types/src/index.d.ts b/types/src/index.d.ts new file mode 100644 index 0000000..7a4a255 --- /dev/null +++ b/types/src/index.d.ts @@ -0,0 +1,8 @@ +import { compare } from "./compare.js"; +import { concat } from "./concat.js"; +import { equals } from "./equals.js"; +import { fromString } from "./from-string.js"; +import { toString } from "./to-string.js"; +import { xor } from "./xor.js"; +export { compare, concat, equals, fromString, toString, xor }; +//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/types/src/index.d.ts.map b/types/src/index.d.ts.map new file mode 100644 index 0000000..4b136e2 --- /dev/null +++ b/types/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/types/src/to-string.d.ts b/types/src/to-string.d.ts new file mode 100644 index 0000000..bf72c50 --- /dev/null +++ b/types/src/to-string.d.ts @@ -0,0 +1,17 @@ +/** + * @typedef {import('./util/bases').SupportedEncodings} SupportedEncodings + */ +/** + * Turns a `Uint8Array` into a string. + * + * Supports `utf8`, `utf-8` and any encoding supported by the multibase module. + * + * Also `ascii` which is similar to node's 'binary' encoding. + * + * @param {Uint8Array} array - The array to turn into a string + * @param {SupportedEncodings} [encoding=utf8] - The encoding to use + * @returns {string} + */ +export function toString(array: Uint8Array, encoding?: import("./util/bases.js").SupportedEncodings | undefined): string; +export type SupportedEncodings = import('./util/bases').SupportedEncodings; +//# sourceMappingURL=to-string.d.ts.map \ No newline at end of file diff --git a/types/src/to-string.d.ts.map b/types/src/to-string.d.ts.map new file mode 100644 index 0000000..32a7f7c --- /dev/null +++ b/types/src/to-string.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"to-string.d.ts","sourceRoot":"","sources":["../../src/to-string.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,gCAJW,UAAU,wEAER,MAAM,CAWlB;iCAvBY,OAAO,cAAc,EAAE,kBAAkB"} \ No newline at end of file diff --git a/types/src/util/bases.d.ts b/types/src/util/bases.d.ts new file mode 100644 index 0000000..0221b0e --- /dev/null +++ b/types/src/util/bases.d.ts @@ -0,0 +1,35 @@ +export default BASES; +export type MultibaseCodec = import('multiformats/bases/interface').MultibaseCodec; +export type SupportedEncodings = 'utf8' | 'utf-8' | 'hex' | 'latin1' | 'ascii' | 'binary' | keyof { + base64: import("multiformats/bases/base").Codec; + base64pad: import("multiformats/bases/base").Codec; + base64url: import("multiformats/bases/base").Codec; + base64urlpad: import("multiformats/bases/base").Codec; + base58btc: import("multiformats/bases/base").Codec<"base58btc", "z">; + base58flickr: import("multiformats/bases/base").Codec<"base58flickr", "Z">; + base36: import("multiformats/bases/base").Codec<"base36", "k">; + base36upper: import("multiformats/bases/base").Codec<"base36upper", "K">; + base32: import("multiformats/bases/base").Codec; + base32upper: import("multiformats/bases/base").Codec; + base32pad: import("multiformats/bases/base").Codec; + base32padupper: import("multiformats/bases/base").Codec; + base32hex: import("multiformats/bases/base").Codec; + base32hexupper: import("multiformats/bases/base").Codec; + base32hexpad: import("multiformats/bases/base").Codec; + base32hexpadupper: import("multiformats/bases/base").Codec; + base32z: import("multiformats/bases/base").Codec; + base16: import("multiformats/bases/base").Codec; + base16upper: import("multiformats/bases/base").Codec; + base10: import("multiformats/bases/base").Codec<"base10", "9">; + base8: import("multiformats/bases/base").Codec; + base2: import("multiformats/bases/base").Codec; + identity: import("multiformats/bases/base").Codec<"identity", "\0">; +}; +/** + * @typedef {'utf8' | 'utf-8' | 'hex' | 'latin1' | 'ascii' | 'binary' | keyof bases } SupportedEncodings + */ +/** + * @type {Record} + */ +declare const BASES: Record>; +//# sourceMappingURL=bases.d.ts.map \ No newline at end of file diff --git a/types/src/util/bases.d.ts.map b/types/src/util/bases.d.ts.map new file mode 100644 index 0000000..d021654 --- /dev/null +++ b/types/src/util/bases.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"bases.d.ts","sourceRoot":"","sources":["../../../src/util/bases.js"],"names":[],"mappings":";6BAGa,OAAO,8BAA8B,EAAE,cAAc,CAAC,GAAG,CAAC;iCAoD1D,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAAW;AADnF;;GAEG;AAEH;;GAEG;AACH,qBAFU,OAAO,kBAAkB,6DAAiB,CAWnD"} \ No newline at end of file diff --git a/types/src/xor.d.ts b/types/src/xor.d.ts new file mode 100644 index 0000000..deef5bb --- /dev/null +++ b/types/src/xor.d.ts @@ -0,0 +1,8 @@ +/** + * Returns the xor distance between two arrays + * + * @param {Uint8Array} a + * @param {Uint8Array} b + */ +export function xor(a: Uint8Array, b: Uint8Array): Uint8Array; +//# sourceMappingURL=xor.d.ts.map \ No newline at end of file diff --git a/types/src/xor.d.ts.map b/types/src/xor.d.ts.map new file mode 100644 index 0000000..2c757cb --- /dev/null +++ b/types/src/xor.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"xor.d.ts","sourceRoot":"","sources":["../../src/xor.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,uBAHW,UAAU,KACV,UAAU,cAcpB"} \ No newline at end of file diff --git a/types/tsconfig-types.aegir.tsbuildinfo b/types/tsconfig-types.aegir.tsbuildinfo new file mode 100644 index 0000000..397ed0f --- /dev/null +++ b/types/tsconfig-types.aegir.tsbuildinfo @@ -0,0 +1 @@ +{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/compare.js","../src/concat.js","../src/equals.js","../node_modules/multiformats/types/bases/interface.d.ts","../node_modules/multiformats/types/hashes/interface.d.ts","../node_modules/multiformats/types/cid.d.ts","../node_modules/multiformats/types/hashes/digest.d.ts","../node_modules/multiformats/types/hashes/hasher.d.ts","../node_modules/multiformats/types/varint.d.ts","../node_modules/multiformats/types/bytes.d.ts","../node_modules/multiformats/types/index.d.ts","../node_modules/multiformats/types/codecs/interface.d.ts","../node_modules/multiformats/types/codecs/raw.d.ts","../node_modules/multiformats/types/codecs/json.d.ts","../node_modules/multiformats/types/bases/base.d.ts","../node_modules/multiformats/types/basics.d.ts","../src/util/bases.js","../src/from-string.js","../src/to-string.js","../src/xor.js","../src/index.js","../node_modules/@types/chai/index.d.ts","../node_modules/@types/chai-as-promised/index.d.ts","../node_modules/@types/chai-string/index.d.ts","../node_modules/@types/chai-subset/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/minimatch/index.d.ts","../node_modules/@types/minimist/index.d.ts","../node_modules/@types/mocha/index.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/parse-json/index.d.ts","../node_modules/@types/retry/index.d.ts","../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts","../node_modules/@types/sinon/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts","../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"a8fe23ae87c3e9d2877032cafeb290f2ebe0c51e216d175a0408b10915ebe9f0","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"43ef20773e5b03d85849bcf861ac23bd1f34d56182acfc91b28db13ca51dfa16","6a7ad741586caaa5d07c4c4e30c52202107af734ddfe7299f993cbd2d84ce60f","b0890a943496425efd6672c6e0ef0d62290d61399b6f169aee6c60844ff9ffef","930446bf32192f698b78f8ea4b309d8c2cfe02ab5ad78e4db907417405ebf5e7","a5de53bdfcdca7af39e735be7bbd736c38b1e34eeec36bd6a835a0e37ba23705","ef706b4970dd8bf7ab414bb981993d4f379845f3592622237bad1b3332fde794","853c5447ea8851049c1d008e130d23030d9fe3b5a8405a0ae7e55b00e173692d","fbb30441703cfccfe241fbdb604f01e1e5ac558eec5d3f04fd32281dc9b3cdb9","0d04077273d749e79acaeacf0c42ea3d1139bdf5fc8823d0e64740a5735fbca1","32b67d761db3999f1e482d0add405b695d3ec5607e07ae4c963a96334c331814","1428847d803b8342711c0b22208df4f83590cce15ef2c8f36ba53cea24f4616d","6bea75e2b9873f7c123ffef3edf16e7c49ff7cefd2756543d51786fb354c3211","f607b8e53a150350f0dc1495cb040510e9b4deeb552ed033fb2e956ff8bb8e2e","cce8396f18f02507dac2833fd5d7eebc2ee03303f3d53f33067efdb5b772d556","2319e1788f418f20dec0cfaff0d84e89cfc51d40fd4467370eb0b839347902e9","83173d9e73be5e5d22cf0b1d82f656165a02bef57e115b7a6c3e883e0598cc15","d8599b33a0e9fac229a0cde2b6e784dc7cda162643f687efdebf9d617e0783f1","a17f17217b13a030baf255fa6a3cc11969f4123c1efd796fbbb973721b7a4324","b3d1b8dd5a537dcf6d9c7fde96b41c459547d7500bd8ebcc8fc60c90eb0b3d8c","993d12360bb11bef95b71a5a05bc2b14548cb8d0d5a2086521ae1a9111c80d40","548c5f0c09adbf00db8079082d416fbe329f11c967b9575c7010a8df2d35361f",{"version":"f7834c76f2d4db5fb156f2f18fdf855431843cf0d32620fcf24b836cd4a85096","affectsGlobalScope":true},{"version":"f6ae17283c6912c202004178339d6d22f8c9edfe4e335f9f11b555c631633daf","affectsGlobalScope":true},{"version":"41071d2f1a39386d10bf36d1ba4712ad42a900047f16a109936df9e48f13673e","affectsGlobalScope":true},{"version":"f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71","affectsGlobalScope":true},"de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","a185ebc69c9f6798ebd67bfdfd72a37457dc67c23459784783c7128ae9bd5250","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true},"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bf629ebbac2c65601bcb5c032644023a2b4b3b1151c0d1bf60ced7c35cc81b5d","affectsGlobalScope":true},"0ddef426964b396f57357b9e61209dd558f7652dd06af5a35893d296c29dff7a",{"version":"b0f339dfc10ee8baac59f7d37d24d963216311b8894a776bc0ed18b77de81fe2","affectsGlobalScope":true},"ca3b86d3300cb6817ee3d161421db0b4994d168fb5820a33c89743bc73716292","3669eaf567a388a01c91df316093c2c8f565ba4c27a4ae0866e45ec932472b15",{"version":"5012207e217a67f821855e1ce3059e089953847e1ce0adff8186a46c459e96f7","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","c9ea3bedb7f5bfb493e375136dc70723bded041efc311c654d06ab7a7d0280d8","decd29e5c9dfd0159e88721a4986dff6b58d255012ade0cacba7130dc7abe3c1","7ed1067f8c4acf58cdaf97c0a755445a56a61b54ef70d59da7aa73743912b189","71e7ae0849476c298e522bc8a7b29e85a982f7b9ec90a133bf8f45a8c25d01c9","95f59cb29266f9a11b4eadd67b6b96268d8a0e0ab99a933df0d9b7ec5a42806b","9c158ac9bc84d33422b85d4f274f47790e59b9729e739d4fc3f3abff8770d270",{"version":"a976ad617bce5d95209068df27cb6ad69e367f2a72e193c7dbabb73dc35b533c","affectsGlobalScope":true},"ae970d705be0b31839d7e773efc751ab00438f5c1ff36577cc2ac72c3156c44b","252892c3bc1a3322a655e887671e4bb5dcaf7dcd5a6f5a78d210c64419733a8d","f7d60b8a9be58779e95cce126c4a3c985497556257c4e323aa836e419f26e3aa","d421d2324434c851830535137ff327b6cc4e9eaa428745300ccb478d0113cb4b","2b8374271ab2a2fff2efa2eca782782d94157121d7a12b7ec4827c8ba1a87abb","ed3129f404bfea369c236104e125d5f3885d78540f8f37d3c7e90f0c2449b50f",{"version":"241dce6950eeec0a86f8c8f292b0e865b710083f0e3850decec889b46914a520","affectsGlobalScope":true},"298ca2d6112d194797d0e2eebf54867c84ac18fd0b60eb6e001467e8b5addcf7","8e8df21b9513f0a1de0e9bad48243f8aad8c065c7ab695074e7a6c276596cc62","1b7690edef33f9d150a4ac170d662a9dffedc08e4c9504ece603785007ffdba1","62d37937d7321b1df75292b92eb984babf32302748f200d8aabf67328b37bed0",{"version":"e8a92400cdf00bbbcc93ec1c57f8bad21cc0723c959ebc5da165ae3aa190e5a4","affectsGlobalScope":true},"d1b323391b9604f2fa2cca0ddf206a951feb745fd36d400677447436cc7b4f8d","760bf13f54eafb24321fdc0d74e3293e3f2030527729a351370377169fc1442c","0b28384ffe11674b35d97b9f91248d3f00f823fc4ffc67070e71206a5c7e6305","695bfa2ca7a20a9d4e43f3b7a8af58ce76b12e094b07203bd9bf47345cba7626","187acc08c6fc060163b8df4c5103b4228b25d669efc74e31b84479a55ffa11af","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","912e95aafa5d85e0636eab990cdcfe2f288310dcd9ee5b7c028d8231e179e967",{"version":"93c6f408623f52df4fd29ed34f3e9cabbe2f4041a6c58ffe9df0f565bad441df","affectsGlobalScope":true},"009f2558b6ae78151e24cc2f1a43bac7599a0a65ddffa9707a924ca1e354d4b2","21ac36b32a69c93318314047186a9ee6d69d9644dab7cd8d8dc256e1031545a6","4b465e7d07abea8e7cfe4e50a63b901a0a32e283f8a81eb7f569e623dc2a6a6a","0fe8b060f4143dcccc5e64f53cb630059304f9b52576cefd9ac5816b0e067c7f","8e140f571d87ed63406cdb71a35790c40055f2a1b1e01269f93ba2fce6338f15","1275061127b8f7878a6f745bd85a7053d17cc757037815fdceb532881d3062a6","0a8c5fb0f16e51973f22f2e01791b9e8376203514e4b72f65a451afebc29f5a0","c19d3a3bb01ac8c5d244c31eac930c451110a58b76ff7a2b82bdffed082e36f6","8ca49a6223d59be5b7228ad99800f01982a1f350eb61c1a195e77547121877bb","55d6f9768363cf0356f4c9fff535ed3c24c67c782a566238cd08fa11a6111940",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"437c2700eaa23c440e97dd4ba5883c75ee82fe8b64772af7bebaa99410776705","de0e63feaddfdf1a7a92071f6e7897d86ca497499116433e99fe15bf4af32e01","6b7029d09218b4187ca45dcde322bc413561b419551e0a6c938d72af37d53817","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","73e8de7786fd2ba696ea4fbd96f0a157b4fc148a25255b8c9199cb69423a7fce","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","58a3914b1cce4560d9ad6eee2b716caaa030eda0a90b21ca2457ea9e2783eaa3","6b40029289530423f407a22755c85b81740f9acfd88d2b53564f8c1657c26660","15b043358a9bac56ee6a567d61adf545b3a09e2f2ead9c3ef3cc617ed3522e71","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","e5e7d3593c0895dd24a6af87e6376ed316f6a9f810ee024679c1e1f421f023b7","b2d70a269840a9528db473ac7565442434333a05c1f66801a7a672e82beb903e"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"importsNotUsedAsValues":1,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":false,"noUnusedLocals":true,"noUnusedParameters":false,"outDir":"./","removeComments":false,"skipLibCheck":true,"strict":true,"stripInternal":true,"target":7},"fileIdsList":[[111],[62,111],[111,119],[73,111],[111,118,119],[74,79,111],[75,85,86,93,102,110,111],[75,76,85,93,111],[77,111],[78,79,86,94,111],[79,102,107,111],[80,82,85,93,111],[81,111],[82,83,111],[84,85,111],[85,111],[85,86,87,102,110,111],[85,86,87,102,111],[88,93,102,110,111],[85,86,88,89,93,102,107,110,111],[88,90,107,110,111],[111,120],[85,91,111],[92,110,111],[82,85,93,102,111],[94,111],[95,111],[73,96,111],[97,109,111,114],[98,111],[99,111],[85,100,111],[100,101,111,113],[85,102,103,111],[102,103,111],[104,111],[85,105,106,111],[105,106,111],[79,93,107,111],[108,111],[71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117],[93,109,111],[88,99,110,111],[79,111],[102,111,112],[111,113],[111,117],[74,79,85,87,96,102,110,111,113,114],[102,111,115],[111,125],[111,127],[85,102,111,121],[44,111],[51,53,54,55,111],[44,45,111],[52,111],[45,111],[45,47,111],[46,47,48,49,50,111],[57,111],[41,42,43,58,59,60,111],[44,56,111]],"referencedMap":[[125,1],[63,2],[64,2],[65,2],[62,1],[66,1],[67,1],[68,1],[69,1],[70,1],[119,3],[71,3],[73,4],[120,5],[74,6],[75,7],[76,8],[77,9],[78,10],[79,11],[80,12],[81,13],[82,14],[83,14],[84,15],[85,16],[86,17],[87,18],[72,1],[116,1],[88,19],[89,20],[90,21],[121,22],[91,23],[92,24],[93,25],[94,26],[95,27],[96,28],[97,29],[98,30],[99,31],[100,32],[101,33],[102,34],[103,35],[104,36],[105,37],[106,38],[107,39],[108,40],[118,41],[109,42],[110,43],[111,44],[112,45],[113,46],[117,47],[114,48],[115,49],[122,1],[123,1],[124,1],[126,50],[127,1],[128,51],[129,52],[55,53],[44,1],[56,54],[50,1],[46,55],[52,1],[54,56],[53,56],[47,57],[48,58],[45,1],[51,59],[49,1],[8,1],[9,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[31,1],[32,1],[33,1],[34,1],[7,1],[39,1],[35,1],[36,1],[37,1],[38,1],[1,1],[40,1],[41,1],[42,1],[43,1],[58,60],[61,61],[59,60],[57,62],[60,1]],"exportedModulesMap":[[125,1],[63,2],[64,2],[65,2],[62,1],[66,1],[67,1],[68,1],[69,1],[70,1],[119,3],[71,3],[73,4],[120,5],[74,6],[75,7],[76,8],[77,9],[78,10],[79,11],[80,12],[81,13],[82,14],[83,14],[84,15],[85,16],[86,17],[87,18],[72,1],[116,1],[88,19],[89,20],[90,21],[121,22],[91,23],[92,24],[93,25],[94,26],[95,27],[96,28],[97,29],[98,30],[99,31],[100,32],[101,33],[102,34],[103,35],[104,36],[105,37],[106,38],[107,39],[108,40],[118,41],[109,42],[110,43],[111,44],[112,45],[113,46],[117,47],[114,48],[115,49],[122,1],[123,1],[124,1],[126,50],[127,1],[128,51],[129,52],[55,53],[44,1],[56,54],[50,1],[46,55],[52,1],[54,56],[53,56],[47,57],[48,58],[45,1],[51,59],[49,1],[8,1],[9,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[31,1],[32,1],[33,1],[34,1],[7,1],[39,1],[35,1],[36,1],[37,1],[38,1],[1,1],[40,1],[41,1],[42,1],[43,1],[58,60],[61,61],[59,60],[57,62],[60,1]],"semanticDiagnosticsPerFile":[125,63,64,65,62,66,67,68,69,70,119,71,73,120,74,75,76,77,78,79,80,81,82,83,84,85,86,87,72,116,88,89,90,121,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,118,109,110,111,112,113,117,114,115,122,123,124,126,127,128,129,55,44,56,50,46,52,54,53,47,48,45,51,49,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,39,35,36,37,38,1,40,41,42,43,58,61,59,57,60]},"version":"4.3.5"} \ No newline at end of file From 6188dfabf76306b573d1af17114e03d4311dba53 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 28 Jul 2021 11:27:29 +0200 Subject: [PATCH 02/17] chore: apply suggestions from code review Co-authored-by: Alex Potsides --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 8fd2314..c45f2a8 100644 --- a/package.json +++ b/package.json @@ -60,10 +60,10 @@ "./equals": { "import": "./src/equals.js" }, - "./fromString": { + "./from-string": { "import": "./src/from-string.js" }, - "./toString": { + "./to-string": { "import": "./src/to-string.js" }, "./xor": { From f7fd98150c3eb82a671d3054928957eaca0cee87 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 28 Jul 2021 10:42:35 +0100 Subject: [PATCH 03/17] fix: use named exports --- README.md | 12 ++++++------ src/compare.js | 4 +--- src/concat.js | 4 +--- src/equals.js | 4 +--- src/from-string.js | 4 +--- src/index.js | 12 ++++++------ src/to-string.js | 4 +--- src/xor.js | 4 +--- test/compare.spec.js | 2 +- test/concat.spec.js | 2 +- test/equals.spec.js | 2 +- test/from-string.spec.js | 4 ++-- test/to-string.spec.js | 2 +- test/xor.spec.js | 2 +- 14 files changed, 25 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index b329b9b..a922ff0 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ Compare two `Uint8Arrays` #### Example ```js -const compare = require('uint8arrays/compare') +import { compare } from 'uint8arrays/compare' const arrays = [ Uint8Array.from([3, 4, 5]), @@ -50,7 +50,7 @@ If you know the length of the arrays, pass it as a second parameter, otherwise i #### Example ```js -const concat = require('uint8arrays/concat') +import { concat } from 'uint8arrays/concat' const arrays = [ Uint8Array.from([0, 1, 2]), @@ -70,7 +70,7 @@ Returns true if the two arrays are the same array or if they have the same lengt #### Example ```js -const equals = require('uint8arrays/equals') +import { equals } from 'uint8arrays/equals' const a = Uint8Array.from([0, 1, 2]) const b = Uint8Array.from([3, 4, 5]) @@ -90,7 +90,7 @@ Supports `utf8` and any of the [multibase encodings](https://github.com/multifor #### Example ```js -const fromString = require('uint8arrays/from-string') +import { fromString } from 'uint8arrays/from-string' console.info(fromString('hello world')) // Uint8Array[104, 101 ... console.info(fromString('00010203aabbcc', 'base16')) // Uint8Array[0, 1 ... @@ -107,7 +107,7 @@ Supports `utf8` and any of the [multibase encodings](https://github.com/multifor #### Example ```js -const toString = require('uint8arrays/to-string') +import { toString } from 'uint8arrays/to-string' console.info(toString(Uint8Array.from([104, 101...]))) // 'hello world' console.info(toString(Uint8Array.from([0, 1, 2...]), 'base16')) // '00010203aabbcc' @@ -122,7 +122,7 @@ Returns a `Uint8Array` containing `a` and `b` xored together. #### Example ```js -const xor = require('uint8arrays/xor') +import { xor } from 'uint8arrays/xor' console.info(xor(Uint8Array.from([1, 0]), Uint8Array.from([0, 1]))) // Uint8Array[1, 1] ``` diff --git a/src/compare.js b/src/compare.js index 79a6ad4..d71d1f2 100644 --- a/src/compare.js +++ b/src/compare.js @@ -4,7 +4,7 @@ * @param {Uint8Array} a * @param {Uint8Array} b */ -function compare (a, b) { +export function compare (a, b) { for (let i = 0; i < a.byteLength; i++) { if (a[i] < b[i]) { return -1 @@ -25,5 +25,3 @@ function compare (a, b) { return 0 } - -export default compare diff --git a/src/concat.js b/src/concat.js index 47fdbee..e03970d 100644 --- a/src/concat.js +++ b/src/concat.js @@ -4,7 +4,7 @@ * @param {Array>} arrays * @param {number} [length] */ -function concat (arrays, length) { +export function concat (arrays, length) { if (!length) { length = arrays.reduce((acc, curr) => acc + curr.length, 0) } @@ -19,5 +19,3 @@ function concat (arrays, length) { return output } - -export default concat diff --git a/src/equals.js b/src/equals.js index 077f33d..3d770b8 100644 --- a/src/equals.js +++ b/src/equals.js @@ -4,7 +4,7 @@ * @param {Uint8Array} a * @param {Uint8Array} b */ -function equals (a, b) { +export function equals (a, b) { if (a === b) { return true } @@ -21,5 +21,3 @@ function equals (a, b) { return true } - -export default equals diff --git a/src/from-string.js b/src/from-string.js index bbcd27d..8f936d3 100644 --- a/src/from-string.js +++ b/src/from-string.js @@ -15,7 +15,7 @@ import bases from './util/bases.js' * @param {SupportedEncodings} [encoding=utf8] - utf8, base16, base64, base64urlpad, etc * @returns {Uint8Array} */ -function fromString (string, encoding = 'utf8') { +export function fromString (string, encoding = 'utf8') { const base = bases[encoding] if (!base) { @@ -25,5 +25,3 @@ function fromString (string, encoding = 'utf8') { // add multibase prefix return base.decoder.decode(`${base.prefix}${string}`) } - -export default fromString diff --git a/src/index.js b/src/index.js index 6eda524..411c9e0 100644 --- a/src/index.js +++ b/src/index.js @@ -1,9 +1,9 @@ -import compare from './compare.js' -import concat from './concat.js' -import equals from './equals.js' -import fromString from './from-string.js' -import toString from './to-string.js' -import xor from './xor.js' +import { compare } from './compare.js' +import { concat } from './concat.js' +import { equals } from './equals.js' +import { fromString } from './from-string.js' +import { toString } from './to-string.js' +import { xor } from './xor.js' export { compare, diff --git a/src/to-string.js b/src/to-string.js index 57ddfa3..c827584 100644 --- a/src/to-string.js +++ b/src/to-string.js @@ -15,7 +15,7 @@ import bases from './util/bases.js' * @param {SupportedEncodings} [encoding=utf8] - The encoding to use * @returns {string} */ -function toString (array, encoding = 'utf8') { +export function toString (array, encoding = 'utf8') { const base = bases[encoding] if (!base) { @@ -25,5 +25,3 @@ function toString (array, encoding = 'utf8') { // strip multibase prefix return base.encoder.encode(array).substring(1) } - -export default toString diff --git a/src/xor.js b/src/xor.js index c23fe4b..35c014c 100644 --- a/src/xor.js +++ b/src/xor.js @@ -4,7 +4,7 @@ * @param {Uint8Array} a * @param {Uint8Array} b */ -function xor (a, b) { +export function xor (a, b) { if (a.length !== b.length) { throw new Error('Inputs should have the same length') } @@ -17,5 +17,3 @@ function xor (a, b) { return result } - -export default xor diff --git a/test/compare.spec.js b/test/compare.spec.js index dbcf3ae..c8b52da 100644 --- a/test/compare.spec.js +++ b/test/compare.spec.js @@ -2,7 +2,7 @@ // @ts-ignore import { expect } from 'aegir/utils/chai.js' -import compare from '../src/compare.js' +import { compare } from '../src/compare.js' describe('Uint8Array compare', () => { it('is stable', () => { diff --git a/test/concat.spec.js b/test/concat.spec.js index 26e5ce0..0279a86 100644 --- a/test/concat.spec.js +++ b/test/concat.spec.js @@ -2,7 +2,7 @@ // @ts-ignore import { expect } from 'aegir/utils/chai.js' -import concat from '../src/concat.js' +import { concat } from '../src/concat.js' describe('Uint8Array concat', () => { it('concats two Uint8Arrays', () => { diff --git a/test/equals.spec.js b/test/equals.spec.js index 47e8af8..c19cb1d 100644 --- a/test/equals.spec.js +++ b/test/equals.spec.js @@ -2,7 +2,7 @@ // @ts-ignore import { expect } from 'aegir/utils/chai.js' -import equals from '../src/equals.js' +import { equals } from '../src/equals.js' describe('Uint8Array equals', () => { it('finds two Uint8Arrays equal', () => { diff --git a/test/from-string.spec.js b/test/from-string.spec.js index 439664b..472c45b 100644 --- a/test/from-string.spec.js +++ b/test/from-string.spec.js @@ -2,8 +2,8 @@ // @ts-ignore import { expect } from 'aegir/utils/chai.js' -import fromString from '../src/from-string.js' -import toString from '../src/to-string.js' +import { fromString } from '../src/from-string.js' +import { toString } from '../src/to-string.js' import bases from '../src/util/bases.js' /** @type {import('../src/util/bases').SupportedEncodings[]} */ diff --git a/test/to-string.spec.js b/test/to-string.spec.js index e1787bf..36bf167 100644 --- a/test/to-string.spec.js +++ b/test/to-string.spec.js @@ -2,7 +2,7 @@ // @ts-ignore import { expect } from 'aegir/utils/chai.js' -import toString from '../src/to-string.js' +import { toString } from '../src/to-string.js' describe('Uint8Array toString', () => { it('creates a String from a Uint8Array', () => { diff --git a/test/xor.spec.js b/test/xor.spec.js index 74b7adf..aa2f928 100644 --- a/test/xor.spec.js +++ b/test/xor.spec.js @@ -2,7 +2,7 @@ // @ts-ignore import { expect } from 'aegir/utils/chai.js' -import xor from '../src/xor.js' +import { xor } from '../src/xor.js' describe('Uint8Array xor', () => { it('xors 1,0 and 0,1', () => { From 8da4fa7d7602a4b2024c77fed30a54a462a7bc8c Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 28 Jul 2021 13:37:59 +0200 Subject: [PATCH 04/17] chore: apply suggestions from code review Co-authored-by: Alex Potsides --- package.json | 8 +++----- tsconfig.json | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index c45f2a8..283049b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "homepage": "https://github.com/achingbrain/uint8arrays", "bugs": "https://github.com/achingbrain/uint8arrays/issues", "type": "module", - "types": "dist/types/index.d.ts", + "types": "types/src/index.d.ts", "repository": { "type": "git", "url": "https://github.com/achingbrain/uint8arrays.git" @@ -40,10 +40,8 @@ "typesVersions": { "*": { "*": [ - "types/*" - ], - "types/*": [ - "types/*" + "types/src", + "types/src/*" ] } }, diff --git a/tsconfig.json b/tsconfig.json index 18f313b..2fc8ce7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "aegir/src/config/tsconfig.aegir.json", "compilerOptions": { - "declarationDir": "./dist/types", + "outDir": "./types", "importsNotUsedAsValues": "preserve" }, "include": [ @@ -12,4 +12,4 @@ "dist", "node_modules" ] -} \ No newline at end of file +} From 0d9929c6bfcf84cf67a9eea2e24e0293da501703 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 28 Jul 2021 12:57:46 +0100 Subject: [PATCH 05/17] chore: add types to dist --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 8c93a42..5aa0b00 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules dist +types docs package-lock.json From 61d7b409b7d83d52506567614c91d83bd60a292f Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Thu, 29 Jul 2021 09:49:54 +0100 Subject: [PATCH 06/17] chore: make exports with .js --- package.json | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/package.json b/package.json index 283049b..a04bc9a 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,27 @@ }, "./xor": { "import": "./src/xor.js" + }, + "./index.js": { + "import": "./src/index.js" + }, + "./compare.js": { + "import": "./src/compare.js" + }, + "./concat.js": { + "import": "./src/concat.js" + }, + "./equals.js": { + "import": "./src/equals.js" + }, + "./from-string.js": { + "import": "./src/from-string.js" + }, + "./to-string.js": { + "import": "./src/to-string.js" + }, + "./xor.js": { + "import": "./src/xor.js" } }, "contributors": [ From 96141d7f5cd8cde4dd2d4e110a29c5cdfb745adc Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 11 Aug 2021 16:05:42 +0200 Subject: [PATCH 07/17] fix: .gitignore should ignore types --- types/src/compare.d.ts | 8 ------ types/src/compare.d.ts.map | 1 - types/src/concat.d.ts | 8 ------ types/src/concat.d.ts.map | 1 - types/src/equals.d.ts | 8 ------ types/src/equals.d.ts.map | 1 - types/src/from-string.d.ts | 17 ------------- types/src/from-string.d.ts.map | 1 - types/src/index.d.ts | 8 ------ types/src/index.d.ts.map | 1 - types/src/to-string.d.ts | 17 ------------- types/src/to-string.d.ts.map | 1 - types/src/util/bases.d.ts | 35 -------------------------- types/src/util/bases.d.ts.map | 1 - types/src/xor.d.ts | 8 ------ types/src/xor.d.ts.map | 1 - types/tsconfig-types.aegir.tsbuildinfo | 1 - 17 files changed, 118 deletions(-) delete mode 100644 types/src/compare.d.ts delete mode 100644 types/src/compare.d.ts.map delete mode 100644 types/src/concat.d.ts delete mode 100644 types/src/concat.d.ts.map delete mode 100644 types/src/equals.d.ts delete mode 100644 types/src/equals.d.ts.map delete mode 100644 types/src/from-string.d.ts delete mode 100644 types/src/from-string.d.ts.map delete mode 100644 types/src/index.d.ts delete mode 100644 types/src/index.d.ts.map delete mode 100644 types/src/to-string.d.ts delete mode 100644 types/src/to-string.d.ts.map delete mode 100644 types/src/util/bases.d.ts delete mode 100644 types/src/util/bases.d.ts.map delete mode 100644 types/src/xor.d.ts delete mode 100644 types/src/xor.d.ts.map delete mode 100644 types/tsconfig-types.aegir.tsbuildinfo diff --git a/types/src/compare.d.ts b/types/src/compare.d.ts deleted file mode 100644 index dd23039..0000000 --- a/types/src/compare.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Can be used with Array.sort to sort and array with Uint8Array entries - * - * @param {Uint8Array} a - * @param {Uint8Array} b - */ -export function compare(a: Uint8Array, b: Uint8Array): 0 | 1 | -1; -//# sourceMappingURL=compare.d.ts.map \ No newline at end of file diff --git a/types/src/compare.d.ts.map b/types/src/compare.d.ts.map deleted file mode 100644 index e8238eb..0000000 --- a/types/src/compare.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"compare.d.ts","sourceRoot":"","sources":["../../src/compare.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,2BAHW,UAAU,KACV,UAAU,cAsBpB"} \ No newline at end of file diff --git a/types/src/concat.d.ts b/types/src/concat.d.ts deleted file mode 100644 index 960ca19..0000000 --- a/types/src/concat.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Returns a new Uint8Array created by concatenating the passed ArrayLikes - * - * @param {Array>} arrays - * @param {number} [length] - */ -export function concat(arrays: Array>, length?: number | undefined): Uint8Array; -//# sourceMappingURL=concat.d.ts.map \ No newline at end of file diff --git a/types/src/concat.d.ts.map b/types/src/concat.d.ts.map deleted file mode 100644 index 75f533b..0000000 --- a/types/src/concat.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"concat.d.ts","sourceRoot":"","sources":["../../src/concat.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,+BAHW,MAAM,UAAU,MAAM,CAAC,CAAC,2CAiBlC"} \ No newline at end of file diff --git a/types/src/equals.d.ts b/types/src/equals.d.ts deleted file mode 100644 index 4c4df17..0000000 --- a/types/src/equals.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Returns true if the two passed Uint8Arrays have the same content - * - * @param {Uint8Array} a - * @param {Uint8Array} b - */ -export function equals(a: Uint8Array, b: Uint8Array): boolean; -//# sourceMappingURL=equals.d.ts.map \ No newline at end of file diff --git a/types/src/equals.d.ts.map b/types/src/equals.d.ts.map deleted file mode 100644 index f4b4fb7..0000000 --- a/types/src/equals.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"equals.d.ts","sourceRoot":"","sources":["../../src/equals.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,0BAHW,UAAU,KACV,UAAU,WAkBpB"} \ No newline at end of file diff --git a/types/src/from-string.d.ts b/types/src/from-string.d.ts deleted file mode 100644 index a2a48d5..0000000 --- a/types/src/from-string.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @typedef {import('./util/bases').SupportedEncodings} SupportedEncodings - */ -/** - * Create a `Uint8Array` from the passed string - * - * Supports `utf8`, `utf-8`, `hex`, and any encoding supported by the multiformats module. - * - * Also `ascii` which is similar to node's 'binary' encoding. - * - * @param {string} string - * @param {SupportedEncodings} [encoding=utf8] - utf8, base16, base64, base64urlpad, etc - * @returns {Uint8Array} - */ -export function fromString(string: string, encoding?: import("./util/bases.js").SupportedEncodings | undefined): Uint8Array; -export type SupportedEncodings = import('./util/bases').SupportedEncodings; -//# sourceMappingURL=from-string.d.ts.map \ No newline at end of file diff --git a/types/src/from-string.d.ts.map b/types/src/from-string.d.ts.map deleted file mode 100644 index 0b2f12f..0000000 --- a/types/src/from-string.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"from-string.d.ts","sourceRoot":"","sources":["../../src/from-string.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,mCAJW,MAAM,wEAEJ,UAAU,CAWtB;iCAvBY,OAAO,cAAc,EAAE,kBAAkB"} \ No newline at end of file diff --git a/types/src/index.d.ts b/types/src/index.d.ts deleted file mode 100644 index 7a4a255..0000000 --- a/types/src/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { compare } from "./compare.js"; -import { concat } from "./concat.js"; -import { equals } from "./equals.js"; -import { fromString } from "./from-string.js"; -import { toString } from "./to-string.js"; -import { xor } from "./xor.js"; -export { compare, concat, equals, fromString, toString, xor }; -//# sourceMappingURL=index.d.ts.map \ No newline at end of file diff --git a/types/src/index.d.ts.map b/types/src/index.d.ts.map deleted file mode 100644 index 4b136e2..0000000 --- a/types/src/index.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.js"],"names":[],"mappings":""} \ No newline at end of file diff --git a/types/src/to-string.d.ts b/types/src/to-string.d.ts deleted file mode 100644 index bf72c50..0000000 --- a/types/src/to-string.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/** - * @typedef {import('./util/bases').SupportedEncodings} SupportedEncodings - */ -/** - * Turns a `Uint8Array` into a string. - * - * Supports `utf8`, `utf-8` and any encoding supported by the multibase module. - * - * Also `ascii` which is similar to node's 'binary' encoding. - * - * @param {Uint8Array} array - The array to turn into a string - * @param {SupportedEncodings} [encoding=utf8] - The encoding to use - * @returns {string} - */ -export function toString(array: Uint8Array, encoding?: import("./util/bases.js").SupportedEncodings | undefined): string; -export type SupportedEncodings = import('./util/bases').SupportedEncodings; -//# sourceMappingURL=to-string.d.ts.map \ No newline at end of file diff --git a/types/src/to-string.d.ts.map b/types/src/to-string.d.ts.map deleted file mode 100644 index 32a7f7c..0000000 --- a/types/src/to-string.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"to-string.d.ts","sourceRoot":"","sources":["../../src/to-string.js"],"names":[],"mappings":"AAEA;;GAEG;AAEH;;;;;;;;;;GAUG;AACH,gCAJW,UAAU,wEAER,MAAM,CAWlB;iCAvBY,OAAO,cAAc,EAAE,kBAAkB"} \ No newline at end of file diff --git a/types/src/util/bases.d.ts b/types/src/util/bases.d.ts deleted file mode 100644 index 0221b0e..0000000 --- a/types/src/util/bases.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -export default BASES; -export type MultibaseCodec = import('multiformats/bases/interface').MultibaseCodec; -export type SupportedEncodings = 'utf8' | 'utf-8' | 'hex' | 'latin1' | 'ascii' | 'binary' | keyof { - base64: import("multiformats/bases/base").Codec; - base64pad: import("multiformats/bases/base").Codec; - base64url: import("multiformats/bases/base").Codec; - base64urlpad: import("multiformats/bases/base").Codec; - base58btc: import("multiformats/bases/base").Codec<"base58btc", "z">; - base58flickr: import("multiformats/bases/base").Codec<"base58flickr", "Z">; - base36: import("multiformats/bases/base").Codec<"base36", "k">; - base36upper: import("multiformats/bases/base").Codec<"base36upper", "K">; - base32: import("multiformats/bases/base").Codec; - base32upper: import("multiformats/bases/base").Codec; - base32pad: import("multiformats/bases/base").Codec; - base32padupper: import("multiformats/bases/base").Codec; - base32hex: import("multiformats/bases/base").Codec; - base32hexupper: import("multiformats/bases/base").Codec; - base32hexpad: import("multiformats/bases/base").Codec; - base32hexpadupper: import("multiformats/bases/base").Codec; - base32z: import("multiformats/bases/base").Codec; - base16: import("multiformats/bases/base").Codec; - base16upper: import("multiformats/bases/base").Codec; - base10: import("multiformats/bases/base").Codec<"base10", "9">; - base8: import("multiformats/bases/base").Codec; - base2: import("multiformats/bases/base").Codec; - identity: import("multiformats/bases/base").Codec<"identity", "\0">; -}; -/** - * @typedef {'utf8' | 'utf-8' | 'hex' | 'latin1' | 'ascii' | 'binary' | keyof bases } SupportedEncodings - */ -/** - * @type {Record} - */ -declare const BASES: Record>; -//# sourceMappingURL=bases.d.ts.map \ No newline at end of file diff --git a/types/src/util/bases.d.ts.map b/types/src/util/bases.d.ts.map deleted file mode 100644 index d021654..0000000 --- a/types/src/util/bases.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"bases.d.ts","sourceRoot":"","sources":["../../../src/util/bases.js"],"names":[],"mappings":";6BAGa,OAAO,8BAA8B,EAAE,cAAc,CAAC,GAAG,CAAC;iCAoD1D,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,GAAG;;;;;;;;;;;;;;;;;;;;;;;;CAAW;AADnF;;GAEG;AAEH;;GAEG;AACH,qBAFU,OAAO,kBAAkB,6DAAiB,CAWnD"} \ No newline at end of file diff --git a/types/src/xor.d.ts b/types/src/xor.d.ts deleted file mode 100644 index deef5bb..0000000 --- a/types/src/xor.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Returns the xor distance between two arrays - * - * @param {Uint8Array} a - * @param {Uint8Array} b - */ -export function xor(a: Uint8Array, b: Uint8Array): Uint8Array; -//# sourceMappingURL=xor.d.ts.map \ No newline at end of file diff --git a/types/src/xor.d.ts.map b/types/src/xor.d.ts.map deleted file mode 100644 index 2c757cb..0000000 --- a/types/src/xor.d.ts.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"xor.d.ts","sourceRoot":"","sources":["../../src/xor.js"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,uBAHW,UAAU,KACV,UAAU,cAcpB"} \ No newline at end of file diff --git a/types/tsconfig-types.aegir.tsbuildinfo b/types/tsconfig-types.aegir.tsbuildinfo deleted file mode 100644 index 397ed0f..0000000 --- a/types/tsconfig-types.aegir.tsbuildinfo +++ /dev/null @@ -1 +0,0 @@ -{"program":{"fileNames":["../node_modules/typescript/lib/lib.es5.d.ts","../node_modules/typescript/lib/lib.es2015.d.ts","../node_modules/typescript/lib/lib.es2016.d.ts","../node_modules/typescript/lib/lib.es2017.d.ts","../node_modules/typescript/lib/lib.es2018.d.ts","../node_modules/typescript/lib/lib.es2019.d.ts","../node_modules/typescript/lib/lib.es2020.d.ts","../node_modules/typescript/lib/lib.dom.d.ts","../node_modules/typescript/lib/lib.dom.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.core.d.ts","../node_modules/typescript/lib/lib.es2015.collection.d.ts","../node_modules/typescript/lib/lib.es2015.generator.d.ts","../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../node_modules/typescript/lib/lib.es2015.promise.d.ts","../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../node_modules/typescript/lib/lib.es2017.object.d.ts","../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2017.string.d.ts","../node_modules/typescript/lib/lib.es2017.intl.d.ts","../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../node_modules/typescript/lib/lib.es2018.intl.d.ts","../node_modules/typescript/lib/lib.es2018.promise.d.ts","../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../node_modules/typescript/lib/lib.es2019.array.d.ts","../node_modules/typescript/lib/lib.es2019.object.d.ts","../node_modules/typescript/lib/lib.es2019.string.d.ts","../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../node_modules/typescript/lib/lib.es2020.promise.d.ts","../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../node_modules/typescript/lib/lib.es2020.string.d.ts","../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../node_modules/typescript/lib/lib.es2020.intl.d.ts","../node_modules/typescript/lib/lib.esnext.intl.d.ts","../src/compare.js","../src/concat.js","../src/equals.js","../node_modules/multiformats/types/bases/interface.d.ts","../node_modules/multiformats/types/hashes/interface.d.ts","../node_modules/multiformats/types/cid.d.ts","../node_modules/multiformats/types/hashes/digest.d.ts","../node_modules/multiformats/types/hashes/hasher.d.ts","../node_modules/multiformats/types/varint.d.ts","../node_modules/multiformats/types/bytes.d.ts","../node_modules/multiformats/types/index.d.ts","../node_modules/multiformats/types/codecs/interface.d.ts","../node_modules/multiformats/types/codecs/raw.d.ts","../node_modules/multiformats/types/codecs/json.d.ts","../node_modules/multiformats/types/bases/base.d.ts","../node_modules/multiformats/types/basics.d.ts","../src/util/bases.js","../src/from-string.js","../src/to-string.js","../src/xor.js","../src/index.js","../node_modules/@types/chai/index.d.ts","../node_modules/@types/chai-as-promised/index.d.ts","../node_modules/@types/chai-string/index.d.ts","../node_modules/@types/chai-subset/index.d.ts","../node_modules/@types/istanbul-lib-coverage/index.d.ts","../node_modules/@types/json-schema/index.d.ts","../node_modules/@types/minimatch/index.d.ts","../node_modules/@types/minimist/index.d.ts","../node_modules/@types/mocha/index.d.ts","../node_modules/@types/node/assert/strict.d.ts","../node_modules/@types/node/globals.d.ts","../node_modules/@types/node/async_hooks.d.ts","../node_modules/@types/node/buffer.d.ts","../node_modules/@types/node/child_process.d.ts","../node_modules/@types/node/cluster.d.ts","../node_modules/@types/node/console.d.ts","../node_modules/@types/node/constants.d.ts","../node_modules/@types/node/crypto.d.ts","../node_modules/@types/node/dgram.d.ts","../node_modules/@types/node/diagnostics_channel.d.ts","../node_modules/@types/node/dns.d.ts","../node_modules/@types/node/dns/promises.d.ts","../node_modules/@types/node/domain.d.ts","../node_modules/@types/node/events.d.ts","../node_modules/@types/node/fs.d.ts","../node_modules/@types/node/fs/promises.d.ts","../node_modules/@types/node/http.d.ts","../node_modules/@types/node/http2.d.ts","../node_modules/@types/node/https.d.ts","../node_modules/@types/node/inspector.d.ts","../node_modules/@types/node/module.d.ts","../node_modules/@types/node/net.d.ts","../node_modules/@types/node/os.d.ts","../node_modules/@types/node/path.d.ts","../node_modules/@types/node/perf_hooks.d.ts","../node_modules/@types/node/process.d.ts","../node_modules/@types/node/punycode.d.ts","../node_modules/@types/node/querystring.d.ts","../node_modules/@types/node/readline.d.ts","../node_modules/@types/node/repl.d.ts","../node_modules/@types/node/stream.d.ts","../node_modules/@types/node/stream/promises.d.ts","../node_modules/@types/node/string_decoder.d.ts","../node_modules/@types/node/timers.d.ts","../node_modules/@types/node/timers/promises.d.ts","../node_modules/@types/node/tls.d.ts","../node_modules/@types/node/trace_events.d.ts","../node_modules/@types/node/tty.d.ts","../node_modules/@types/node/url.d.ts","../node_modules/@types/node/util.d.ts","../node_modules/@types/node/v8.d.ts","../node_modules/@types/node/vm.d.ts","../node_modules/@types/node/worker_threads.d.ts","../node_modules/@types/node/zlib.d.ts","../node_modules/@types/node/globals.global.d.ts","../node_modules/@types/node/wasi.d.ts","../node_modules/@types/node/ts3.6/base.d.ts","../node_modules/@types/node/assert.d.ts","../node_modules/@types/node/base.d.ts","../node_modules/@types/node/index.d.ts","../node_modules/@types/normalize-package-data/index.d.ts","../node_modules/@types/parse-json/index.d.ts","../node_modules/@types/retry/index.d.ts","../node_modules/@sinonjs/fake-timers/types/fake-timers-src.d.ts","../node_modules/@types/sinon/index.d.ts","../node_modules/@types/yargs-parser/index.d.ts","../node_modules/@types/yargs/index.d.ts","../node_modules/@types/yauzl/index.d.ts"],"fileInfos":[{"version":"ac3a8c4040e183ce38da69d23b96939112457d1936198e6542672b7963cf0fce","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","e6b724280c694a9f588847f754198fb96c43d805f065c3a5b28bbc9594541c84","e21c071ca3e1b4a815d5f04a7475adcaeea5d64367e840dd0154096d705c3940",{"version":"1dad4fe1561d99dfd6709127608b99a76e5c2643626c800434f99c48038567ee","affectsGlobalScope":true},{"version":"a8fe23ae87c3e9d2877032cafeb290f2ebe0c51e216d175a0408b10915ebe9f0","affectsGlobalScope":true},{"version":"cce43d02223f8049864f8568bed322c39424013275cd3bcc3f51492d8b546cb3","affectsGlobalScope":true},{"version":"43fb1d932e4966a39a41b464a12a81899d9ae5f2c829063f5571b6b87e6d2f9c","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"8dff1b4c2df638fcd976cbb0e636f23ab5968e836cd45084cc31d47d1ab19c49","affectsGlobalScope":true},{"version":"2bb4b3927299434052b37851a47bf5c39764f2ba88a888a107b32262e9292b7c","affectsGlobalScope":true},{"version":"810627a82ac06fb5166da5ada4159c4ec11978dfbb0805fe804c86406dab8357","affectsGlobalScope":true},{"version":"62d80405c46c3f4c527ee657ae9d43fda65a0bf582292429aea1e69144a522a6","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"8f4c9f651c8294a2eb1cbd12581fe25bfb901ab1d474bb93cd38c7e2f4be7a30","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"12a310447c5d23c7d0d5ca2af606e3bd08afda69100166730ab92c62999ebb9d","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"df9c8a72ca8b0ed62f5470b41208a0587f0f73f0a7db28e5a1272cf92537518e","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"93544ca2f26a48716c1b6c5091842cad63129daac422dfa4bc52460465f22bb1","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"60761e6ea886034af0f294f025a7199360ce4e2c8ba4ec6408bc049cf9b89799","affectsGlobalScope":true},{"version":"7435b75fdf3509622e79622dbe5091cf4b09688410ee2034e4fc17d0c99d0862","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"9f1817f7c3f02f6d56e0f403b927e90bb133f371dcebc36fa7d6d208ef6899da","affectsGlobalScope":true},{"version":"506b80b9951c9381dc5f11897b31fca5e2a65731d96ddefa19687fbc26b23c6e","affectsGlobalScope":true},"43ef20773e5b03d85849bcf861ac23bd1f34d56182acfc91b28db13ca51dfa16","6a7ad741586caaa5d07c4c4e30c52202107af734ddfe7299f993cbd2d84ce60f","b0890a943496425efd6672c6e0ef0d62290d61399b6f169aee6c60844ff9ffef","930446bf32192f698b78f8ea4b309d8c2cfe02ab5ad78e4db907417405ebf5e7","a5de53bdfcdca7af39e735be7bbd736c38b1e34eeec36bd6a835a0e37ba23705","ef706b4970dd8bf7ab414bb981993d4f379845f3592622237bad1b3332fde794","853c5447ea8851049c1d008e130d23030d9fe3b5a8405a0ae7e55b00e173692d","fbb30441703cfccfe241fbdb604f01e1e5ac558eec5d3f04fd32281dc9b3cdb9","0d04077273d749e79acaeacf0c42ea3d1139bdf5fc8823d0e64740a5735fbca1","32b67d761db3999f1e482d0add405b695d3ec5607e07ae4c963a96334c331814","1428847d803b8342711c0b22208df4f83590cce15ef2c8f36ba53cea24f4616d","6bea75e2b9873f7c123ffef3edf16e7c49ff7cefd2756543d51786fb354c3211","f607b8e53a150350f0dc1495cb040510e9b4deeb552ed033fb2e956ff8bb8e2e","cce8396f18f02507dac2833fd5d7eebc2ee03303f3d53f33067efdb5b772d556","2319e1788f418f20dec0cfaff0d84e89cfc51d40fd4467370eb0b839347902e9","83173d9e73be5e5d22cf0b1d82f656165a02bef57e115b7a6c3e883e0598cc15","d8599b33a0e9fac229a0cde2b6e784dc7cda162643f687efdebf9d617e0783f1","a17f17217b13a030baf255fa6a3cc11969f4123c1efd796fbbb973721b7a4324","b3d1b8dd5a537dcf6d9c7fde96b41c459547d7500bd8ebcc8fc60c90eb0b3d8c","993d12360bb11bef95b71a5a05bc2b14548cb8d0d5a2086521ae1a9111c80d40","548c5f0c09adbf00db8079082d416fbe329f11c967b9575c7010a8df2d35361f",{"version":"f7834c76f2d4db5fb156f2f18fdf855431843cf0d32620fcf24b836cd4a85096","affectsGlobalScope":true},{"version":"f6ae17283c6912c202004178339d6d22f8c9edfe4e335f9f11b555c631633daf","affectsGlobalScope":true},{"version":"41071d2f1a39386d10bf36d1ba4712ad42a900047f16a109936df9e48f13673e","affectsGlobalScope":true},{"version":"f4c0db3a49cea9babd5d224ba14243a6a6119bf65a65198994033aaea3a60a71","affectsGlobalScope":true},"de18acda71730bac52f4b256ce7511bb56cc21f6f114c59c46782eff2f632857","a185ebc69c9f6798ebd67bfdfd72a37457dc67c23459784783c7128ae9bd5250","8841e2aa774b89bd23302dede20663306dc1b9902431ac64b24be8b8d0e3f649","209e814e8e71aec74f69686a9506dd7610b97ab59dcee9446266446f72a76d05",{"version":"5f186a758a616c107c70e8918db4630d063bd782f22e6e0b17573b125765b40b","affectsGlobalScope":true},"a69c09dbea52352f479d3e7ac949fde3d17b195abe90b045d619f747b38d6d1a",{"version":"bf629ebbac2c65601bcb5c032644023a2b4b3b1151c0d1bf60ced7c35cc81b5d","affectsGlobalScope":true},"0ddef426964b396f57357b9e61209dd558f7652dd06af5a35893d296c29dff7a",{"version":"b0f339dfc10ee8baac59f7d37d24d963216311b8894a776bc0ed18b77de81fe2","affectsGlobalScope":true},"ca3b86d3300cb6817ee3d161421db0b4994d168fb5820a33c89743bc73716292","3669eaf567a388a01c91df316093c2c8f565ba4c27a4ae0866e45ec932472b15",{"version":"5012207e217a67f821855e1ce3059e089953847e1ce0adff8186a46c459e96f7","affectsGlobalScope":true},"82408ed3e959ddc60d3e9904481b5a8dc16469928257af22a3f7d1a3bc7fd8c4","c9ea3bedb7f5bfb493e375136dc70723bded041efc311c654d06ab7a7d0280d8","decd29e5c9dfd0159e88721a4986dff6b58d255012ade0cacba7130dc7abe3c1","7ed1067f8c4acf58cdaf97c0a755445a56a61b54ef70d59da7aa73743912b189","71e7ae0849476c298e522bc8a7b29e85a982f7b9ec90a133bf8f45a8c25d01c9","95f59cb29266f9a11b4eadd67b6b96268d8a0e0ab99a933df0d9b7ec5a42806b","9c158ac9bc84d33422b85d4f274f47790e59b9729e739d4fc3f3abff8770d270",{"version":"a976ad617bce5d95209068df27cb6ad69e367f2a72e193c7dbabb73dc35b533c","affectsGlobalScope":true},"ae970d705be0b31839d7e773efc751ab00438f5c1ff36577cc2ac72c3156c44b","252892c3bc1a3322a655e887671e4bb5dcaf7dcd5a6f5a78d210c64419733a8d","f7d60b8a9be58779e95cce126c4a3c985497556257c4e323aa836e419f26e3aa","d421d2324434c851830535137ff327b6cc4e9eaa428745300ccb478d0113cb4b","2b8374271ab2a2fff2efa2eca782782d94157121d7a12b7ec4827c8ba1a87abb","ed3129f404bfea369c236104e125d5f3885d78540f8f37d3c7e90f0c2449b50f",{"version":"241dce6950eeec0a86f8c8f292b0e865b710083f0e3850decec889b46914a520","affectsGlobalScope":true},"298ca2d6112d194797d0e2eebf54867c84ac18fd0b60eb6e001467e8b5addcf7","8e8df21b9513f0a1de0e9bad48243f8aad8c065c7ab695074e7a6c276596cc62","1b7690edef33f9d150a4ac170d662a9dffedc08e4c9504ece603785007ffdba1","62d37937d7321b1df75292b92eb984babf32302748f200d8aabf67328b37bed0",{"version":"e8a92400cdf00bbbcc93ec1c57f8bad21cc0723c959ebc5da165ae3aa190e5a4","affectsGlobalScope":true},"d1b323391b9604f2fa2cca0ddf206a951feb745fd36d400677447436cc7b4f8d","760bf13f54eafb24321fdc0d74e3293e3f2030527729a351370377169fc1442c","0b28384ffe11674b35d97b9f91248d3f00f823fc4ffc67070e71206a5c7e6305","695bfa2ca7a20a9d4e43f3b7a8af58ce76b12e094b07203bd9bf47345cba7626","187acc08c6fc060163b8df4c5103b4228b25d669efc74e31b84479a55ffa11af","1b952304137851e45bc009785de89ada562d9376177c97e37702e39e60c2f1ff","912e95aafa5d85e0636eab990cdcfe2f288310dcd9ee5b7c028d8231e179e967",{"version":"93c6f408623f52df4fd29ed34f3e9cabbe2f4041a6c58ffe9df0f565bad441df","affectsGlobalScope":true},"009f2558b6ae78151e24cc2f1a43bac7599a0a65ddffa9707a924ca1e354d4b2","21ac36b32a69c93318314047186a9ee6d69d9644dab7cd8d8dc256e1031545a6","4b465e7d07abea8e7cfe4e50a63b901a0a32e283f8a81eb7f569e623dc2a6a6a","0fe8b060f4143dcccc5e64f53cb630059304f9b52576cefd9ac5816b0e067c7f","8e140f571d87ed63406cdb71a35790c40055f2a1b1e01269f93ba2fce6338f15","1275061127b8f7878a6f745bd85a7053d17cc757037815fdceb532881d3062a6","0a8c5fb0f16e51973f22f2e01791b9e8376203514e4b72f65a451afebc29f5a0","c19d3a3bb01ac8c5d244c31eac930c451110a58b76ff7a2b82bdffed082e36f6","8ca49a6223d59be5b7228ad99800f01982a1f350eb61c1a195e77547121877bb","55d6f9768363cf0356f4c9fff535ed3c24c67c782a566238cd08fa11a6111940",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"437c2700eaa23c440e97dd4ba5883c75ee82fe8b64772af7bebaa99410776705","de0e63feaddfdf1a7a92071f6e7897d86ca497499116433e99fe15bf4af32e01","6b7029d09218b4187ca45dcde322bc413561b419551e0a6c938d72af37d53817","e61a21e9418f279bc480394a94d1581b2dee73747adcbdef999b6737e34d721b","73e8de7786fd2ba696ea4fbd96f0a157b4fc148a25255b8c9199cb69423a7fce","6fa0008bf91a4cc9c8963bace4bba0bd6865cbfa29c3e3ccc461155660fb113a","2b8264b2fefd7367e0f20e2c04eed5d3038831fe00f5efbc110ff0131aab899b","58a3914b1cce4560d9ad6eee2b716caaa030eda0a90b21ca2457ea9e2783eaa3","6b40029289530423f407a22755c85b81740f9acfd88d2b53564f8c1657c26660","15b043358a9bac56ee6a567d61adf545b3a09e2f2ead9c3ef3cc617ed3522e71","f7e133b20ee2669b6c0e5d7f0cd510868c57cd64b283e68c7f598e30ce9d76d2","e5e7d3593c0895dd24a6af87e6376ed316f6a9f810ee024679c1e1f421f023b7","b2d70a269840a9528db473ac7565442434333a05c1f66801a7a672e82beb903e"],"options":{"composite":true,"declaration":true,"declarationMap":true,"emitDeclarationOnly":true,"esModuleInterop":true,"importsNotUsedAsValues":1,"noEmitOnError":true,"noFallthroughCasesInSwitch":true,"noImplicitReturns":false,"noUnusedLocals":true,"noUnusedParameters":false,"outDir":"./","removeComments":false,"skipLibCheck":true,"strict":true,"stripInternal":true,"target":7},"fileIdsList":[[111],[62,111],[111,119],[73,111],[111,118,119],[74,79,111],[75,85,86,93,102,110,111],[75,76,85,93,111],[77,111],[78,79,86,94,111],[79,102,107,111],[80,82,85,93,111],[81,111],[82,83,111],[84,85,111],[85,111],[85,86,87,102,110,111],[85,86,87,102,111],[88,93,102,110,111],[85,86,88,89,93,102,107,110,111],[88,90,107,110,111],[111,120],[85,91,111],[92,110,111],[82,85,93,102,111],[94,111],[95,111],[73,96,111],[97,109,111,114],[98,111],[99,111],[85,100,111],[100,101,111,113],[85,102,103,111],[102,103,111],[104,111],[85,105,106,111],[105,106,111],[79,93,107,111],[108,111],[71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117],[93,109,111],[88,99,110,111],[79,111],[102,111,112],[111,113],[111,117],[74,79,85,87,96,102,110,111,113,114],[102,111,115],[111,125],[111,127],[85,102,111,121],[44,111],[51,53,54,55,111],[44,45,111],[52,111],[45,111],[45,47,111],[46,47,48,49,50,111],[57,111],[41,42,43,58,59,60,111],[44,56,111]],"referencedMap":[[125,1],[63,2],[64,2],[65,2],[62,1],[66,1],[67,1],[68,1],[69,1],[70,1],[119,3],[71,3],[73,4],[120,5],[74,6],[75,7],[76,8],[77,9],[78,10],[79,11],[80,12],[81,13],[82,14],[83,14],[84,15],[85,16],[86,17],[87,18],[72,1],[116,1],[88,19],[89,20],[90,21],[121,22],[91,23],[92,24],[93,25],[94,26],[95,27],[96,28],[97,29],[98,30],[99,31],[100,32],[101,33],[102,34],[103,35],[104,36],[105,37],[106,38],[107,39],[108,40],[118,41],[109,42],[110,43],[111,44],[112,45],[113,46],[117,47],[114,48],[115,49],[122,1],[123,1],[124,1],[126,50],[127,1],[128,51],[129,52],[55,53],[44,1],[56,54],[50,1],[46,55],[52,1],[54,56],[53,56],[47,57],[48,58],[45,1],[51,59],[49,1],[8,1],[9,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[31,1],[32,1],[33,1],[34,1],[7,1],[39,1],[35,1],[36,1],[37,1],[38,1],[1,1],[40,1],[41,1],[42,1],[43,1],[58,60],[61,61],[59,60],[57,62],[60,1]],"exportedModulesMap":[[125,1],[63,2],[64,2],[65,2],[62,1],[66,1],[67,1],[68,1],[69,1],[70,1],[119,3],[71,3],[73,4],[120,5],[74,6],[75,7],[76,8],[77,9],[78,10],[79,11],[80,12],[81,13],[82,14],[83,14],[84,15],[85,16],[86,17],[87,18],[72,1],[116,1],[88,19],[89,20],[90,21],[121,22],[91,23],[92,24],[93,25],[94,26],[95,27],[96,28],[97,29],[98,30],[99,31],[100,32],[101,33],[102,34],[103,35],[104,36],[105,37],[106,38],[107,39],[108,40],[118,41],[109,42],[110,43],[111,44],[112,45],[113,46],[117,47],[114,48],[115,49],[122,1],[123,1],[124,1],[126,50],[127,1],[128,51],[129,52],[55,53],[44,1],[56,54],[50,1],[46,55],[52,1],[54,56],[53,56],[47,57],[48,58],[45,1],[51,59],[49,1],[8,1],[9,1],[11,1],[10,1],[2,1],[12,1],[13,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[3,1],[4,1],[23,1],[20,1],[21,1],[22,1],[24,1],[25,1],[26,1],[5,1],[27,1],[28,1],[29,1],[30,1],[6,1],[31,1],[32,1],[33,1],[34,1],[7,1],[39,1],[35,1],[36,1],[37,1],[38,1],[1,1],[40,1],[41,1],[42,1],[43,1],[58,60],[61,61],[59,60],[57,62],[60,1]],"semanticDiagnosticsPerFile":[125,63,64,65,62,66,67,68,69,70,119,71,73,120,74,75,76,77,78,79,80,81,82,83,84,85,86,87,72,116,88,89,90,121,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,118,109,110,111,112,113,117,114,115,122,123,124,126,127,128,129,55,44,56,50,46,52,54,53,47,48,45,51,49,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,23,20,21,22,24,25,26,5,27,28,29,30,6,31,32,33,34,7,39,35,36,37,38,1,40,41,42,43,58,61,59,57,60]},"version":"4.3.5"} \ No newline at end of file From 9c8835afcd8ce7f32a9b63cb113042d3e12f09dc Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 11 Aug 2021 16:37:50 +0200 Subject: [PATCH 08/17] chore: trigger ci From bb3ed8d42267db3a8ea355534c81899d496baa5b Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 11 Aug 2021 16:43:45 +0200 Subject: [PATCH 09/17] chore: (tmp) remove bundle actionh --- .github/workflows/main.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ef126da..85e7ea2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,9 +17,6 @@ jobs: - uses: gozala/typescript-error-reporter-action@v1.0.8 - run: npx aegir build - run: npx aegir dep-check - - uses: ipfs/aegir/actions/bundle-size@master - with: - github_token: ${{ secrets.GITHUB_TOKEN }} test-node: needs: check runs-on: ${{ matrix.os }} From c5124ff32087a478337acc4b6e45602f3537af9a Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Wed, 11 Aug 2021 17:05:30 +0200 Subject: [PATCH 10/17] fix: electron tests --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 85e7ea2..344dd8c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,11 +63,13 @@ jobs: steps: - uses: actions/checkout@v2 - run: npm install - - run: npx xvfb-maybe aegir test -t electron-main --bail + - run: npm run build -- --esm-tests # build tests with esm + - run: npx xvfb-maybe aegir test -t electron-main -f "dist/cjs/node-test/*js" --bail test-electron-renderer: needs: check runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - run: npm install - - run: npx xvfb-maybe aegir test -t electron-renderer --bail + - run: npm run build -- --esm-tests # build tests with esm + - run: npx xvfb-maybe aegir test -t electron-renderer -f "dist/cjs/node-test/*js" --bail From 4b704df4be82074d5075735e4e04e4784bff42ad Mon Sep 17 00:00:00 2001 From: achingbrain Date: Sat, 14 Aug 2021 09:39:36 +0100 Subject: [PATCH 11/17] chore: remove gh dep and restore bundle --- .github/workflows/main.yml | 1 + package.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 344dd8c..060dbe1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,6 +17,7 @@ jobs: - uses: gozala/typescript-error-reporter-action@v1.0.8 - run: npx aegir build - run: npx aegir dep-check + - uses: ipfs/aegir/actions/bundle-size@master test-node: needs: check runs-on: ${{ matrix.os }} diff --git a/package.json b/package.json index a04bc9a..44a46c2 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "multiformats": "^9.4.2" }, "devDependencies": { - "aegir": "https://gitpkg.now.sh/ipfs/aegir?feat/build-esm-modules-follow-up", + "aegir": "^35.0.0", "util": "^0.12.4" }, "eslintConfig": { From 7776e63b59e0dc63ccd85eecd121557aa8064286 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Sat, 14 Aug 2021 09:40:41 +0100 Subject: [PATCH 12/17] chore: restore creds --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 060dbe1..fa24e88 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,8 @@ jobs: - run: npx aegir build - run: npx aegir dep-check - uses: ipfs/aegir/actions/bundle-size@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} test-node: needs: check runs-on: ${{ matrix.os }} From 3064ddaf79d64583de9d419f3875fb0ee3d6a0a6 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Sat, 14 Aug 2021 09:41:10 +0100 Subject: [PATCH 13/17] chore: restore creds --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa24e88..0ca9e95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,7 +18,7 @@ jobs: - run: npx aegir build - run: npx aegir dep-check - uses: ipfs/aegir/actions/bundle-size@master - with: + with: github_token: ${{ secrets.GITHUB_TOKEN }} test-node: needs: check From 09e7c3e000bab516d1d18e304dfbf4488ab9dca5 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Mon, 16 Aug 2021 12:09:04 +0200 Subject: [PATCH 14/17] chore: use project dist in bundle size --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0ca9e95..bbaf681 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,6 +20,7 @@ jobs: - uses: ipfs/aegir/actions/bundle-size@master with: github_token: ${{ secrets.GITHUB_TOKEN }} + project: dist/ test-node: needs: check runs-on: ${{ matrix.os }} From 89b1d8024b0c178371b7bd52e4c9569d257730cf Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Mon, 16 Aug 2021 13:11:52 +0200 Subject: [PATCH 15/17] chore: remove exports with extension --- .github/workflows/main.yml | 1 - package.json | 21 --------------------- 2 files changed, 22 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index bbaf681..0ca9e95 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -20,7 +20,6 @@ jobs: - uses: ipfs/aegir/actions/bundle-size@master with: github_token: ${{ secrets.GITHUB_TOKEN }} - project: dist/ test-node: needs: check runs-on: ${{ matrix.os }} diff --git a/package.json b/package.json index 44a46c2..402e34d 100644 --- a/package.json +++ b/package.json @@ -66,27 +66,6 @@ }, "./xor": { "import": "./src/xor.js" - }, - "./index.js": { - "import": "./src/index.js" - }, - "./compare.js": { - "import": "./src/compare.js" - }, - "./concat.js": { - "import": "./src/concat.js" - }, - "./equals.js": { - "import": "./src/equals.js" - }, - "./from-string.js": { - "import": "./src/from-string.js" - }, - "./to-string.js": { - "import": "./src/to-string.js" - }, - "./xor.js": { - "import": "./src/xor.js" } }, "contributors": [ From fa58e00152850c2de7becd5f5c9b3b20b39750be Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Mon, 16 Aug 2021 13:21:47 +0200 Subject: [PATCH 16/17] chore: remove ts ignores from aegir chai --- test/compare.spec.js | 1 - test/concat.spec.js | 1 - test/equals.spec.js | 1 - test/from-string.spec.js | 1 - test/to-string.spec.js | 1 - test/xor.spec.js | 1 - 6 files changed, 6 deletions(-) diff --git a/test/compare.spec.js b/test/compare.spec.js index c8b52da..7176fd7 100644 --- a/test/compare.spec.js +++ b/test/compare.spec.js @@ -1,6 +1,5 @@ /* eslint-env mocha */ -// @ts-ignore import { expect } from 'aegir/utils/chai.js' import { compare } from '../src/compare.js' diff --git a/test/concat.spec.js b/test/concat.spec.js index 0279a86..8156ac7 100644 --- a/test/concat.spec.js +++ b/test/concat.spec.js @@ -1,6 +1,5 @@ /* eslint-env mocha */ -// @ts-ignore import { expect } from 'aegir/utils/chai.js' import { concat } from '../src/concat.js' diff --git a/test/equals.spec.js b/test/equals.spec.js index c19cb1d..87efd87 100644 --- a/test/equals.spec.js +++ b/test/equals.spec.js @@ -1,6 +1,5 @@ /* eslint-env mocha */ -// @ts-ignore import { expect } from 'aegir/utils/chai.js' import { equals } from '../src/equals.js' diff --git a/test/from-string.spec.js b/test/from-string.spec.js index 472c45b..50bbab8 100644 --- a/test/from-string.spec.js +++ b/test/from-string.spec.js @@ -1,6 +1,5 @@ /* eslint-env mocha */ -// @ts-ignore import { expect } from 'aegir/utils/chai.js' import { fromString } from '../src/from-string.js' import { toString } from '../src/to-string.js' diff --git a/test/to-string.spec.js b/test/to-string.spec.js index 36bf167..c610447 100644 --- a/test/to-string.spec.js +++ b/test/to-string.spec.js @@ -1,6 +1,5 @@ /* eslint-env mocha */ -// @ts-ignore import { expect } from 'aegir/utils/chai.js' import { toString } from '../src/to-string.js' diff --git a/test/xor.spec.js b/test/xor.spec.js index aa2f928..81059ed 100644 --- a/test/xor.spec.js +++ b/test/xor.spec.js @@ -1,6 +1,5 @@ /* eslint-env mocha */ -// @ts-ignore import { expect } from 'aegir/utils/chai.js' import { xor } from '../src/xor.js' From b9905f10e7e872a068eb33ff65abeeaf7ea6d5f5 Mon Sep 17 00:00:00 2001 From: Vasco Santos Date: Mon, 16 Aug 2021 13:40:12 +0200 Subject: [PATCH 17/17] chore: remove importsNotUsedAsValues from tsc --- tsconfig.json | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 2fc8ce7..ecde80b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,15 +1,10 @@ { "extends": "aegir/src/config/tsconfig.aegir.json", "compilerOptions": { - "outDir": "./types", - "importsNotUsedAsValues": "preserve" + "outDir": "./types" }, "include": [ "src", "test" - ], - "exclude": [ - "dist", - "node_modules" ] }