Skip to content

Commit

Permalink
- Add testing framework
Browse files Browse the repository at this point in the history
- Update husky + lint-staged
- Update deps
  • Loading branch information
chaitanyapotti committed May 14, 2021
1 parent dd3003f commit 3717045
Show file tree
Hide file tree
Showing 29 changed files with 4,289 additions and 401 deletions.
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
62 changes: 28 additions & 34 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,71 +9,65 @@
"build": "lerna run build",
"dev": "lerna run dev",
"test": "lerna run test --parallel",
"test-development": "lerna run test-development --parallel",
"test-production": "lerna run test-production --parallel",
"test-debugger": "lerna run test-debugger --parallel",
"build:types": "lerna run build:types",
"lint": "lerna run lint --parallel",
"pack:lerna": "lerna exec -- yarn pack",
"pre-commit": "lerna run pre-commit"
"pre-commit": "lerna run pre-commit",
"prepare": "husky install"
},
"devDependencies": {
"@babel/cli": "^7.13.0",
"@babel/core": "^7.13.8",
"@babel/cli": "^7.13.16",
"@babel/core": "^7.14.0",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-object-rest-spread": "^7.13.8",
"@babel/plugin-syntax-bigint": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.13.9",
"@babel/preset-env": "^7.13.9",
"@babel/plugin-transform-runtime": "^7.13.15",
"@babel/preset-env": "^7.14.1",
"@babel/preset-typescript": "^7.13.0",
"@babel/register": "^7.13.8",
"@babel/runtime-corejs3": "^7.13.9",
"@octokit/core": "^3.2.5",
"@babel/register": "^7.13.16",
"@babel/runtime-corejs3": "^7.14.0",
"@types/bn.js": "^5.1.0",
"@types/mocha": "^8.2.1",
"@types/node": "^14.14.32",
"@typescript-eslint/eslint-plugin": "^4.16.1",
"@typescript-eslint/parser": "^4.16.1",
"atob": "^2.1.2",
"@types/mocha": "^8.2.2",
"@types/node": "^15.0.2",
"@typescript-eslint/eslint-plugin": "^4.23.0",
"@typescript-eslint/parser": "^4.23.0",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.2.2",
"btoa": "^1.2.1",
"cross-env": "^7.0.3",
"eslint": "^7.21.0",
"eslint": "^7.26.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-config-prettier": "^8.1.0",
"eslint-config-prettier": "^8.3.0",
"eslint-config-standard": "^16.0.2",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-mocha": "^8.1.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-promise": "^4.3.1",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"eslint-webpack-plugin": "^2.5.2",
"husky": "^4.3.8",
"jsdom": "^16.5.0",
"eslint-webpack-plugin": "^2.5.4",
"husky": "^6.0.0",
"jsdom": "^16.5.3",
"jsdom-global": "^3.0.2",
"lerna": "^4.0.0",
"lint-staged": "^10.5.4",
"mocha": "^8.3.1",
"lint-staged": "^11.0.0",
"mocha": "^8.4.0",
"node-fetch": "^2.6.1",
"parallel-webpack": "^2.6.0",
"prettier": "^2.2.1",
"prettier": "^2.3.0",
"rimraf": "^3.0.2",
"ts-node": "^9.1.1",
"tsconfig-paths": "^3.9.0",
"tsconfig-paths-webpack-plugin": "^3.3.0",
"typescript": "^4.2.3",
"tsconfig-paths-webpack-plugin": "^3.5.1",
"typescript": "^4.2.4",
"webpack": "^4.44.2",
"webpack-cli": "^3.3.12"
},
"author": "Torus Labs",
"license": "MIT",
"husky": {
"hooks": {
"pre-commit": "lerna run pre-commit --concurrency 1 --since HEAD"
}
},
"dependencies": {}
"dependencies": {},
"lint-staged": {
"*": "lerna run --concurrency 1 --stream --since HEAD --exclude-dependents pre-commit -- "
}
}
13 changes: 6 additions & 7 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@
"types": "types/index.d.ts",
"author": "Torus Labs",
"scripts": {
"test": "cross-env MOCKED=true mocha --config ../../.mocharc.json ",
"test-development": "cross-env MOCKED=false METADATA=http://localhost:5051 mocha --config ../../.mocharc.json ",
"test-production": "cross-env MOCKED=false METADATA=https://metadata.tor.us mocha --config ../../.mocharc.json ",
"test-debugger": "mocha --config ../../.mocharc.json --inspect-brk",
"test": "mocha --config ../../.mocharc.json test/**.ts",
"test-debugger": "mocha --config ../../.mocharc.json --inspect-brk test/**.ts",
"dev": "rimraf dist/ && cross-env NODE_ENV=development parallel-webpack --no-stats",
"build": "rimraf dist/ && cross-env NODE_ENV=production parallel-webpack --no-stats",
"build:types": "rimraf types/ && tsc --project tsconfig.types.json",
Expand All @@ -30,7 +28,8 @@
"devDependencies": {
"@types/lodash.merge": "^4.6.6",
"@types/node": "^14.14.25",
"@types/pump": "^1.1.1"
"@types/pump": "^1.1.1",
"lint-staged": "^11.0.0"
},
"peerDependencies": {
"@babel/runtime": "7.x"
Expand All @@ -41,8 +40,8 @@
],
"lint-staged": {
"!(*d).ts": [
"yarn run lint --",
"prettier --write 'src/**/*.ts' 'index.ts'"
"eslint --cache --fix",
"prettier --write"
]
},
"repository": {
Expand Down
Empty file added packages/core/test/test.ts
Empty file.
3 changes: 2 additions & 1 deletion packages/core/tsconfig.types.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@
"emitDeclarationOnly": true,
"declarationDir": "types",
"paths": {}
}
},
"exclude": ["test"]
}
Loading

0 comments on commit 3717045

Please sign in to comment.