From 8c7e473e40c19d8ef838c66c0ab1edaa013d3b53 Mon Sep 17 00:00:00 2001 From: achingbrain Date: Tue, 27 Oct 2020 17:45:08 +0000 Subject: [PATCH 1/2] fix: types path for ipfs-core For some reason you need to add `/src` after `ipfs-core` otherwise the import in the generated `index.d.ts` has the wrong path. Must fix properly before the next release. --- packages/ipfs/src/index.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/packages/ipfs/src/index.js b/packages/ipfs/src/index.js index 0891575466..486ee506cb 100644 --- a/packages/ipfs/src/index.js +++ b/packages/ipfs/src/index.js @@ -1,11 +1,5 @@ -/* eslint-disable jsdoc/valid-types */ 'use strict' -const IPFS = require('ipfs-core') - -/** - * @typedef { ReturnType extends Promise - * ? U : never } IPFS - */ +const IPFS = require('ipfs-core/src') module.exports = IPFS From e0101ed4f72d955247b9b12709c1464847a5252e Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Wed, 28 Oct 2020 11:55:42 +0000 Subject: [PATCH 2/2] chore: update packages/ipfs/src/index.js Add TODO Co-authored-by: Irakli Gozalishvili --- packages/ipfs/src/index.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/ipfs/src/index.js b/packages/ipfs/src/index.js index 486ee506cb..7ed2b742f8 100644 --- a/packages/ipfs/src/index.js +++ b/packages/ipfs/src/index.js @@ -1,5 +1,7 @@ 'use strict' +// TODO: Fix TS issue that prevents use of require('ipfs-core') instead +// https://github.com/ipfs/js-ipfs/issues/3358 const IPFS = require('ipfs-core/src') module.exports = IPFS