Skip to content

Commit 769e850

Browse files
committed
fix head from unit test
1 parent 9a9ecec commit 769e850

File tree

3 files changed

+5
-12
lines changed

3 files changed

+5
-12
lines changed

lib/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,7 @@ export const getLiveGateway = async (
4848
}
4949

5050
finalUrl.push(url);
51-
listLoop.push(
52-
axios({
53-
method: 'head',
54-
url: url,
55-
timeout: timeout !== undefined && timeout !== null ? timeout : 1500,
56-
})
57-
);
51+
listLoop.push(axios.head(url, { timeout: timeout || 5000 }));
5852
});
5953

6054
const result = await Promise.allSettled(listLoop);

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
"name": "public-ipfs-gateway",
33
"description": "Get Public IPFS gateway url easily",
44
"author": "codev911",
5-
"version": "1.0.8",
5+
"version": "1.0.9",
66
"main": "./dist/index.js",
7-
"browser": "./dist/iife/index.js",
8-
"module": "./dist/esm/index.js",
7+
"browser": "./dist/index.global.js",
8+
"module": "./dist/index.mjs",
99
"types": "./dist/index.d.ts",
1010
"files": [
1111
"dist"
@@ -17,6 +17,7 @@
1717
"test": "jest"
1818
},
1919
"devDependencies": {
20+
"@swc/core": "^1.3.105",
2021
"@types/jest": "^29.5.11",
2122
"@types/mocha": "^10.0.6",
2223
"@types/node": "^14",

tsup.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ export default defineConfig({
66
dts: true,
77
splitting: false,
88
sourcemap: true,
9-
minify: true,
109
minifyIdentifiers: true,
1110
clean: true,
12-
legacyOutput: true,
1311
});

0 commit comments

Comments
 (0)