Skip to content

Commit 9a9ecec

Browse files
committed
add esModuleInterop for iife
1 parent b17a4c4 commit 9a9ecec

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "public-ipfs-gateway",
33
"description": "Get Public IPFS gateway url easily",
44
"author": "codev911",
5-
"version": "1.0.7",
5+
"version": "1.0.8",
66
"main": "./dist/index.js",
77
"browser": "./dist/iife/index.js",
88
"module": "./dist/esm/index.js",
@@ -26,7 +26,8 @@
2626
"ts-jest": "^29.1.2",
2727
"tslib": "^2.6.2",
2828
"tsup": "^8.0.1",
29-
"typescript": "^5.3.3"
29+
"typescript": "^5.3.3",
30+
"util": "^0.12.5"
3031
},
3132
"dependencies": {
3233
"axios": "^1.6.6"

tests/getlivegateway.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { getLiveGateway } from '../lib';
22

3-
test('get live gateway urls from ipfs url protocol', () => {
3+
test('get live gateway urls from ipfs url protocol', async () => {
44
const url =
55
'ipfs://bafybeiged4aroumss7u646yl5rzq5xawlvni7velqmwgau6jhxqcpgtf44/metamask-wallet.svg';
6-
const result = getLiveGateway(url);
7-
expect(result).not.toBe(url);
6+
const result = await getLiveGateway(url);
7+
console.log(result);
8+
await expect(await result).not.toBe(url);
89
});

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"moduleResolution": "Node",
88
"emitDecoratorMetadata": true,
99
"experimentalDecorators": true,
10+
"esModuleInterop": true,
1011
"importHelpers": true,
1112
"target": "ES2015",
1213
"module": "ESNext",

0 commit comments

Comments
 (0)