@fireproof/vendor 0.0.0-smoke → 0.0.2-dev-test
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/merge-package.ts +207 -0
- package/p-limit/index.d.ts +81 -0
- package/p-limit/index.js +104 -0
- package/p-limit/index.test-d.ts +19 -0
- package/p-limit/license +9 -0
- package/p-limit/package.json +59 -0
- package/p-limit/readme.md +128 -0
- package/p-limit/test.js +241 -0
- package/package.json +12 -9
- package/to-esm-transform.ts +42 -0
- package/patched/@ipld/dag-json/.github/dependabot.yml +0 -11
- package/patched/@ipld/dag-json/.github/workflows/js-test-and-release.yml +0 -28
- package/patched/@ipld/dag-json/CHANGELOG.md +0 -202
- package/patched/@ipld/dag-json/LICENSE +0 -4
- package/patched/@ipld/dag-json/LICENSE-APACHE +0 -5
- package/patched/@ipld/dag-json/LICENSE-MIT +0 -19
- package/patched/@ipld/dag-json/README.md +0 -58
- package/patched/@ipld/dag-json/ipld-dag-json-10.2.3.tgz +0 -0
- package/patched/@ipld/dag-json/package.json +0 -173
- package/patched/@ipld/dag-json/src/index.js +0 -291
- package/patched/@ipld/dag-json/test/test-basics.spec.js +0 -290
- package/patched/@ipld/dag-json/test/ts-use/package.json +0 -11
- package/patched/@ipld/dag-json/test/ts-use/src/main.ts +0 -54
- package/patched/@ipld/dag-json/test/ts-use/tsconfig.json +0 -9
- package/patched/@ipld/dag-json/tsconfig.json +0 -14
- package/patched/cborg/.github/dependabot.yml +0 -16
- package/patched/cborg/.github/workflows/test-and-release.yml +0 -52
- package/patched/cborg/CHANGELOG.md +0 -513
- package/patched/cborg/LICENSE +0 -13
- package/patched/cborg/README.md +0 -515
- package/patched/cborg/bench/bench.js +0 -117
- package/patched/cborg/bench/json.js +0 -124
- package/patched/cborg/bench/package.json +0 -8
- package/patched/cborg/cborg-4.2.7.tgz +0 -0
- package/patched/cborg/cborg.js +0 -31
- package/patched/cborg/example-bytestrings.js +0 -180
- package/patched/cborg/example-json.js +0 -6
- package/patched/cborg/example.js +0 -5
- package/patched/cborg/interface.ts +0 -56
- package/patched/cborg/lib/0uint.js +0 -227
- package/patched/cborg/lib/1negint.js +0 -111
- package/patched/cborg/lib/2bytes.js +0 -133
- package/patched/cborg/lib/3string.js +0 -90
- package/patched/cborg/lib/4array.js +0 -113
- package/patched/cborg/lib/5map.js +0 -113
- package/patched/cborg/lib/6tag.js +0 -80
- package/patched/cborg/lib/7float.js +0 -308
- package/patched/cborg/lib/bin.js +0 -189
- package/patched/cborg/lib/bl.js +0 -124
- package/patched/cborg/lib/byte-utils.js +0 -417
- package/patched/cborg/lib/common.js +0 -27
- package/patched/cborg/lib/decode.js +0 -209
- package/patched/cborg/lib/diagnostic.js +0 -156
- package/patched/cborg/lib/diagnostic_test.js +0 -117
- package/patched/cborg/lib/encode.js +0 -464
- package/patched/cborg/lib/is.js +0 -106
- package/patched/cborg/lib/json/decode.js +0 -462
- package/patched/cborg/lib/json/encode.js +0 -299
- package/patched/cborg/lib/json/json.js +0 -4
- package/patched/cborg/lib/jump.js +0 -209
- package/patched/cborg/lib/length.js +0 -61
- package/patched/cborg/lib/token.js +0 -76
- package/patched/cborg/package.json +0 -169
- package/patched/cborg/pnpm-lock.yaml +0 -6096
- package/patched/cborg/taglib.js +0 -73
- package/patched/cborg/test/appendix_a.js +0 -647
- package/patched/cborg/test/common.js +0 -18
- package/patched/cborg/test/node-test-bin.js +0 -402
- package/patched/cborg/test/noop-bin-test.js +0 -3
- package/patched/cborg/test/test-0uint.js +0 -103
- package/patched/cborg/test/test-1negint.js +0 -96
- package/patched/cborg/test/test-2bytes.js +0 -198
- package/patched/cborg/test/test-3string.js +0 -136
- package/patched/cborg/test/test-4array.js +0 -93
- package/patched/cborg/test/test-5map.js +0 -284
- package/patched/cborg/test/test-6tag.js +0 -85
- package/patched/cborg/test/test-7float.js +0 -131
- package/patched/cborg/test/test-bl.js +0 -37
- package/patched/cborg/test/test-cbor-vectors.js +0 -107
- package/patched/cborg/test/test-decode-errors.js +0 -65
- package/patched/cborg/test/test-fuzz.js +0 -42
- package/patched/cborg/test/test-json.js +0 -219
- package/patched/cborg/test/test-length.js +0 -65
- package/patched/cborg/test/test-partial.js +0 -111
- package/patched/cborg/tsconfig.json +0 -45
- package/patched/cborg/types/cborg.d.ts +0 -28
- package/patched/cborg/types/cborg.d.ts.map +0 -1
- package/patched/cborg/types/example.d.ts +0 -2
- package/patched/cborg/types/example.d.ts.map +0 -1
- package/patched/cborg/types/interface.d.ts +0 -47
- package/patched/cborg/types/interface.d.ts.map +0 -1
- package/patched/cborg/types/lib/0uint.d.ts +0 -100
- package/patched/cborg/types/lib/0uint.d.ts.map +0 -1
- package/patched/cborg/types/lib/1negint.d.ts +0 -58
- package/patched/cborg/types/lib/1negint.d.ts.map +0 -1
- package/patched/cborg/types/lib/2bytes.d.ts +0 -68
- package/patched/cborg/types/lib/2bytes.d.ts.map +0 -1
- package/patched/cborg/types/lib/3string.d.ts +0 -46
- package/patched/cborg/types/lib/3string.d.ts.map +0 -1
- package/patched/cborg/types/lib/4array.d.ts +0 -65
- package/patched/cborg/types/lib/4array.d.ts.map +0 -1
- package/patched/cborg/types/lib/5map.d.ts +0 -65
- package/patched/cborg/types/lib/5map.d.ts.map +0 -1
- package/patched/cborg/types/lib/6tag.d.ts +0 -61
- package/patched/cborg/types/lib/6tag.d.ts.map +0 -1
- package/patched/cborg/types/lib/7float.d.ts +0 -60
- package/patched/cborg/types/lib/7float.d.ts.map +0 -1
- package/patched/cborg/types/lib/bin.d.ts +0 -4
- package/patched/cborg/types/lib/bin.d.ts.map +0 -1
- package/patched/cborg/types/lib/bl.d.ts +0 -26
- package/patched/cborg/types/lib/bl.d.ts.map +0 -1
- package/patched/cborg/types/lib/byte-utils.d.ts +0 -53
- package/patched/cborg/types/lib/byte-utils.d.ts.map +0 -1
- package/patched/cborg/types/lib/common.d.ts +0 -10
- package/patched/cborg/types/lib/common.d.ts.map +0 -1
- package/patched/cborg/types/lib/decode.d.ts +0 -41
- package/patched/cborg/types/lib/decode.d.ts.map +0 -1
- package/patched/cborg/types/lib/diagnostic.d.ts +0 -12
- package/patched/cborg/types/lib/diagnostic.d.ts.map +0 -1
- package/patched/cborg/types/lib/diagnostic_test.d.ts +0 -2
- package/patched/cborg/types/lib/diagnostic_test.d.ts.map +0 -1
- package/patched/cborg/types/lib/encode.d.ts +0 -50
- package/patched/cborg/types/lib/encode.d.ts.map +0 -1
- package/patched/cborg/types/lib/is.d.ts +0 -6
- package/patched/cborg/types/lib/is.d.ts.map +0 -1
- package/patched/cborg/types/lib/json/decode.d.ts +0 -67
- package/patched/cborg/types/lib/json/decode.d.ts.map +0 -1
- package/patched/cborg/types/lib/json/encode.d.ts +0 -11
- package/patched/cborg/types/lib/json/encode.d.ts.map +0 -1
- package/patched/cborg/types/lib/json/forward-cborg.d.ts +0 -6
- package/patched/cborg/types/lib/json/forward-cborg.d.ts.map +0 -1
- package/patched/cborg/types/lib/json/json.d.ts +0 -6
- package/patched/cborg/types/lib/json/json.d.ts.map +0 -1
- package/patched/cborg/types/lib/jump.d.ts +0 -12
- package/patched/cborg/types/lib/jump.d.ts.map +0 -1
- package/patched/cborg/types/lib/length.d.ts +0 -27
- package/patched/cborg/types/lib/length.d.ts.map +0 -1
- package/patched/cborg/types/lib/token.d.ts +0 -59
- package/patched/cborg/types/lib/token.d.ts.map +0 -1
- package/patched/cborg/types/taglib.d.ts +0 -18
- package/patched/cborg/types/taglib.d.ts.map +0 -1
- package/patched/cborg/types/tsconfig.tsbuildinfo +0 -1
- package/src/@ipld/car/car/LICENSE +0 -4
- package/src/@ipld/car/car/README.md +0 -1078
- package/src/@ipld/car/car/dist/index.min.js +0 -5
- package/src/@ipld/car/car/dist/src/api.d.ts +0 -72
- package/src/@ipld/car/car/dist/src/api.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/buffer-decoder.d.ts +0 -67
- package/src/@ipld/car/car/dist/src/buffer-decoder.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/buffer-reader-browser.d.ts +0 -116
- package/src/@ipld/car/car/dist/src/buffer-reader-browser.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/buffer-reader.d.ts +0 -31
- package/src/@ipld/car/car/dist/src/buffer-reader.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/buffer-writer.d.ts +0 -86
- package/src/@ipld/car/car/dist/src/buffer-writer.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/coding.d.ts +0 -49
- package/src/@ipld/car/car/dist/src/coding.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/decoder-common.d.ts +0 -43
- package/src/@ipld/car/car/dist/src/decoder-common.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/decoder.d.ts +0 -87
- package/src/@ipld/car/car/dist/src/decoder.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/encoder.d.ts +0 -17
- package/src/@ipld/car/car/dist/src/encoder.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/header-validator.d.ts +0 -5
- package/src/@ipld/car/car/dist/src/header-validator.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/index-browser.d.ts +0 -10
- package/src/@ipld/car/car/dist/src/index-browser.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/index.d.ts +0 -11
- package/src/@ipld/car/car/dist/src/index.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/indexed-reader-browser.d.ts +0 -5
- package/src/@ipld/car/car/dist/src/indexed-reader-browser.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/indexed-reader.d.ts +0 -152
- package/src/@ipld/car/car/dist/src/indexed-reader.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/indexer.d.ts +0 -95
- package/src/@ipld/car/car/dist/src/indexer.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/iterator-channel.d.ts +0 -7
- package/src/@ipld/car/car/dist/src/iterator-channel.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/iterator.d.ts +0 -174
- package/src/@ipld/car/car/dist/src/iterator.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/reader-browser.d.ts +0 -151
- package/src/@ipld/car/car/dist/src/reader-browser.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/reader.d.ts +0 -35
- package/src/@ipld/car/car/dist/src/reader.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/writer-browser.d.ts +0 -155
- package/src/@ipld/car/car/dist/src/writer-browser.d.ts.map +0 -1
- package/src/@ipld/car/car/dist/src/writer.d.ts +0 -45
- package/src/@ipld/car/car/dist/src/writer.d.ts.map +0 -1
- package/src/@ipld/car/car/node_modules/.bin/cborg +0 -17
- package/src/@ipld/car/car/package.json +0 -235
- package/src/@ipld/car/car/src/api.ts +0 -90
- package/src/@ipld/car/car/src/buffer-decoder.js +0 -213
- package/src/@ipld/car/car/src/buffer-reader-browser.js +0 -144
- package/src/@ipld/car/car/src/buffer-reader.js +0 -51
- package/src/@ipld/car/car/src/buffer-writer.js +0 -286
- package/src/@ipld/car/car/src/coding.ts +0 -68
- package/src/@ipld/car/car/src/decoder-common.js +0 -82
- package/src/@ipld/car/car/src/decoder.js +0 -347
- package/src/@ipld/car/car/src/encoder.js +0 -76
- package/src/@ipld/car/car/src/header-validator.js +0 -214
- package/src/@ipld/car/car/src/header.ipldsch +0 -18
- package/src/@ipld/car/car/src/index-browser.js +0 -18
- package/src/@ipld/car/car/src/index.js +0 -21
- package/src/@ipld/car/car/src/indexed-reader-browser.js +0 -7
- package/src/@ipld/car/car/src/indexed-reader.js +0 -211
- package/src/@ipld/car/car/src/indexer.js +0 -130
- package/src/@ipld/car/car/src/iterator-channel.js +0 -91
- package/src/@ipld/car/car/src/iterator.js +0 -267
- package/src/@ipld/car/car/src/reader-browser.js +0 -194
- package/src/@ipld/car/car/src/reader.js +0 -56
- package/src/@ipld/car/car/src/writer-browser.js +0 -250
- package/src/@ipld/car/car/src/writer.js +0 -84
- package/src/@ipld/dag-cbor/dag-cbor/LICENSE +0 -4
- package/src/@ipld/dag-cbor/dag-cbor/README.md +0 -80
- package/src/@ipld/dag-cbor/dag-cbor/dist/index.min.js +0 -3
- package/src/@ipld/dag-cbor/dag-cbor/dist/src/index.d.ts +0 -67
- package/src/@ipld/dag-cbor/dag-cbor/dist/src/index.d.ts.map +0 -1
- package/src/@ipld/dag-cbor/dag-cbor/node_modules/.bin/cborg +0 -17
- package/src/@ipld/dag-cbor/dag-cbor/package.json +0 -171
- package/src/@ipld/dag-cbor/dag-cbor/src/index.js +0 -147
- package/src/@ipld/dag-json/dag-json/LICENSE +0 -4
- package/src/@ipld/dag-json/dag-json/README.md +0 -58
- package/src/@ipld/dag-json/dag-json/dist/index.min.js +0 -3
- package/src/@ipld/dag-json/dag-json/dist/src/index.d.ts +0 -12
- package/src/@ipld/dag-json/dag-json/dist/src/index.d.ts.map +0 -1
- package/src/@ipld/dag-json/dag-json/node_modules/.bin/cborg +0 -17
- package/src/@ipld/dag-json/dag-json/package.json +0 -173
- package/src/@ipld/dag-json/dag-json/src/index.js +0 -291
- package/src/@web3-storage/pail/pail/LICENSE.md +0 -232
- package/src/@web3-storage/pail/pail/README.md +0 -84
- package/src/@web3-storage/pail/pail/cli.js +0 -218
- package/src/@web3-storage/pail/pail/dist/src/api.d.ts +0 -59
- package/src/@web3-storage/pail/pail/dist/src/api.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/batch/api.d.ts +0 -31
- package/src/@web3-storage/pail/pail/dist/src/batch/api.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/batch/index.d.ts +0 -75
- package/src/@web3-storage/pail/pail/dist/src/batch/index.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/batch/shard.d.ts +0 -3
- package/src/@web3-storage/pail/pail/dist/src/batch/shard.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/block.d.ts +0 -35
- package/src/@web3-storage/pail/pail/dist/src/block.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/clock/api.d.ts +0 -10
- package/src/@web3-storage/pail/pail/dist/src/clock/api.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/clock/index.d.ts +0 -48
- package/src/@web3-storage/pail/pail/dist/src/clock/index.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/crdt/api.d.ts +0 -26
- package/src/@web3-storage/pail/pail/dist/src/crdt/api.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/crdt/batch/api.d.ts +0 -11
- package/src/@web3-storage/pail/pail/dist/src/crdt/batch/api.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/crdt/batch/index.d.ts +0 -5
- package/src/@web3-storage/pail/pail/dist/src/crdt/batch/index.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/crdt/index.d.ts +0 -9
- package/src/@web3-storage/pail/pail/dist/src/crdt/index.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/diff.d.ts +0 -13
- package/src/@web3-storage/pail/pail/dist/src/diff.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/index.d.ts +0 -10
- package/src/@web3-storage/pail/pail/dist/src/index.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/merge.d.ts +0 -5
- package/src/@web3-storage/pail/pail/dist/src/merge.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/src/shard.d.ts +0 -43
- package/src/@web3-storage/pail/pail/dist/src/shard.d.ts.map +0 -1
- package/src/@web3-storage/pail/pail/dist/tsconfig.tsbuildinfo +0 -1
- package/src/@web3-storage/pail/pail/node_modules/.bin/pail +0 -17
- package/src/@web3-storage/pail/pail/package.json +0 -173
- package/src/@web3-storage/pail/pail/src/api.js +0 -1
- package/src/@web3-storage/pail/pail/src/api.ts +0 -90
- package/src/@web3-storage/pail/pail/src/batch/api.js +0 -1
- package/src/@web3-storage/pail/pail/src/batch/api.ts +0 -59
- package/src/@web3-storage/pail/pail/src/batch/index.js +0 -258
- package/src/@web3-storage/pail/pail/src/batch/shard.js +0 -13
- package/src/@web3-storage/pail/pail/src/block.js +0 -75
- package/src/@web3-storage/pail/pail/src/clock/api.js +0 -1
- package/src/@web3-storage/pail/pail/src/clock/api.ts +0 -12
- package/src/@web3-storage/pail/pail/src/clock/index.js +0 -182
- package/src/@web3-storage/pail/pail/src/crdt/api.js +0 -1
- package/src/@web3-storage/pail/pail/src/crdt/api.ts +0 -33
- package/src/@web3-storage/pail/pail/src/crdt/batch/api.js +0 -1
- package/src/@web3-storage/pail/pail/src/crdt/batch/api.ts +0 -30
- package/src/@web3-storage/pail/pail/src/crdt/batch/index.js +0 -155
- package/src/@web3-storage/pail/pail/src/crdt/index.js +0 -354
- package/src/@web3-storage/pail/pail/src/diff.js +0 -151
- package/src/@web3-storage/pail/pail/src/index.js +0 -406
- package/src/@web3-storage/pail/pail/src/merge.js +0 -43
- package/src/@web3-storage/pail/pail/src/shard.js +0 -180
- package/src/cborg/cborg/.github/dependabot.yml +0 -16
- package/src/cborg/cborg/.github/workflows/test-and-release.yml +0 -52
- package/src/cborg/cborg/CHANGELOG.md +0 -513
- package/src/cborg/cborg/LICENSE +0 -13
- package/src/cborg/cborg/README.md +0 -515
- package/src/cborg/cborg/bench/bench.js +0 -117
- package/src/cborg/cborg/bench/json.js +0 -124
- package/src/cborg/cborg/bench/package.json +0 -8
- package/src/cborg/cborg/cborg.js +0 -31
- package/src/cborg/cborg/example-bytestrings.js +0 -180
- package/src/cborg/cborg/example-json.js +0 -6
- package/src/cborg/cborg/example.js +0 -5
- package/src/cborg/cborg/interface.ts +0 -56
- package/src/cborg/cborg/lib/0uint.js +0 -227
- package/src/cborg/cborg/lib/1negint.js +0 -111
- package/src/cborg/cborg/lib/2bytes.js +0 -133
- package/src/cborg/cborg/lib/3string.js +0 -90
- package/src/cborg/cborg/lib/4array.js +0 -113
- package/src/cborg/cborg/lib/5map.js +0 -113
- package/src/cborg/cborg/lib/6tag.js +0 -80
- package/src/cborg/cborg/lib/7float.js +0 -308
- package/src/cborg/cborg/lib/bin.js +0 -189
- package/src/cborg/cborg/lib/bl.js +0 -124
- package/src/cborg/cborg/lib/byte-utils.js +0 -417
- package/src/cborg/cborg/lib/common.js +0 -27
- package/src/cborg/cborg/lib/decode.js +0 -209
- package/src/cborg/cborg/lib/diagnostic.js +0 -156
- package/src/cborg/cborg/lib/diagnostic_test.js +0 -117
- package/src/cborg/cborg/lib/encode.js +0 -464
- package/src/cborg/cborg/lib/is.js +0 -106
- package/src/cborg/cborg/lib/json/decode.js +0 -462
- package/src/cborg/cborg/lib/json/encode.js +0 -299
- package/src/cborg/cborg/lib/json/json.js +0 -4
- package/src/cborg/cborg/lib/jump.js +0 -209
- package/src/cborg/cborg/lib/length.js +0 -61
- package/src/cborg/cborg/lib/token.js +0 -76
- package/src/cborg/cborg/node_modules/.bin/cborg +0 -17
- package/src/cborg/cborg/package.json +0 -168
- package/src/cborg/cborg/taglib.js +0 -73
- package/src/cborg/cborg/test/appendix_a.js +0 -647
- package/src/cborg/cborg/test/common.js +0 -18
- package/src/cborg/cborg/test/node-test-bin.js +0 -402
- package/src/cborg/cborg/test/noop-bin-test.js +0 -3
- package/src/cborg/cborg/test/test-0uint.js +0 -103
- package/src/cborg/cborg/test/test-1negint.js +0 -96
- package/src/cborg/cborg/test/test-2bytes.js +0 -198
- package/src/cborg/cborg/test/test-3string.js +0 -136
- package/src/cborg/cborg/test/test-4array.js +0 -93
- package/src/cborg/cborg/test/test-5map.js +0 -284
- package/src/cborg/cborg/test/test-6tag.js +0 -85
- package/src/cborg/cborg/test/test-7float.js +0 -131
- package/src/cborg/cborg/test/test-bl.js +0 -37
- package/src/cborg/cborg/test/test-cbor-vectors.js +0 -107
- package/src/cborg/cborg/test/test-decode-errors.js +0 -65
- package/src/cborg/cborg/test/test-fuzz.js +0 -42
- package/src/cborg/cborg/test/test-json.js +0 -219
- package/src/cborg/cborg/test/test-length.js +0 -65
- package/src/cborg/cborg/test/test-partial.js +0 -111
- package/src/cborg/cborg/tsconfig.json +0 -45
- package/src/cborg/cborg/types/cborg.d.ts +0 -28
- package/src/cborg/cborg/types/cborg.d.ts.map +0 -1
- package/src/cborg/cborg/types/example.d.ts +0 -2
- package/src/cborg/cborg/types/example.d.ts.map +0 -1
- package/src/cborg/cborg/types/interface.d.ts +0 -47
- package/src/cborg/cborg/types/interface.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/0uint.d.ts +0 -100
- package/src/cborg/cborg/types/lib/0uint.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/1negint.d.ts +0 -58
- package/src/cborg/cborg/types/lib/1negint.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/2bytes.d.ts +0 -68
- package/src/cborg/cborg/types/lib/2bytes.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/3string.d.ts +0 -46
- package/src/cborg/cborg/types/lib/3string.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/4array.d.ts +0 -65
- package/src/cborg/cborg/types/lib/4array.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/5map.d.ts +0 -65
- package/src/cborg/cborg/types/lib/5map.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/6tag.d.ts +0 -61
- package/src/cborg/cborg/types/lib/6tag.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/7float.d.ts +0 -60
- package/src/cborg/cborg/types/lib/7float.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/bin.d.ts +0 -4
- package/src/cborg/cborg/types/lib/bin.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/bl.d.ts +0 -26
- package/src/cborg/cborg/types/lib/bl.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/byte-utils.d.ts +0 -53
- package/src/cborg/cborg/types/lib/byte-utils.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/common.d.ts +0 -10
- package/src/cborg/cborg/types/lib/common.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/decode.d.ts +0 -41
- package/src/cborg/cborg/types/lib/decode.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/diagnostic.d.ts +0 -12
- package/src/cborg/cborg/types/lib/diagnostic.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/diagnostic_test.d.ts +0 -2
- package/src/cborg/cborg/types/lib/diagnostic_test.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/encode.d.ts +0 -50
- package/src/cborg/cborg/types/lib/encode.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/is.d.ts +0 -6
- package/src/cborg/cborg/types/lib/is.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/json/decode.d.ts +0 -67
- package/src/cborg/cborg/types/lib/json/decode.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/json/encode.d.ts +0 -11
- package/src/cborg/cborg/types/lib/json/encode.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/json/forward-cborg.d.ts +0 -6
- package/src/cborg/cborg/types/lib/json/forward-cborg.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/json/json.d.ts +0 -6
- package/src/cborg/cborg/types/lib/json/json.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/jump.d.ts +0 -12
- package/src/cborg/cborg/types/lib/jump.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/length.d.ts +0 -27
- package/src/cborg/cborg/types/lib/length.d.ts.map +0 -1
- package/src/cborg/cborg/types/lib/token.d.ts +0 -59
- package/src/cborg/cborg/types/lib/token.d.ts.map +0 -1
- package/src/cborg/cborg/types/taglib.d.ts +0 -18
- package/src/cborg/cborg/types/taglib.d.ts.map +0 -1
- package/src/cborg/cborg/types/tsconfig.tsbuildinfo +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/LICENSE +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/README.md +0 -105
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/index.min.js +0 -3
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/errors.d.ts +0 -57
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/errors.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/errors.js +0 -73
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/errors.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/index.d.ts +0 -355
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/index.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/index.js +0 -197
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/index.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.js +0 -9
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-cbor.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-json.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-json.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-json.js +0 -9
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/dag-json.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/identity.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/identity.js +0 -38
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/identity.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/index.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/index.js +0 -30
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/index.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/json.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/json.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/json.js +0 -9
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/json.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/raw.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/raw.js +0 -37
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/raw.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.js +0 -29
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/directory.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.js +0 -153
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/file.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js +0 -59
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/hamt-sharded-directory.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.js +0 -25
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/content/raw.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.js +0 -104
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/resolvers/unixfs-v1/index.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts +0 -3
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.js +0 -20
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/extract-data-from-block.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts +0 -6
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.js +0 -116
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/find-cid-in-shard.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/resolve-object-path.d.ts +0 -4
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/resolve-object-path.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/resolve-object-path.js +0 -57
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/resolve-object-path.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts +0 -6
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.d.ts.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.js +0 -30
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/src/utils/validate-offset-and-length.js.map +0 -1
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/dist/typedoc-urls.json +0 -58
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/package.json +0 -180
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/errors.ts +0 -87
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/index.ts +0 -498
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/dag-cbor.ts +0 -12
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/dag-json.ts +0 -12
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/identity.ts +0 -49
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/index.ts +0 -35
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/json.ts +0 -12
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/raw.ts +0 -49
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/directory.ts +0 -39
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/file.ts +0 -198
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/hamt-sharded-directory.ts +0 -76
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/content/raw.ts +0 -37
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.ts +0 -121
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/utils/extract-data-from-block.ts +0 -24
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/utils/find-cid-in-shard.ts +0 -149
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/utils/resolve-object-path.ts +0 -62
- package/src/ipfs-unixfs-exporter/ipfs-unixfs-exporter/src/utils/validate-offset-and-length.ts +0 -38
package/p-limit/test.js
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
2
|
+
import test from "ava";
|
|
3
|
+
import delay from "delay";
|
|
4
|
+
import inRange from "in-range";
|
|
5
|
+
import timeSpan from "time-span";
|
|
6
|
+
import randomInt from "random-int";
|
|
7
|
+
import pLimit, { limitFunction } from "./index.js";
|
|
8
|
+
|
|
9
|
+
test("concurrency: 1", async (t) => {
|
|
10
|
+
const input = [
|
|
11
|
+
[10, 300],
|
|
12
|
+
[20, 200],
|
|
13
|
+
[30, 100],
|
|
14
|
+
];
|
|
15
|
+
|
|
16
|
+
const end = timeSpan();
|
|
17
|
+
const limit = pLimit(1);
|
|
18
|
+
|
|
19
|
+
const mapper = ([value, ms]) =>
|
|
20
|
+
limit(async () => {
|
|
21
|
+
await delay(ms);
|
|
22
|
+
return value;
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
t.deepEqual(await Promise.all(input.map((x) => mapper(x))), [10, 20, 30]);
|
|
26
|
+
t.true(inRange(end(), { start: 590, end: 650 }));
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
test("concurrency: 4", async (t) => {
|
|
30
|
+
const concurrency = 5;
|
|
31
|
+
let running = 0;
|
|
32
|
+
|
|
33
|
+
const limit = pLimit(concurrency);
|
|
34
|
+
|
|
35
|
+
const input = Array.from({ length: 100 }, () =>
|
|
36
|
+
limit(async () => {
|
|
37
|
+
running++;
|
|
38
|
+
t.true(running <= concurrency);
|
|
39
|
+
await delay(randomInt(30, 200));
|
|
40
|
+
running--;
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
await Promise.all(input);
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
test("propagates async execution context properly", async (t) => {
|
|
48
|
+
const concurrency = 2;
|
|
49
|
+
const limit = pLimit(concurrency);
|
|
50
|
+
const store = new AsyncLocalStorage();
|
|
51
|
+
|
|
52
|
+
const checkId = async (id) => {
|
|
53
|
+
await Promise.resolve();
|
|
54
|
+
t.is(id, store.getStore()?.id);
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const startContext = async (id) => store.run({ id }, () => limit(checkId, id));
|
|
58
|
+
|
|
59
|
+
await Promise.all(Array.from({ length: 100 }, (_, id) => startContext(id)));
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
test("non-promise returning function", async (t) => {
|
|
63
|
+
await t.notThrowsAsync(async () => {
|
|
64
|
+
const limit = pLimit(1);
|
|
65
|
+
await limit(() => null);
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
test("continues after sync throw", async (t) => {
|
|
70
|
+
const limit = pLimit(1);
|
|
71
|
+
let ran = false;
|
|
72
|
+
|
|
73
|
+
const promises = [
|
|
74
|
+
limit(() => {
|
|
75
|
+
throw new Error("err");
|
|
76
|
+
}),
|
|
77
|
+
limit(() => {
|
|
78
|
+
ran = true;
|
|
79
|
+
}),
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
await Promise.all(promises).catch(() => {
|
|
83
|
+
/* */
|
|
84
|
+
});
|
|
85
|
+
|
|
86
|
+
t.is(ran, true);
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
test("accepts additional arguments", async (t) => {
|
|
90
|
+
const limit = pLimit(1);
|
|
91
|
+
const symbol = Symbol("test");
|
|
92
|
+
|
|
93
|
+
await limit((a) => t.is(a, symbol), symbol);
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test("does not ignore errors", async (t) => {
|
|
97
|
+
const limit = pLimit(1);
|
|
98
|
+
const error = new Error("🦄");
|
|
99
|
+
|
|
100
|
+
const promises = [
|
|
101
|
+
limit(async () => {
|
|
102
|
+
await delay(30);
|
|
103
|
+
}),
|
|
104
|
+
limit(async () => {
|
|
105
|
+
await delay(80);
|
|
106
|
+
throw error;
|
|
107
|
+
}),
|
|
108
|
+
limit(async () => {
|
|
109
|
+
await delay(50);
|
|
110
|
+
}),
|
|
111
|
+
];
|
|
112
|
+
|
|
113
|
+
await t.throwsAsync(Promise.all(promises), { is: error });
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
test("activeCount and pendingCount properties", async (t) => {
|
|
117
|
+
const limit = pLimit(5);
|
|
118
|
+
t.is(limit.activeCount, 0);
|
|
119
|
+
t.is(limit.pendingCount, 0);
|
|
120
|
+
|
|
121
|
+
const runningPromise1 = limit(() => delay(1000));
|
|
122
|
+
t.is(limit.activeCount, 0);
|
|
123
|
+
t.is(limit.pendingCount, 1);
|
|
124
|
+
|
|
125
|
+
await Promise.resolve();
|
|
126
|
+
t.is(limit.activeCount, 1);
|
|
127
|
+
t.is(limit.pendingCount, 0);
|
|
128
|
+
|
|
129
|
+
await runningPromise1;
|
|
130
|
+
t.is(limit.activeCount, 0);
|
|
131
|
+
t.is(limit.pendingCount, 0);
|
|
132
|
+
|
|
133
|
+
const immediatePromises = Array.from({ length: 5 }, () => limit(() => delay(1000)));
|
|
134
|
+
const delayedPromises = Array.from({ length: 3 }, () => limit(() => delay(1000)));
|
|
135
|
+
|
|
136
|
+
await Promise.resolve();
|
|
137
|
+
t.is(limit.activeCount, 5);
|
|
138
|
+
t.is(limit.pendingCount, 3);
|
|
139
|
+
|
|
140
|
+
await Promise.all(immediatePromises);
|
|
141
|
+
t.is(limit.activeCount, 3);
|
|
142
|
+
t.is(limit.pendingCount, 0);
|
|
143
|
+
|
|
144
|
+
await Promise.all(delayedPromises);
|
|
145
|
+
|
|
146
|
+
t.is(limit.activeCount, 0);
|
|
147
|
+
t.is(limit.pendingCount, 0);
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
test("clearQueue", async (t) => {
|
|
151
|
+
const limit = pLimit(1);
|
|
152
|
+
|
|
153
|
+
Array.from({ length: 1 }, () => limit(() => delay(1000)));
|
|
154
|
+
Array.from({ length: 3 }, () => limit(() => delay(1000)));
|
|
155
|
+
|
|
156
|
+
await Promise.resolve();
|
|
157
|
+
t.is(limit.pendingCount, 3);
|
|
158
|
+
limit.clearQueue();
|
|
159
|
+
t.is(limit.pendingCount, 0);
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
test("throws on invalid concurrency argument", (t) => {
|
|
163
|
+
t.throws(() => {
|
|
164
|
+
pLimit(0);
|
|
165
|
+
});
|
|
166
|
+
|
|
167
|
+
t.throws(() => {
|
|
168
|
+
pLimit(-1);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
t.throws(() => {
|
|
172
|
+
pLimit(1.2);
|
|
173
|
+
});
|
|
174
|
+
|
|
175
|
+
t.throws(() => {
|
|
176
|
+
pLimit(undefined);
|
|
177
|
+
});
|
|
178
|
+
|
|
179
|
+
t.throws(() => {
|
|
180
|
+
pLimit(true);
|
|
181
|
+
});
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
test("change concurrency to smaller value", async (t) => {
|
|
185
|
+
const limit = pLimit(4);
|
|
186
|
+
let running = 0;
|
|
187
|
+
const log = [];
|
|
188
|
+
const promises = Array.from({ length: 10 }).map(() =>
|
|
189
|
+
limit(async () => {
|
|
190
|
+
++running;
|
|
191
|
+
log.push(running);
|
|
192
|
+
await delay(50);
|
|
193
|
+
--running;
|
|
194
|
+
}),
|
|
195
|
+
);
|
|
196
|
+
await delay(0);
|
|
197
|
+
t.is(running, 4);
|
|
198
|
+
|
|
199
|
+
limit.concurrency = 2;
|
|
200
|
+
await Promise.all(promises);
|
|
201
|
+
t.deepEqual(log, [1, 2, 3, 4, 2, 2, 2, 2, 2, 2]);
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
test("change concurrency to bigger value", async (t) => {
|
|
205
|
+
const limit = pLimit(2);
|
|
206
|
+
let running = 0;
|
|
207
|
+
const log = [];
|
|
208
|
+
const promises = Array.from({ length: 10 }).map(() =>
|
|
209
|
+
limit(async () => {
|
|
210
|
+
++running;
|
|
211
|
+
log.push(running);
|
|
212
|
+
await delay(50);
|
|
213
|
+
--running;
|
|
214
|
+
}),
|
|
215
|
+
);
|
|
216
|
+
await delay(0);
|
|
217
|
+
t.is(running, 2);
|
|
218
|
+
|
|
219
|
+
limit.concurrency = 4;
|
|
220
|
+
await Promise.all(promises);
|
|
221
|
+
t.deepEqual(log, [1, 2, 3, 4, 4, 4, 4, 4, 4, 4]);
|
|
222
|
+
});
|
|
223
|
+
|
|
224
|
+
test("limitFunction()", async (t) => {
|
|
225
|
+
const concurrency = 5;
|
|
226
|
+
let running = 0;
|
|
227
|
+
|
|
228
|
+
const limitedFunction = limitFunction(
|
|
229
|
+
async () => {
|
|
230
|
+
running++;
|
|
231
|
+
t.true(running <= concurrency);
|
|
232
|
+
await delay(randomInt(30, 200));
|
|
233
|
+
running--;
|
|
234
|
+
},
|
|
235
|
+
{ concurrency },
|
|
236
|
+
);
|
|
237
|
+
|
|
238
|
+
const input = Array.from({ length: 100 }, limitedFunction);
|
|
239
|
+
|
|
240
|
+
await Promise.all(input);
|
|
241
|
+
});
|
package/package.json
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fireproof/vendor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2-dev-test",
|
|
4
4
|
"description": "vendor patch repo to support esm",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
7
|
+
"exports": {
|
|
8
|
+
"./p-limit": {
|
|
9
|
+
"types": "./p-limit/index.d.ts",
|
|
10
|
+
"default": "./p-limit/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
7
13
|
"keywords": [],
|
|
8
14
|
"author": "",
|
|
9
15
|
"license": "ISC",
|
|
10
16
|
"devDependencies": {
|
|
17
|
+
"@fireproof/core-cli": "0.0.2-dev-test",
|
|
11
18
|
"@types/jscodeshift": "^0.12.0",
|
|
12
19
|
"cmd-ts": "^0.13.0",
|
|
13
|
-
"glob": "^11.0.0",
|
|
14
20
|
"jscodeshift": "^17.1.1",
|
|
21
|
+
"tsd": "^0.32.0",
|
|
15
22
|
"tsx": "^4.19.2",
|
|
16
23
|
"zx": "^8.2.4"
|
|
17
24
|
},
|
|
18
25
|
"dependencies": {
|
|
19
|
-
"
|
|
20
|
-
"@ipld/dag-cbor": "^9.2.2",
|
|
21
|
-
"@ipld/dag-json": "file:patched/@ipld/dag-json/ipld-dag-json-10.2.3.tgz",
|
|
22
|
-
"@web3-storage/pail": "^0.6.0",
|
|
23
|
-
"cborg": "file:patched/cborg/cborg-4.2.7.tgz",
|
|
24
|
-
"ipfs-unixfs-exporter": "^13.6.1"
|
|
26
|
+
"yocto-queue": "^1.2.1"
|
|
25
27
|
},
|
|
26
28
|
"scripts": {
|
|
27
|
-
"build": "
|
|
29
|
+
"build": "echo done",
|
|
30
|
+
"build:merge": "tsx merge-package.ts --prepare --verbose 'p-limit,https://github.com/mabels/p-limit.git,pnpm'"
|
|
28
31
|
}
|
|
29
32
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ImportDeclaration, API, FileInfo, Options } from "jscodeshift";
|
|
2
|
+
|
|
3
|
+
const nodeExternals = new Set(["path", "fs", "fs/promises"]);
|
|
4
|
+
|
|
5
|
+
const replace = {
|
|
6
|
+
/*
|
|
7
|
+
"cborg": "@fireproof/vendor/cborg",
|
|
8
|
+
"cborg/utils": "@fireproof/vendor/cborg/utils",
|
|
9
|
+
"cborg/json": "@fireproof/vendor/cborg/json",
|
|
10
|
+
"cborg/length": "@fireproof/vendor/cborg/length",
|
|
11
|
+
"cborg/taglib": "@fireproof/vendor/cborg/taglib",
|
|
12
|
+
"@ipld/dag-json": "@fireproof/vendor/@ipld/dag-json",
|
|
13
|
+
"@ipld/dag-cbor": "@fireproof/vendor/@ipld/dag-cbor",
|
|
14
|
+
*/
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
18
|
+
export default function (fileInfo: FileInfo, api: API, options: Options) {
|
|
19
|
+
return api
|
|
20
|
+
.jscodeshift(fileInfo.source)
|
|
21
|
+
.find(ImportDeclaration)
|
|
22
|
+
.map((path) => {
|
|
23
|
+
const sourceValue = path.node.source.value;
|
|
24
|
+
if (!sourceValue) {
|
|
25
|
+
return path;
|
|
26
|
+
}
|
|
27
|
+
const val = sourceValue.toString();
|
|
28
|
+
if (nodeExternals.has(val)) {
|
|
29
|
+
return path;
|
|
30
|
+
} else if (replace[val]) {
|
|
31
|
+
path.node.source.value = replace[val];
|
|
32
|
+
}
|
|
33
|
+
// else if (/^[^.].*/.test(val)) {
|
|
34
|
+
// // eslint-disable-next-line no-console
|
|
35
|
+
// // console.log(path.node.source)
|
|
36
|
+
// path.node.source.value = `https://esm.sh/${path.node.source.value}`;
|
|
37
|
+
// }
|
|
38
|
+
return path; //.node as unknown as ASTPath<ASTNode>;
|
|
39
|
+
})
|
|
40
|
+
.toSource();
|
|
41
|
+
//return orig;
|
|
42
|
+
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
name: test & maybe release
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- master
|
|
7
|
-
pull_request:
|
|
8
|
-
workflow_dispatch:
|
|
9
|
-
|
|
10
|
-
permissions:
|
|
11
|
-
contents: write
|
|
12
|
-
id-token: write
|
|
13
|
-
packages: write
|
|
14
|
-
pull-requests: write
|
|
15
|
-
|
|
16
|
-
concurrency:
|
|
17
|
-
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}
|
|
18
|
-
cancel-in-progress: true
|
|
19
|
-
|
|
20
|
-
jobs:
|
|
21
|
-
js-test-and-release:
|
|
22
|
-
uses: ipdxco/unified-github-workflows/.github/workflows/js-test-and-release.yml@v1.0
|
|
23
|
-
secrets:
|
|
24
|
-
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
|
|
25
|
-
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
|
|
26
|
-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
27
|
-
UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }}
|
|
28
|
-
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
## [10.2.3](https://github.com/ipld/js-dag-json/compare/v10.2.2...v10.2.3) (2024-10-29)
|
|
2
|
-
|
|
3
|
-
### Dependencies
|
|
4
|
-
|
|
5
|
-
* **dev:** bump aegir from 44.1.4 to 45.0.1 ([250d25d](https://github.com/ipld/js-dag-json/commit/250d25d8f00cfea36b4f79f5bcc2b609bc54592d))
|
|
6
|
-
|
|
7
|
-
## [10.2.2](https://github.com/ipld/js-dag-json/compare/v10.2.1...v10.2.2) (2024-06-24)
|
|
8
|
-
|
|
9
|
-
### Dependencies
|
|
10
|
-
|
|
11
|
-
* **dev:** bump aegir from 43.0.3 to 44.0.0 ([c69a787](https://github.com/ipld/js-dag-json/commit/c69a787a81af7e40b19b5027f496277145b8c1e6))
|
|
12
|
-
|
|
13
|
-
## [10.2.1](https://github.com/ipld/js-dag-json/compare/v10.2.0...v10.2.1) (2024-06-01)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Dependencies
|
|
17
|
-
|
|
18
|
-
* **dev:** bump aegir from 42.2.11 to 43.0.1 ([6c660c2](https://github.com/ipld/js-dag-json/commit/6c660c2ce83c06530b1cf18160dcbd56e149de21))
|
|
19
|
-
|
|
20
|
-
## [10.2.0](https://github.com/ipld/js-dag-json/compare/v10.1.7...v10.2.0) (2024-02-16)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### Features
|
|
24
|
-
|
|
25
|
-
* support decoding ArrayBuffers ([#127](https://github.com/ipld/js-dag-json/issues/127)) ([1e6cc99](https://github.com/ipld/js-dag-json/commit/1e6cc99fa3a7d6c7c7a43597a28ff66be35e2eb0))
|
|
26
|
-
|
|
27
|
-
## [10.1.7](https://github.com/ipld/js-dag-json/compare/v10.1.6...v10.1.7) (2024-01-10)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Dependencies
|
|
31
|
-
|
|
32
|
-
* **dev:** bump aegir from 41.3.5 to 42.1.0 ([20a7afe](https://github.com/ipld/js-dag-json/commit/20a7afebf7dd50b7d537733582be660b3b51a945))
|
|
33
|
-
|
|
34
|
-
## [10.1.6](https://github.com/ipld/js-dag-json/compare/v10.1.5...v10.1.6) (2023-12-30)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### Dependencies
|
|
38
|
-
|
|
39
|
-
* bump multiformats from 12.1.3 to 13.0.0 ([#124](https://github.com/ipld/js-dag-json/issues/124)) ([aa07066](https://github.com/ipld/js-dag-json/commit/aa07066ed36bf9a8d1956b07f1880860b3709af2))
|
|
40
|
-
|
|
41
|
-
## [10.1.5](https://github.com/ipld/js-dag-json/compare/v10.1.4...v10.1.5) (2023-10-03)
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
### Dependencies
|
|
45
|
-
|
|
46
|
-
* **dev:** bump aegir from 40.0.13 to 41.0.0 ([9ca7d3b](https://github.com/ipld/js-dag-json/commit/9ca7d3b426105562b780a707efd06072ba7a3e0c))
|
|
47
|
-
|
|
48
|
-
## [10.1.4](https://github.com/ipld/js-dag-json/compare/v10.1.3...v10.1.4) (2023-09-12)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### Trivial Changes
|
|
52
|
-
|
|
53
|
-
* add or force update .github/workflows/js-test-and-release.yml ([043a680](https://github.com/ipld/js-dag-json/commit/043a680ebc0b56b21d57fcfcf9b87bd780a1924b))
|
|
54
|
-
* delete templates [skip ci] ([#117](https://github.com/ipld/js-dag-json/issues/117)) ([94ee02b](https://github.com/ipld/js-dag-json/commit/94ee02b09482ca0a471c0f4220df0601e2729348))
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
### Dependencies
|
|
58
|
-
|
|
59
|
-
* bump cborg from 2.0.5 to 4.0.0 ([29452a4](https://github.com/ipld/js-dag-json/commit/29452a479fce2b139c84a4ae65d6b2ed29d59f1a))
|
|
60
|
-
|
|
61
|
-
## [10.1.3](https://github.com/ipld/js-dag-json/compare/v10.1.2...v10.1.3) (2023-08-08)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
### Dependencies
|
|
65
|
-
|
|
66
|
-
* **dev:** bump aegir from 39.0.13 to 40.0.8 ([363da2a](https://github.com/ipld/js-dag-json/commit/363da2a9c9ce9739cae35add8a74c36b5ed4a836))
|
|
67
|
-
|
|
68
|
-
## [10.1.2](https://github.com/ipld/js-dag-json/compare/v10.1.1...v10.1.2) (2023-06-19)
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
### Dependencies
|
|
72
|
-
|
|
73
|
-
* bump multiformats from 11.0.2 to 12.0.1 ([8db6696](https://github.com/ipld/js-dag-json/commit/8db669695f8c1f213c29536c3f57c77cb57d76c8))
|
|
74
|
-
|
|
75
|
-
## [10.1.1](https://github.com/ipld/js-dag-json/compare/v10.1.0...v10.1.1) (2023-06-14)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
### Dependencies
|
|
79
|
-
|
|
80
|
-
* bump cborg from 1.10.2 to 2.0.1 ([91c3e3f](https://github.com/ipld/js-dag-json/commit/91c3e3fe1ad813b3a804e846a25be7a4d5fed7eb))
|
|
81
|
-
|
|
82
|
-
## [10.1.0](https://github.com/ipld/js-dag-json/compare/v10.0.1...v10.1.0) (2023-05-23)
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
### Features
|
|
86
|
-
|
|
87
|
-
* TypedArray type conversions (and address other new lint complaints) ([94bd7ef](https://github.com/ipld/js-dag-json/commit/94bd7ef76b3effefbd12f4d2be2fe37a100ffa1e))
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
### Dependencies
|
|
91
|
-
|
|
92
|
-
* **dev:** bump aegir from 38.1.8 to 39.0.7 ([71b54c6](https://github.com/ipld/js-dag-json/commit/71b54c6ca38ad6dbc90eb5f11f1340ea97031750))
|
|
93
|
-
|
|
94
|
-
## [10.0.1](https://github.com/ipld/js-dag-json/compare/v10.0.0...v10.0.1) (2023-02-08)
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
### Dependencies
|
|
98
|
-
|
|
99
|
-
* **dev:** bump aegir from 37.12.1 to 38.1.2 ([7385c6e](https://github.com/ipld/js-dag-json/commit/7385c6e747a13baae885501f3773cd041e914027))
|
|
100
|
-
|
|
101
|
-
## [10.0.0](https://github.com/ipld/js-dag-json/compare/v9.1.1...v10.0.0) (2023-01-06)
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
### ⚠ BREAKING CHANGES
|
|
105
|
-
|
|
106
|
-
* reject duplicate map keys
|
|
107
|
-
|
|
108
|
-
### Bug Fixes
|
|
109
|
-
|
|
110
|
-
* reject duplicate map keys ([65a37bc](https://github.com/ipld/js-dag-json/commit/65a37bc17fd8cea11b36d6e30dcd6d16df462884))
|
|
111
|
-
|
|
112
|
-
## [9.1.1](https://github.com/ipld/js-dag-json/compare/v9.1.0...v9.1.1) (2023-01-03)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### Dependencies
|
|
116
|
-
|
|
117
|
-
* bump multiformats from 10.0.3 to 11.0.0 ([ba9c3a4](https://github.com/ipld/js-dag-json/commit/ba9c3a4fe43e5474786a2cf1d95b5375b8578177))
|
|
118
|
-
|
|
119
|
-
## [9.1.0](https://github.com/ipld/js-dag-json/compare/v9.0.1...v9.1.0) (2022-12-19)
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
### Features
|
|
123
|
-
|
|
124
|
-
* export parse / stringify functions ([#88](https://github.com/ipld/js-dag-json/issues/88)) ([1ae3f70](https://github.com/ipld/js-dag-json/commit/1ae3f708a624d5aaa5548a3360d7ccd8004e46e5))
|
|
125
|
-
|
|
126
|
-
## [9.0.1](https://github.com/ipld/js-dag-json/compare/v9.0.0...v9.0.1) (2022-10-24)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### Bug Fixes
|
|
130
|
-
|
|
131
|
-
* bring back asCID check for backward compat with multiformats@<10 ([#83](https://github.com/ipld/js-dag-json/issues/83)) ([fe19208](https://github.com/ipld/js-dag-json/commit/fe19208aef881769470d5e9730ba434a3076346e))
|
|
132
|
-
|
|
133
|
-
## [9.0.0](https://github.com/ipld/js-dag-json/compare/v8.0.11...v9.0.0) (2022-10-19)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
### ⚠ BREAKING CHANGES
|
|
137
|
-
|
|
138
|
-
* publish as esm-only (#80)
|
|
139
|
-
|
|
140
|
-
### Features
|
|
141
|
-
|
|
142
|
-
* publish as esm-only ([#80](https://github.com/ipld/js-dag-json/issues/80)) ([131ea8e](https://github.com/ipld/js-dag-json/commit/131ea8e91fba1845ff755f8e8e6672fdf0919ca3))
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
### Trivial Changes
|
|
146
|
-
|
|
147
|
-
* **no-release:** bump actions/setup-node from 3.4.1 to 3.5.0 ([#76](https://github.com/ipld/js-dag-json/issues/76)) ([30578b4](https://github.com/ipld/js-dag-json/commit/30578b4f3dc7f2d3b1517ba69965115d17d74e16))
|
|
148
|
-
* **no-release:** bump actions/setup-node from 3.5.0 to 3.5.1 ([#79](https://github.com/ipld/js-dag-json/issues/79)) ([a59b710](https://github.com/ipld/js-dag-json/commit/a59b710d3585ea6f07cbc4890a1c4d100a8bec4e))
|
|
149
|
-
* **no-release:** bump ipld-garbage from 4.0.10 to 5.0.0 ([#72](https://github.com/ipld/js-dag-json/issues/72)) ([6e428e1](https://github.com/ipld/js-dag-json/commit/6e428e1ad953495c2c6546b020faeb898ab812d7))
|
|
150
|
-
* update project config ([cf08c02](https://github.com/ipld/js-dag-json/commit/cf08c02c1ada814e43c34c6df24d464718d581d8))
|
|
151
|
-
|
|
152
|
-
## [8.0.11](https://github.com/ipld/js-dag-json/compare/v8.0.10...v8.0.11) (2022-08-27)
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
### Trivial Changes
|
|
156
|
-
|
|
157
|
-
* **deps-dev:** bump typescript from 4.7.4 to 4.8.2 ([#75](https://github.com/ipld/js-dag-json/issues/75)) ([fbd68b9](https://github.com/ipld/js-dag-json/commit/fbd68b92b6169f1bb27e3f05befe80827de752d1))
|
|
158
|
-
* **no-release:** bump actions/setup-node from 3.2.0 to 3.3.0 ([#71](https://github.com/ipld/js-dag-json/issues/71)) ([26cd28a](https://github.com/ipld/js-dag-json/commit/26cd28a6bfe8a895b1c102587402dfb558ae30e5))
|
|
159
|
-
* **no-release:** bump actions/setup-node from 3.3.0 to 3.4.0 ([#73](https://github.com/ipld/js-dag-json/issues/73)) ([4734dec](https://github.com/ipld/js-dag-json/commit/4734dec409786ec00479d3988a6d471f20b348cd))
|
|
160
|
-
* **no-release:** bump actions/setup-node from 3.4.0 to 3.4.1 ([#74](https://github.com/ipld/js-dag-json/issues/74)) ([546502c](https://github.com/ipld/js-dag-json/commit/546502ca9fc03ae0799a9b47c999c66612ea2035))
|
|
161
|
-
|
|
162
|
-
### [8.0.10](https://github.com/ipld/js-dag-json/compare/v8.0.9...v8.0.10) (2022-05-25)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
### Trivial Changes
|
|
166
|
-
|
|
167
|
-
* **deps-dev:** bump typescript from 4.6.4 to 4.7.2 ([645255c](https://github.com/ipld/js-dag-json/commit/645255c916104dc5129f1d701eac40119bebf996))
|
|
168
|
-
* **no-release:** bump actions/setup-node from 3.1.0 to 3.1.1 ([#64](https://github.com/ipld/js-dag-json/issues/64)) ([9e3eb91](https://github.com/ipld/js-dag-json/commit/9e3eb91079105d435129de7bf364d75f60dfbb91))
|
|
169
|
-
* **no-release:** bump actions/setup-node from 3.1.1 to 3.2.0 ([#69](https://github.com/ipld/js-dag-json/issues/69)) ([46bf66d](https://github.com/ipld/js-dag-json/commit/46bf66d1d9f6e03fd3e051c61abb9f7625b1c664))
|
|
170
|
-
* **no-release:** bump mocha from 9.2.2 to 10.0.0 ([#66](https://github.com/ipld/js-dag-json/issues/66)) ([cf98d70](https://github.com/ipld/js-dag-json/commit/cf98d701a650baf50ddbe30d777aad1c71ec8867))
|
|
171
|
-
* **no-release:** bump polendina from 2.0.15 to 3.0.0 ([#67](https://github.com/ipld/js-dag-json/issues/67)) ([3993975](https://github.com/ipld/js-dag-json/commit/3993975dff22b013664348caf94df83e3976a8d5))
|
|
172
|
-
* **no-release:** bump polendina from 3.0.0 to 3.1.0 ([#68](https://github.com/ipld/js-dag-json/issues/68)) ([3724268](https://github.com/ipld/js-dag-json/commit/37242680dde12d83f0de38d181312298f80469d8))
|
|
173
|
-
* **no-release:** bump standard from 16.0.4 to 17.0.0 ([#65](https://github.com/ipld/js-dag-json/issues/65)) ([80dcb64](https://github.com/ipld/js-dag-json/commit/80dcb64ef7502d1b353707d9e58fc9fe939cc263))
|
|
174
|
-
|
|
175
|
-
### [8.0.9](https://github.com/ipld/js-dag-json/compare/v8.0.8...v8.0.9) (2022-04-05)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
### Bug Fixes
|
|
179
|
-
|
|
180
|
-
* typo in the readme ([#63](https://github.com/ipld/js-dag-json/issues/63)) ([1168651](https://github.com/ipld/js-dag-json/commit/1168651de0b0977b369faaac0a39495eb39e63b1))
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
### Trivial Changes
|
|
184
|
-
|
|
185
|
-
* **no-release:** bump actions/setup-node from 3.0.0 to 3.1.0 ([#62](https://github.com/ipld/js-dag-json/issues/62)) ([67c71d6](https://github.com/ipld/js-dag-json/commit/67c71d6a5f60d202c5dd4ace5b3766d4c812f3c6))
|
|
186
|
-
|
|
187
|
-
### [8.0.8](https://github.com/ipld/js-dag-json/compare/v8.0.7...v8.0.8) (2022-03-02)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
### Trivial Changes
|
|
191
|
-
|
|
192
|
-
* **deps-dev:** bump typescript from 4.5.5 to 4.6.2 ([#61](https://github.com/ipld/js-dag-json/issues/61)) ([6b2d04f](https://github.com/ipld/js-dag-json/commit/6b2d04fd6a3429f5e10adc7f3d8094785be6a08a))
|
|
193
|
-
* **no-release:** bump actions/checkout from 2.4.0 to 3 ([#60](https://github.com/ipld/js-dag-json/issues/60)) ([2e69f96](https://github.com/ipld/js-dag-json/commit/2e69f965c08882b3a31db52341662d8ca51582f1))
|
|
194
|
-
* **no-release:** bump actions/setup-node from 2.5.0 to 2.5.1 ([#57](https://github.com/ipld/js-dag-json/issues/57)) ([fd88425](https://github.com/ipld/js-dag-json/commit/fd884252f6cf655234f4bd0323140cc1394adf87))
|
|
195
|
-
* **no-release:** bump actions/setup-node from 2.5.1 to 3.0.0 ([#59](https://github.com/ipld/js-dag-json/issues/59)) ([91d068c](https://github.com/ipld/js-dag-json/commit/91d068cbfa1dc621fdf65f5871da54458a55c5f4))
|
|
196
|
-
|
|
197
|
-
### [8.0.7](https://github.com/ipld/js-dag-json/compare/v8.0.6...v8.0.7) (2021-12-10)
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
### Bug Fixes
|
|
201
|
-
|
|
202
|
-
* bad double-release ([22fc1fe](https://github.com/ipld/js-dag-json/commit/22fc1fee8a494290670919b403cf2cc6ad0a14d6))
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
|
2
|
-
|
|
3
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
4
|
-
|
|
5
|
-
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
4
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
5
|
-
in the Software without restriction, including without limitation the rights
|
|
6
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
7
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
8
|
-
furnished to do so, subject to the following conditions:
|
|
9
|
-
|
|
10
|
-
The above copyright notice and this permission notice shall be included in
|
|
11
|
-
all copies or substantial portions of the Software.
|
|
12
|
-
|
|
13
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
14
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
15
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
16
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
17
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
18
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
19
|
-
THE SOFTWARE.
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# @ipld/dag-json <!-- omit in toc -->
|
|
2
|
-
|
|
3
|
-
[](https://codecov.io/gh/ipld/js-dag-json)
|
|
4
|
-
[](https://github.com/ipld/js-dag-json/actions/workflows/js-test-and-release.yml)
|
|
5
|
-
|
|
6
|
-
> JS implementation of DAG-JSON
|
|
7
|
-
|
|
8
|
-
## Table of contents <!-- omit in toc -->
|
|
9
|
-
|
|
10
|
-
- [Install](#install)
|
|
11
|
-
- [Example](#example)
|
|
12
|
-
- [Usage](#usage)
|
|
13
|
-
- [License](#license)
|
|
14
|
-
- [Contribute](#contribute)
|
|
15
|
-
|
|
16
|
-
## Install
|
|
17
|
-
|
|
18
|
-
```console
|
|
19
|
-
$ npm i @ipld/dag-json
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
## Example
|
|
23
|
-
|
|
24
|
-
```javascript
|
|
25
|
-
import { encode, decode } from '@ipld/dag-json'
|
|
26
|
-
import { CID } from 'multiformats'
|
|
27
|
-
|
|
28
|
-
const obj = {
|
|
29
|
-
x: 1,
|
|
30
|
-
/* CID instances are encoded as links */
|
|
31
|
-
y: [2, 3, CID.parse('QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4')],
|
|
32
|
-
z: {
|
|
33
|
-
a: CID.parse('QmaozNR7DZHQK1ZcU9p7QdrshMvXqWK6gpu5rmrkPdT3L4'),
|
|
34
|
-
b: null,
|
|
35
|
-
c: 'string'
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
let data = encode(obj)
|
|
40
|
-
let decoded = decode(data)
|
|
41
|
-
decoded.y[0] // 2
|
|
42
|
-
CID.asCID(decoded.z.a) // cid instance
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
## Usage
|
|
46
|
-
|
|
47
|
-
`@ipld/dag-json` is designed to be used within multiformats but can be used separately. `encode()`, `decode()` are available as exports, as are `name` and `code` to match with the corresponding DAG-JSON [multicodec](https://github.com/multiformats/multicodec/).
|
|
48
|
-
|
|
49
|
-
## License
|
|
50
|
-
|
|
51
|
-
Licensed under either of
|
|
52
|
-
|
|
53
|
-
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
|
|
54
|
-
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
|
|
55
|
-
|
|
56
|
-
## Contribute
|
|
57
|
-
|
|
58
|
-
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
|
|
Binary file
|