Skip to content

Commit

Permalink
chore: prune
Browse files Browse the repository at this point in the history
  • Loading branch information
penovicp committed Aug 2, 2024
1 parent a00e86e commit 8455fbe
Show file tree
Hide file tree
Showing 5 changed files with 106 additions and 147 deletions.
90 changes: 27 additions & 63 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,15 @@
"typescript-coverage-report": "npm:@penovicp/typescript-coverage-report@^1.0.0-beta.2"
},
"dependencies": {
"@noble/curves": "~1.4.0",
"@noble/hashes": "^1.4.0",
"@noble/curves": "~1.3.0",
"@noble/hashes": "~1.3.0",
"@scure/base": "~1.1.3",
"@scure/starknet": "~1.0.0",
"abi-wan-kanabi": "^2.2.2",
"fetch-cookie": "^3.0.0",
"isomorphic-fetch": "^3.0.0",
"lossless-json": "^4.0.1",
"pako": "^2.0.4",
"starknet-types-07": "npm:@starknet-io/types-js@^0.7.7",
"ts-mixer": "^6.0.3",
"url-join": "^4.0.1"
"ts-mixer": "^6.0.3"
},
"lint-staged": {
"*.ts": "eslint --cache --fix",
Expand Down
1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ export * from './utils/responseParser';
export * from './utils/cairoDataTypes/uint256';
export * from './utils/cairoDataTypes/uint512';
export * from './utils/address';
export * from './utils/url';
export * from './utils/calldata';
export * from './utils/calldata/enum';
export * from './utils/contract';
Expand Down
15 changes: 7 additions & 8 deletions src/utils/fetchPonyfill.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// the ts-ignore suppresses an esm to cjs import error that is resolved with entry point resolution
// @ts-ignore
import makeFetchCookie from 'fetch-cookie';
import isomorphicFetch from 'isomorphic-fetch';

export default (typeof window !== 'undefined' && window.fetch) || // use buildin fetch in browser if available
(typeof global !== 'undefined' && makeFetchCookie(global.fetch)) || // use buildin fetch in node, react-native and service worker if available
isomorphicFetch; // ponyfill fetch in node and browsers that don't have it
export default (typeof window !== 'undefined' && window.fetch) ||
// use built-in fetch in node, react-native and service worker if available
(typeof global !== 'undefined' && global.fetch) ||
// throw with instructions when no fetch is detected
((() => {
throw new Error("'fetch()' not detected, use the 'baseFetch' constructor parameter to set it");
}) as WindowOrWorkerGlobalScope['fetch']);
Loading

0 comments on commit 8455fbe

Please sign in to comment.