Skip to content

Commit

Permalink
refactor: monorepo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zone117x committed May 11, 2021
1 parent 3528b65 commit 953c820
Show file tree
Hide file tree
Showing 156 changed files with 75,039 additions and 191,593 deletions.
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ webpack.config.js
typedoc.js
**/*.d.ts
docs-theme/
node_modules
node_modules
**/tests/**
30 changes: 27 additions & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
reportUnusedDisableDirectives: true,
extends: ['@blockstack/eslint-config'],
extends: '@stacks/eslint-config',
plugins: ['@typescript-eslint', 'node'],
parserOptions: {
tsconfigRootDir: __dirname,
project: ['./packages/**/tsconfig.json', './tsconfig.json']
}
project: ['./packages/**/tsconfig.json', './tsconfig.json'],
},
settings: {
node: {
tryExtensions: ['.ts'],
},
},
rules: {
'@typescript-eslint/explicit-module-boundary-types': [0],
'@typescript-eslint/prefer-regexp-exec': [0],
'@typescript-eslint/ban-ts-comment': [0],
'@typescript-eslint/restrict-template-expressions': [0],
'@typescript-eslint/no-inferrable-types': [0],
'@typescript-eslint/no-unnecessary-type-assertion': [0],

// TODO: enable the `no-unsafe-*` rules
'@typescript-eslint/no-unsafe-assignment': [0],
'@typescript-eslint/no-unsafe-call': [0],
'@typescript-eslint/no-unsafe-return': [0],
'@typescript-eslint/no-unsafe-member-access': [0],
'@typescript-eslint/no-non-null-assertion': [0],

'node/prefer-global/buffer': ['error', 'never'],
},
};
40 changes: 0 additions & 40 deletions .github/workflows/pull_request.yml

This file was deleted.

20 changes: 11 additions & 9 deletions .github/workflows/push.yml → .github/workflows/stacks-js.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: Main commit checks
name: stacks.js

on:
push:
branches:
- 'master'
pull_request:

jobs:
code_checks:
Expand All @@ -24,19 +26,19 @@ jobs:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}

- name: Install yarn dependencies
run: yarn --frozen-lockfile --ignore-scripts
- name: Install dependencies
run: npm i
- name: Bootstrap
run: yarn lerna bootstrap
run: npm run bootstrap
- name: Lint
run: yarn lint:prettier
run: npm run lint
- name: Typecheck
run: yarn typecheck
run: npm run typecheck
- name: Build
run: yarn build
run: npm run build
- name: Tests
run: yarn lerna run test --stream --parallel -- -- --coverage
run: npm run lerna run test --stream --parallel -- -- --coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ dist
.rts2_cache_umd/
.idea

*.tsbuildinfo
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.d.ts
*.html
**/tests/**
139 changes: 124 additions & 15 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,126 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Tests",
"runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"],
"args": ["${workspaceFolder}/tests/unitTests/src/index.ts"],
"env": { "TS_NODE_PROJECT": "${workspaceFolder}/tests/unitTests/src/tsconfig.json" },
"console": "integratedTerminal"
}
]
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "launch",
"name": "Jest: auth",
"cwd": "${workspaceFolder}/packages/auth",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: bns",
"cwd": "${workspaceFolder}/packages/bns",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: cli",
"cwd": "${workspaceFolder}/packages/cli",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: common",
"cwd": "${workspaceFolder}/packages/common",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: encryption",
"cwd": "${workspaceFolder}/packages/encryption",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: keychain",
"cwd": "${workspaceFolder}/packages/keychain",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: network",
"cwd": "${workspaceFolder}/packages/network",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: profile",
"cwd": "${workspaceFolder}/packages/profile",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: stacking",
"cwd": "${workspaceFolder}/packages/stacking",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: storage",
"cwd": "${workspaceFolder}/packages/storage",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
{
"type": "node",
"request": "launch",
"name": "Jest: transactions",
"cwd": "${workspaceFolder}/packages/transactions",
"program": "./node_modules/.bin/jest",
"args": [
"--runInBand"
],
"console": "integratedTerminal"
},
]
}
29 changes: 0 additions & 29 deletions babel.config.js

This file was deleted.

2 changes: 0 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
"publishConfig": {
"access": "public"
},
"npmClient": "yarn",
"useWorkspaces": true,
"packages": [
"packages/*"
]
Expand Down
Loading

0 comments on commit 953c820

Please sign in to comment.