Compare commits

..

No commits in common. "v0.2.0-develop.46" and "v0.2.0-develop.45" have entirely different histories.

4 changed files with 4 additions and 24 deletions

View File

@ -1,10 +1,3 @@
# [0.2.0-develop.46](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.45...v0.2.0-develop.46) (2023-09-04)
### Bug Fixes
* if has is a CID, override arguments with the CID properties unless we have an argument set already ([2c56658](https://git.lumeweb.com/LumeWeb/libweb/commit/2c56658a6c06c51e6f079232c35cce05a6ca72c3))
# [0.2.0-develop.45](https://git.lumeweb.com/LumeWeb/libweb/compare/v0.2.0-develop.44...v0.2.0-develop.45) (2023-09-04)

4
npm-shrinkwrap.json generated
View File

@ -1,12 +1,12 @@
{
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.46",
"version": "0.2.0-develop.45",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.46",
"version": "0.2.0-develop.45",
"dependencies": {
"@lumeweb/community-portals": "^0.1.0-develop.6",
"@lumeweb/libportal": "0.2.0-develop.23",

View File

@ -1,6 +1,6 @@
{
"name": "@lumeweb/libweb",
"version": "0.2.0-develop.46",
"version": "0.2.0-develop.45",
"main": "lib/index.js",
"type": "module",
"repository": {

View File

@ -22,26 +22,13 @@ export function encodeCid(
hashType?: number,
raw?: boolean,
): ErrTuple<string | Uint8Array>;
export function encodeCid(
hash: CID,
size?: bigint,
type?: number,
hashType?: number,
raw?: boolean,
): ErrTuple<string | Uint8Array>;
export function encodeCid(
hash: any,
size?: bigint,
size: bigint,
type?: number,
hashType?: number,
raw: boolean = false,
): ErrTuple<string | Uint8Array> {
if (typeof hash !== "string" && !(hash instanceof Uint8Array)) {
size = hash.size;
type = type ?? hash.type;
hashType = hashType ?? hash.type;
hash = hash.hash;
}
try {
return [encodeCidPortal(hash, size, type, hashType, raw), null];
} catch (e) {