Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: split tsconfig to reduce package size #85

Merged
merged 3 commits into from
Mar 29, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ All notable changes to this project will be documented in this file. See [standa

### [2.5.25](https://github.com/Uniswap/smart-order-router/compare/v2.5.24...v2.5.25) (2022-03-29)


### Bug Fixes

* retain ethers as dep for factories ([#84](https://github.com/Uniswap/smart-order-router/issues/84)) ([a24b0b2](https://github.com/Uniswap/smart-order-router/commit/a24b0b2d6116fef9a7796cb5e090e8d0f2c956b0))
- retain ethers as dep for factories ([#84](https://github.com/Uniswap/smart-order-router/issues/84)) ([a24b0b2](https://github.com/Uniswap/smart-order-router/commit/a24b0b2d6116fef9a7796cb5e090e8d0f2c956b0))

### [2.5.24](https://github.com/Uniswap/smart-order-router/compare/v2.5.23...v2.5.24) (2022-03-28)

Expand Down
14 changes: 5 additions & 9 deletions bin/cli
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#!/usr/bin/env node

const fs = require("fs");
const path = require("path");
const project = path.join(__dirname, "../tsconfig.json");
const dev = fs.existsSync(project);
const project = path.join(__dirname, "../tsconfig.oclif.json");

if (dev) {
require("ts-node").register({
project,
compilerOptions: { preserveSymlinks: true },
});
}
require("ts-node").register({
project,
compilerOptions: { preserveSymlinks: true },
});

require('@oclif/command').run()
.catch(require('@oclif/errors/handle'))
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@
"typescript": "^4.2.2"
},
"files": [
"build/main",
"build/module",
"build/main/src",
"build/module/src",
"!**/*.spec.*",
"!**/*.json",
"CHANGELOG.md",
Expand Down
2 changes: 1 addition & 1 deletion src/providers/swap-router-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApprovalTypes } from '@uniswap/router-sdk';
import { Currency, CurrencyAmount } from '@uniswap/sdk-core';
import { SwapRouter02__factory } from '../types/other';
import { SwapRouter02__factory } from '../types/other/factories/SwapRouter02__factory';
import { log } from '../util';
import { IMulticallProvider } from './multicall-provider';

Expand Down
2 changes: 1 addition & 1 deletion src/providers/token-provider.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Token } from '@uniswap/sdk-core';
import _ from 'lodash';
import { IERC20Metadata__factory } from '../types/v3';
import { IERC20Metadata__factory } from '../types/v3/factories/IERC20Metadata__factory';
import { ChainId, log } from '../util';
import { IMulticallProvider } from './multicall-provider';
import { ProviderConfig } from './provider';
Expand Down
2 changes: 1 addition & 1 deletion src/providers/v2/pool-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Token } from '@uniswap/sdk-core';
import { Pair } from '@uniswap/v2-sdk';
import retry, { Options as RetryOptions } from 'async-retry';
import _ from 'lodash';
import { IUniswapV2Pair__factory } from '../../types/v2';
import { IUniswapV2Pair__factory } from '../../types/v2/factories/IUniswapV2Pair__factory';
import { ChainId, CurrencyAmount } from '../../util';
import { log } from '../../util/log';
import { poolToString } from '../../util/routes';
Expand Down
2 changes: 1 addition & 1 deletion src/providers/v3/pool-provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Token } from '@uniswap/sdk-core';
import { computePoolAddress, FeeAmount, Pool } from '@uniswap/v3-sdk';
import retry, { Options as RetryOptions } from 'async-retry';
import _ from 'lodash';
import { IUniswapV3PoolState__factory } from '../../types/v3';
import { IUniswapV3PoolState__factory } from '../../types/v3/factories/IUniswapV3PoolState__factory';
import { ChainId } from '../../util';
import { V3_CORE_FACTORY_ADDRESS } from '../../util/addresses';
import { log } from '../../util/log';
Expand Down
6 changes: 2 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
// "emitDecoratorMetadata": true /* Enables experimental support for emitting type metadata for decorators. */,

"lib": ["es2017", "dom"],
"types": ["node", "jest"],
"typeRoots": ["node_modules/@types", "src/types"]
"types": ["node", "jest"]
},
"include": ["src/**/*.ts", "cli/**/*.ts"],
"exclude": ["node_modules/**"],
"include": ["src/index.ts"],
"compileOnSave": false
}
3 changes: 1 addition & 2 deletions tsconfig.module.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@
"target": "es2018",
"outDir": "build/module",
"module": "esnext"
},
"exclude": ["node_modules/**"]
}
}
4 changes: 4 additions & 0 deletions tsconfig.oclif.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig",
"include": ["cli/**/*.ts"]
}