Skip to content
This repository has been archived by the owner on Feb 21, 2024. It is now read-only.

Moving to TypeScript #322

Merged
merged 50 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
39c45ae
Start moving everything to TypeScript
SurfingNerd Feb 27, 2020
f326ae6
Move all purser-core tests to TypeScript
chmanie Apr 16, 2020
75f617a
Upgrade prettier and eslint packages
chmanie Apr 23, 2020
ffd6884
Move defaults to purser-core/constants
chmanie Apr 23, 2020
bd1fb8f
Migrate accountChangeHook tests
chmanie Apr 23, 2020
1011b3e
Migrate MetaMaskWallet tests
chmanie Apr 23, 2020
3f27556
Migrate MetaMask detect and open tests
chmanie Apr 23, 2020
ade0438
Migrate MetaMask helper tests to TS
chmanie Apr 27, 2020
5a5a7f9
Migrate MetaMask signMessage tests to TS
chmanie Apr 27, 2020
c95e4cc
Migrate MetaMask signTransaction tests to TS
chmanie Apr 27, 2020
3d38cca
Migrate MetaMask verifyMessage helper to TS
chmanie Apr 27, 2020
9faea9c
Migrate MetaMask validator tests to TS
chmanie Apr 27, 2020
2c95ec9
Add lerna and config
chmanie Apr 28, 2020
4960b12
Fix eslint errors in purser-core
chmanie Apr 28, 2020
bcb7deb
Add signer-ethers package
chmanie Apr 29, 2020
d92a54d
Remove eslint from dependencies
chmanie Apr 30, 2020
eaf2eb6
Add package-lock
chmanie Apr 30, 2020
ed0c120
Fix purser-metamask main class tests
chmanie Apr 30, 2020
d262135
Fix all eslint issues in purser-metamask
chmanie Apr 30, 2020
82c1741
Fix all eslint issues in purser-core
chmanie Apr 30, 2020
104d913
Cut old strings
chmanie Apr 30, 2020
9613354
Get SoftwareWallet main class tests to pass
chmanie Apr 30, 2020
44cd4c7
Use `mocked` helper from ts-jest instead of own
chmanie May 5, 2020
0b8411d
Migrate software-wallet `create` tests
chmanie May 5, 2020
a704d7f
Migrate software-wallet `open` tests
chmanie May 5, 2020
cdac690
Migrate software-wallet `staticMethods` tests
chmanie May 5, 2020
43f185e
Make GenericWallet an abstract class
chmanie May 5, 2020
2856a80
Refactor purser-software class
chmanie May 6, 2020
49f5ea9
Use PurserWallet as type in EthersSigner
chmanie May 6, 2020
94d72cd
Introduce build system for all the modules
chmanie May 6, 2020
83c5897
Publish
chmanie May 6, 2020
ca2af4f
Adjust workflow
chmanie May 6, 2020
19a6757
Add eslint-plugin-jest (because it is needed)
chmanie May 6, 2020
b1330ff
Use node 12.16.3
chmanie May 6, 2020
a3a8c12
Expose some helpful types to the outside world
chmanie May 7, 2020
cfda0df
Publish
chmanie May 7, 2020
4109028
Make @purser/core a peerDependency
chmanie May 11, 2020
6998813
Properly type addressNormalizer
chmanie May 11, 2020
c0543bd
Fix transactionObjectValidator
chmanie May 25, 2020
aa98c26
Fix EthersSigner
chmanie May 25, 2020
79e6e28
Fix mocked signer sendTransaction return value
chmanie May 25, 2020
594782d
Publish
chmanie Jun 9, 2020
7374d69
Refactor metamask plugin to remove web3 dependency
chmanie Jun 23, 2020
5134278
Publish
chmanie Jun 23, 2020
668f5ac
Remove all MetaMask private API (publicConfigStore)
chmanie Jul 15, 2020
42c232a
Remove docs from repo
chmanie Aug 13, 2020
c6650f1
Move packages to namespace subfolder
chmanie Aug 13, 2020
c4ff81c
Add first version of auto-generated docs
chmanie Aug 13, 2020
fb68d49
Add workflow to build docs
chmanie Aug 13, 2020
21c47a2
Fix tsconfig.build paths
chmanie Aug 13, 2020
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
8 changes: 0 additions & 8 deletions .eslintignore

This file was deleted.

58 changes: 40 additions & 18 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,29 +1,51 @@
{
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:@typescript-eslint/recommended",
"@colony/eslint-config-colony",
"prettier/flowtype"
"prettier/@typescript-eslint"
],
"plugins": [
"flowtype",
"prettier"
"@typescript-eslint",
"jest",
],
"parser": "babel-eslint",
"env": {
"browser": true,
"commonjs": true,
"es6": true
"es2020": true,
"node": true,
"browser": true
},
ignorePatterns: [
"*.d.ts"
],
"rules": {
"array-bracket-newline": ["warn", "consistent"],
"no-console": ["warn", { "allow": ["warn", "error"]}],
"no-irregular-whitespace": ["error", { "skipRegExps": true }],
"no-unused-vars": "off",
"camelcase": "off",
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
"eslint-comments/disable-enable-pair": ["error", {"allowWholeFile": true}],
"flowtype/define-flow-type": "warn",
"import/no-extraneous-dependencies": "off",
"prettier/prettier": ["error", {
"parser": "flow",
"singleQuote": true,
"trailingComma": "all"
}]
}
"import/extensions": "off",
"import/no-unresolved": "off",
"import/prefer-default-export": "off",
"import/no-extraneous-dependencies": ["error", {"devDependencies": ["**/*.test.ts"]}]
},
"overrides": [
{
"files": [
"**/__tests__/**/*.ts",
"**/__mocks__/**/*.ts"
],
"env": {
"jest": true
},
"plugins": ["jest"],
"extends": [
"plugin:jest/recommended",
"plugin:jest/style"
],
"rules": {
"max-len": "off",
"@typescript-eslint/ban-ts-ignore": "off"
}
}
]
}
13 changes: 5 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [10.19]
node-version: [12.16.3]

steps:
- uses: actions/checkout@v2
Expand All @@ -38,14 +38,11 @@ jobs:
- name: Install Dependencies
run: npm install

- name: Check Types
run: npm run flow
- name: Bootstrap Monorepo
run: npm run bootstrap

- name: Lint Code
run: npm run lint

- name: Test
run: npm run test:ci
- name: Run tests
run: npm test

- name: Build
run: npm run build
34 changes: 34 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Build docs and deploy

on:
push:
branches: [ master ]

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2 # If you're using actions/checkout@v2 you must set persist-credentials to false in most cases for the deployment to work correctly.
with:
persist-credentials: false

- name: Install SSH Client 🔑
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.DEPLOY_KEY }}

- name: Install and Build 🔧
run: |
npm install
npm run build-docs

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
SSH: true
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs # The folder the action should deploy.
11 changes: 9 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
logs
*.log
npm-debug.log*
lerna-debug.log

# Runtime data
pids
Expand Down Expand Up @@ -56,9 +57,8 @@ typings/
.env

# Build folder
dist
lib
es
lib-esm

# CI JUnit Reporst
reports
Expand All @@ -68,3 +68,10 @@ reports
*.patch
.diff/
.patch/

# IDEA IDE
.idea

temp
docs
keys
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.19
12.16.3
16 changes: 1 addition & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
<div align="center">
<img src="/docs/img/purser_color.svg" width="600" />
</div>
<div align="center">
<a href="https://circleci.com/gh/JoinColony/purser">
<img src="https://circleci.com/gh/JoinColony/purser.svg?style=shield" />
</a>
<a href="https://greenkeeper.io/">
<img src="https://badges.greenkeeper.io/JoinColony/purser.svg" />
</a>
<a href="https://gitter.im/JoinColony/purser">
<img src="https://img.shields.io/gitter/room/TechnologyAdvice/Stardust.svg" />
</a>
<a href="https://build.colony.io/">
<img src="https://img.shields.io/discourse/https/build.colony.io/status.svg" />
</a>
<img src="media/purser_color.svg" width="600" />
</div>

## Purser
Expand Down
64 changes: 0 additions & 64 deletions babel.config.js

This file was deleted.

36 changes: 0 additions & 36 deletions docs/_Docs_Contribute.md

This file was deleted.

Loading