Skip to content

Commit 67fa804

Browse files
committed
Cleanup wei
1 parent 7e17cb3 commit 67fa804

File tree

10 files changed

+34
-71
lines changed

10 files changed

+34
-71
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ coverage
33
generated
44
node_modules
55
.vscode
6-
webpack.config.js

packages/queries/src/mutations/useEVMTxn.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
import { useEffect, useState } from 'react';
22
import { UseMutationOptions, useMutation } from 'react-query';
33

4-
import Wei, { wei } from '@synthetixio/wei/build/node/wei';
4+
import Wei, { wei } from '@synthetixio/wei';
55
import { BigNumber } from '@ethersproject/bignumber';
66
import { TransactionRequest } from '@ethersproject/providers';
77
import { Contract } from '@ethersproject/contracts';
88
import { serialize, UnsignedTransaction } from '@ethersproject/transactions';
9-
109
import { QueryContext } from '../context';
1110
import clone from 'lodash/clone';
1211
import omit from 'lodash/omit';

packages/queries/src/queries/debt/useGetDebtDataQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useQuery, UseQueryOptions } from 'react-query';
22
import Wei from '@synthetixio/wei';
33

4-
import { wei } from '@synthetixio/wei/build/node/wei';
4+
import { wei } from '@synthetixio/wei';
55
import { QueryContext } from '../../context';
66

77
type WalletDebtData = {

packages/queries/src/queries/debt/useGetDebtTimeseries.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { useQuery, UseQueryOptions } from 'react-query';
22
import Wei from '@synthetixio/wei';
3-
import { wei } from '@synthetixio/wei/build/node/wei';
3+
import { wei } from '@synthetixio/wei';
44
import { QueryContext } from '../../context';
55
import { getDebtStates, getDebtSnapshots } from '../../../generated/mainSubgraphFunctions';
66
import { times, findIndex, sortBy } from 'lodash';
File renamed without changes.

packages/wei/package.json

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,19 @@
66
"version": "2.74.2",
77
"description": "Convenient BigNumber library for web3",
88
"source": "./src/index.ts",
9-
"main": "./build/node/index.js",
10-
"module": "./build/node/index.js",
11-
"browser": "./build/node/index.js",
12-
"types": "./build/node/index.d.ts",
9+
"main": "./build/index.js",
10+
"module": "./build/index.js",
11+
"browser": "./build/index.js",
12+
"types": "./build/index.d.ts",
1313
"files": [
1414
"build",
1515
"src"
1616
],
1717
"scripts": {
18-
"build": "yarn build-browser && yarn build-node",
19-
"build-node": "tsc -p tsconfig.node.json",
20-
"build-browser": "webpack-cli --mode=production",
21-
"examples:node": "ts-node --project tsconfig.node.json ./examples/node-example.js",
22-
"examples:browser": "yarn build-browser && http-server -o ./examples/browser-example.html -c-1",
23-
"lint": "eslint './src/**/*.{js,ts,tsx}' && tsc",
18+
"build": "tsc",
19+
"lint": "eslint './src/**/*.{js,ts,tsx}' && tsc --noEmit",
2420
"lint:fix": "eslint --fix './src/**/*.{js,ts,tsx}'",
2521
"test": "jest --coverage --no-cache",
26-
"tsc": "tsc --noemit",
2722
"codegen": "graphql-codegen --config codegen.yml"
2823
},
2924
"repository": {
@@ -47,13 +42,31 @@
4742
"@babel/preset-env": "^7.13.10",
4843
"@babel/preset-typescript": "^7.13.0",
4944
"@types/big.js": "^6.0.2",
50-
"@types/node": "^17.0.43",
5145
"eslint": "^7.26.0",
5246
"jest": "^27.0.6",
53-
"ts-loader": "^8.0.2",
54-
"ts-node": "^10.2.1",
55-
"typescript": "^4.4.2",
56-
"webpack": "^4.44.1",
57-
"webpack-cli": "^3.3.12"
47+
"typescript": "^4.4.2"
48+
},
49+
"browserslist": [
50+
"last 1 Chrome version",
51+
"last 1 Firefox version",
52+
"last 1 Edge version",
53+
"last 1 Opera version"
54+
],
55+
"jest": {
56+
"testMatch": [
57+
"<rootDir>/**/*.test.{js,jsx,ts,tsx}"
58+
],
59+
"collectCoverageFrom": [
60+
"<rootDir>/src/**/*.{js,jsx,ts,tsx}",
61+
"!<rootDir>/src/**/*.d.{js,jsx,ts,tsx}"
62+
],
63+
"coverageThreshold": {
64+
"global": {
65+
"branches": 0,
66+
"functions": 0,
67+
"lines": 0,
68+
"statements": 0
69+
}
70+
}
5871
}
5972
}

packages/wei/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"declaration": true,
55
"declarationMap": true,
66
"module": "commonjs",
7-
"declarationDir": "./build"
7+
"outDir": "./build"
88
},
99
"include": ["src"]
1010
}

packages/wei/tsconfig.node.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

packages/wei/webpack.config.js

Lines changed: 0 additions & 33 deletions
This file was deleted.

yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2428,15 +2428,10 @@ __metadata:
24282428
"@ethersproject/bignumber": ^5.6.2
24292429
"@ethersproject/bytes": ^5.6.1
24302430
"@types/big.js": ^6.0.2
2431-
"@types/node": ^17.0.43
24322431
big.js: ^6.1.1
24332432
eslint: ^7.26.0
24342433
jest: ^27.0.6
2435-
ts-loader: ^8.0.2
2436-
ts-node: ^10.2.1
24372434
typescript: ^4.4.2
2438-
webpack: ^4.44.1
2439-
webpack-cli: ^3.3.12
24402435
languageName: unknown
24412436
linkType: soft
24422437

0 commit comments

Comments
 (0)