-
Notifications
You must be signed in to change notification settings - Fork 179
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
refactor: set up monorepo #554
base: main
Are you sure you want to change the base?
Changes from 23 commits
72ebc46
7523c4a
80db7a8
a96be4c
072e54c
8cfe6fc
349365c
f02b23d
006dd92
b362bb9
4b9749c
9d48d62
4723065
f92e150
1174942
9edac93
9030353
c58abd3
85ec17d
1db4f38
5dc312e
6205d10
121cd2d
88b994a
c80b628
4d06422
36bda6a
5c4e9c6
b2581fc
e602f8f
aa230c2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
module.exports = { | ||
root: true, | ||
env: { | ||
commonjs: true, | ||
es6: true, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"root": false, | ||
"extends": ["../../.eslintrc.js"], | ||
"parserOptions": { | ||
"files": ["src/**/*.ts", "src/**/*.js"] | ||
}, | ||
"ignorePatterns": ["dist/**/*", "node_modules/**/*"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
const baseConfig = require('../../.prettierrc.js') | ||
|
||
module.exports = { | ||
...baseConfig, | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "@arbitrum/sdk", | ||
"version": "4.0.2", | ||
"description": "Typescript library client-side interactions with Arbitrum", | ||
"author": "Offchain Labs, Inc.", | ||
"license": "Apache-2.0", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/offchainlabs/arbitrum-sdk.git" | ||
}, | ||
"engines": { | ||
"node": ">=v11", | ||
"npm": "please-use-yarn", | ||
"yarn": ">= 1.0.0" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/offchainlabs/arbitrum-sdk/issues" | ||
}, | ||
"homepage": "https://offchainlabs.com", | ||
"scripts": { | ||
"audit:ci": "audit-ci --config ./audit-ci.jsonc", | ||
"prepare": "yarn run gen:abi", | ||
"gen:abi": "node ./scripts/genAbi.js", | ||
"gen:network": "ts-node ./scripts/genNetwork.ts", | ||
"prepublishOnly": "yarn build && yarn format", | ||
"preversion": "yarn lint", | ||
"prebuild": "yarn gen:abi", | ||
"build": "./scripts/builder", | ||
"watch": "tsc --watch", | ||
"test": "mocha", | ||
"test:coverage": "nyc mocha", | ||
"test:fork": "SHOULD_FORK=1 hardhat test tests/fork/*.test.ts", | ||
"test:integration": "mocha tests/integration/ --timeout 30000000 --bail", | ||
"test:unit": "mocha --parallel tests/unit/ --timeout 30000 --bail", | ||
"test:ci": "nyc --reporter=lcovonly mocha --reporter xunit", | ||
"lint": "eslint .", | ||
"format": "prettier './**/*.{js,json,md,ts,yml}' '!./src/lib/abi' --write && yarn run lint --fix", | ||
"clean:compile": "ts-node scripts/cleanCompileContracts.ts", | ||
"checkRetryable": "ts-node scripts/checkRetryableStatus.ts", | ||
"redeemRetryable": "ts-node scripts/redeemRetryable.ts", | ||
"setStandard": "ts-node scripts/setStandardGateways.ts", | ||
"setCustom": "ts-node scripts/setArbCustomGateways.ts", | ||
"cancelRetryable": "ts-node scripts/cancelRetryable.ts", | ||
"bridgeStandardToken": "ts-node scripts/deployStandard.ts" | ||
}, | ||
"dependencies": { | ||
"@ethersproject/address": "^5.0.8", | ||
"@ethersproject/bignumber": "^5.1.1", | ||
"@ethersproject/bytes": "^5.0.8", | ||
"async-mutex": "^0.4.0", | ||
"ethers": "^5.1.0" | ||
}, | ||
"files": [ | ||
"dist/**/*" | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import * as dotenv from 'dotenv' | ||
import * as path from 'path' | ||
|
||
export const loadEnv = () => { | ||
dotenv.config({ path: path.resolve(__dirname, '../../../../../.env') }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. will this work properly both in the case when you're running commands at the root level of the monorepo, and when you cd into the package and run it there? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it does work from both locations. |
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"outDir": "./dist" | ||
}, | ||
"include": ["src/**/*.ts", "src/**/*.d.ts"], | ||
"exclude": ["node_modules", "dist", "tests", "scripts"] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. | ||
# yarn lockfile v1 | ||
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm how did this end up here? can you revert it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was using this to break the cache. fixed 88b994a |
||
"@aduh95/viz.js@^3.7.0": | ||
version "3.7.0" | ||
resolved "https://registry.yarnpkg.com/@aduh95/viz.js/-/viz.js-3.7.0.tgz#a20d86c5fc8f6abebdc39b96a4326e10375d77c0" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we move resolutions for runtime dependencies to the package's package.json?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking it would be nice to have them shared among packages, but I guess it's probably better to just deal with issues individually if they come up. so i moved the resolutions down to the
sdk
package 88b994aThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh actually, those are all there for audit-ci fixing purposes, so we want them there c80b628