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

Migrate to a monorepo #297

Merged
merged 22 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
3120df4
fix after rebase
piotr-roslaniec Sep 4, 2023
06f95ad
refactor(monorepo): create a monorepo structure
piotr-roslaniec Sep 7, 2023
7e35d60
refactor(monorepo): configure repo utils
piotr-roslaniec Sep 11, 2023
908fef9
refactor(monorepo): create pre package
piotr-roslaniec Sep 12, 2023
b7a4b79
chore(testing): replaced jest with vitest
piotr-roslaniec Sep 12, 2023
3fd578a
chore(prettier): sort imports & exports
piotr-roslaniec Sep 12, 2023
4e0d7b7
chore: clean up package.json files
piotr-roslaniec Sep 12, 2023
4570103
fix(test): fix missing vitest import
piotr-roslaniec Sep 12, 2023
0a10061
chore(examples): fix example checks
piotr-roslaniec Sep 13, 2023
01652a2
refactor(monorepo): move shared test utils package/test-utils
piotr-roslaniec Sep 13, 2023
f9cdf31
refactor(monorepo): remove stray files
piotr-roslaniec Sep 13, 2023
f2b5747
fix(test): fix missing export
piotr-roslaniec Sep 13, 2023
7fe20ed
chore(build): fix build command not emitting a build
piotr-roslaniec Sep 13, 2023
51249e8
chore(linter): fix issues from ci:lint
piotr-roslaniec Sep 13, 2023
d9f28b1
chore(examples): fix missing ethers deps
piotr-roslaniec Sep 13, 2023
68cfa1a
chore(deps): setup peer dependencies
piotr-roslaniec Sep 14, 2023
f9e5038
chore(docs): upadate md files
piotr-roslaniec Sep 14, 2023
8804dc8
chore(docs): update typedoc config
piotr-roslaniec Sep 14, 2023
04a5d2e
chore(examples): update examples
piotr-roslaniec Sep 14, 2023
a0f1379
chore(deps): update dependencies & fix security warnings
piotr-roslaniec Sep 14, 2023
4c9dd00
apply pr suggestions
piotr-roslaniec Sep 15, 2023
142eb98
apply pr suggestions
piotr-roslaniec Sep 26, 2023
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
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this file supposed to be in the repo or maybe should it be ignored?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's supposed to be in repo: https://editorconfig.org/


[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.md
55 changes: 55 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/** @type {import('eslint').Linter.Config} */
module.exports = {
'root': true,
'parser': '@typescript-eslint/parser',
'env': {
'es6': true,
},
'ignorePatterns': [
'node_modules',
'build',
'coverage',
'src/contracts/ethers-typechain',
],
'plugins': [
'import',
'eslint-comments',
],
'extends': [
'eslint:recommended',
'plugin:eslint-comments/recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/typescript',
'prettier',
],
'globals': {
'BigInt': true,
'console': true,
'WebAssembly': true,
},
'rules': {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'eslint-comments/disable-enable-pair': [
'error',
{
'allowWholeFile': true,
},
],
'import/order': [
'error',
{
'newlines-between': 'always',
'alphabetize': {
'order': 'asc',
},
},
],
'sort-imports': [
'error',
{
'ignoreDeclarationSort': true,
'ignoreCase': true,
},
],
},
};
53 changes: 0 additions & 53 deletions .eslintrc.json

This file was deleted.

67 changes: 19 additions & 48 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,65 +11,36 @@ jobs:
os: [ ubuntu-latest ]

steps:
- name: Checkout repo
uses: actions/checkout@v2
- uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
- uses: pnpm/action-setup@v2
with:
node-version: ${{ matrix.node }}
version: 8.1

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
- uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'

- name: Check
run: yarn run package-check
- run: pnpm install

- name: Build
run: yarn build
run: pnpm build

- name: Lint
run: pnpm ci:lint

- name: Test
run: yarn test
run: pnpm test

- name: Check examples
run: pnpm check-examples

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true

- name: BundleMon
uses: lironer/bundlemon-action@v1

build_examples:
name: Build project examples

runs-on: ${{ matrix.os }}
strategy:
matrix:
node: [ '16.x' ]
os: [ ubuntu-latest ]
example:
[
'nodejs',
'react-craco',
'react-webpack-5-experiments',
'webpack-5-experiments',
'webpack-bundler',
]

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}

- name: Install deps and build (with cache)
uses: bahmutov/npm-install@v1
with:
working-directory: examples/${{ matrix.example }}

- name: Build
run: CI=false yarn build
working-directory: examples/${{ matrix.example }}
# TODO: Fix or replace bundlemon on CI
# - name: Analyze bundle size
# uses: lironer/bundlemon-action@v1
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
*.log
.DS_Store
node_modules
build
dist
*.log
*.tsbuildinfo
.DS_Store
coverage
example/dist
.husky
.env
types
dist
.nvmrc
!examples/**/.env
src/contracts/ethers-typechain
contracts/compiled
examples/*/pnpm-lock.yaml
pnpm-debug.log
docs-json
docs
1 change: 0 additions & 1 deletion .husky/.gitignore

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16
11 changes: 7 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# package.json is formatted by package managers, so we ignore it here
package.json
coverage
build
types/ethers-contracts
**/dist/**
**/types/**
**/build/**
CHANGELOG.md
**/*.sol
README.md
/packages/shared/src/contracts/ethers-typechain/
9 changes: 9 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 80,
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"proseWrap": "always",
"plugins": ["prettier-plugin-organize-imports"]
}
Loading
Loading