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

chore: remove solidity packages and conf #286

Merged
merged 13 commits into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 0 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have run `yarn style` without getting any errors
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules
10 changes: 7 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ on:
push:
branches:
- main
paths:
- packages/**/src/*.{ts,js}
pull_request:
paths:
- packages/**/src/*.{ts,js}

jobs:
gh-pages:
Expand All @@ -24,13 +28,13 @@ jobs:
run: yarn

- name: Build libraries
run: yarn build:libraries
run: yarn build

- name: Generate doc website
run: yarn docs

- name: Publish on Github Pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Publish on Github Pages
uses: crazy-max/[email protected]
with:
build_dir: docs
Expand Down
48 changes: 22 additions & 26 deletions .github/workflows/production.yml → .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: production
name: main

on:
push:
branches:
- main
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
style:
Expand All @@ -24,14 +29,8 @@ jobs:

- name: Build | Lint | Format
run: yarn style
test:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
type:
- contracts
- libraries

steps:
- name: Checkout
Expand All @@ -46,27 +45,24 @@ jobs:
- name: Install dependencies
run: yarn

- name: Build libraries and contracts
run: yarn build

- name: Test ${{ matrix.type }}
run: yarn test:${{ matrix.type }}

- name: Coveralls
uses: coverallsapp/github-action@master
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.type }}
path-to-lcov: ./coverage/${{ matrix.type }}/lcov.info
parallel: true
files: |
packages/**/src/*.{ts,js}
packages/**/tests/*.{ts,js}

coverage:
runs-on: ubuntu-latest
needs: test
- if: steps.changed-files.outputs.any_changed == 'true'
name: Build libraries
run: yarn build

steps:
- name: Coveralls Finished
- if: steps.changed-files.outputs.any_changed == 'true'
name: Test libraries
run: yarn test

- if: steps.changed-files.outputs.any_changed == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
56 changes: 0 additions & 56 deletions .github/workflows/pull-requests.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"**/*.{js,ts,jsx,tsx,md,json,sol}": "prettier --write",
"**/*.{js,ts,jsx,tsx,md,json,yml,yaml}": "prettier --write",
"**/*.{js,ts,jsx,tsx}": "eslint"
}
33 changes: 6 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/privacy-scaling-explorations/zk-kit/assets/11427903/f43f4403-846a-48b4-a1fa-0ab234c225e5">
<img width="250" alt="ZK-Kit logo" src="https://github.com/privacy-scaling-explorations/zk-kit/assets/11427903/f691c48c-021f-485d-89ef-9ddc8ba74787">
</picture>
<sub>JS & Solidity</sub>
<sub>JS</sub>
</h1>
</p>

Expand All @@ -16,8 +16,8 @@
<a href="https://github.com/privacy-scaling-explorations/zk-kit/blob/main/LICENSE">
<img alt="Github license" src="https://img.shields.io/github/license/privacy-scaling-explorations/zk-kit.svg?style=flat-square">
</a>
<a href="https://github.com/privacy-scaling-explorations/zk-kit/actions?query=workflow%3Aproduction">
<img alt="GitHub Workflow test" src="https://img.shields.io/github/actions/workflow/status/privacy-scaling-explorations/zk-kit/production.yml?branch=main&label=test&style=flat-square&logo=github">
<a href="https://github.com/privacy-scaling-explorations/zk-kit/actions?query=workflow%3Amain">
<img alt="GitHub Workflow Tests" src="https://img.shields.io/github/actions/workflow/status/privacy-scaling-explorations/zk-kit/main.yml?branch=main&label=tests&style=flat-square&logo=github">
</a>
<a href="https://coveralls.io/github/privacy-scaling-explorations/zk-kit">
<img alt="Coveralls" src="https://img.shields.io/coveralls/github/privacy-scaling-explorations/zk-kit?label=coverage (ts)&style=flat-square&logo=coveralls">
Expand Down Expand Up @@ -59,7 +59,6 @@
♚ [Yarn workspaces](https://yarnpkg.com/features/workspaces): minimal monorepo package management (`yarn`, `yarn build`, `yarn docs`)\
♛ [Conventional Commits](https://www.conventionalcommits.org): human and machine readable meaning to commit messages (`yarn commit`)\
♜ [Jest](https://jestjs.io/): tests and test coverage for all libraries (`yarn test:libraries`)\
♜ [Mocha](https://mochajs.org/): tests for contracts (`yarn test:contracts`)\
♞ [ESLint](https://eslint.org/), [Prettier](https://prettier.io/): code quality and formatting (`yarn prettier` & `yarn lint`)\
♝ [Typedocs](https://typedoc.org/): documentation generator for TypeScript (`yarn docs`)\
♟ [Benny](https://github.com/caderek/benny): simple benchmarking framework for JavaScript/TypeScript (`yarn benchmarks`)\
Expand Down Expand Up @@ -247,26 +246,6 @@
</a>
</td>
</tr>
<tr>
<td>
<a href="https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/imt.sol">
@zk-kit/imt.sol
</a>
</td>
<td>
<!-- NPM version -->
<a href="https://npmjs.org/package/@zk-kit/imt.sol">
<img src="https://img.shields.io/npm/v/@zk-kit/imt.sol.svg?style=flat-square" alt="NPM version" />
</a>
</td>
<td>
<!-- Downloads -->
<a href="https://npmjs.org/package/@zk-kit/imt.sol">
<img src="https://img.shields.io/npm/dm/@zk-kit/imt.sol.svg?style=flat-square" alt="Downloads" />
</a>
</td>
<td></td>
</tr>
<tr>
<td>
<a href="https://github.com/privacy-scaling-explorations/zk-kit/tree/main/packages/smt">
Expand Down Expand Up @@ -360,13 +339,13 @@ yarn lint
Run [Prettier](https://prettier.io/) to check formatting rules:

```bash
yarn prettier
yarn format
```

or to automatically format the code:

```bash
yarn prettier:write
yarn format:write
```

### Conventional commits
Expand All @@ -389,7 +368,7 @@ yarn test

### Build

Build all the packages and compile contracts:
Build all the packages:

```bash
yarn build
Expand Down
21 changes: 8 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
{
"name": "zk-kit",
"description": "A monorepo of reusable libraries for zero-knowledge technologies.",
"description": "A monorepo of reusable JS libraries for zero-knowledge technologies.",
"license": "MIT",
"repository": "[email protected]:privacy-scaling-explorations/zk-kit.git",
"homepage": "https://github.com/privacy-scaling-explorations/zk-kit",
"bugs": "https://github.com/privacy-scaling-explorations/zk-kit/issues",
"private": true,
"scripts": {
"build": "turbo build",
"_build:libraries": "yarn workspaces foreach -A -t --no-private run build",
"build:libraries": "turbo _build:libraries",
"test": "turbo _test:libraries test:coverage",
"_test:libraries": "jest --coverage",
"test:libraries": "turbo _test:libraries",
"_build": "yarn workspaces foreach -A -t --no-private run build",
"build": "turbo _build",
"_test": "jest --coverage",
"test": "turbo _test",
"test:library": "jest packages/${0}",
"test:contracts": "turbo test:coverage",
"version:bump": "yarn workspace @zk-kit/${0} version ${1} && yarn remove:stable-version-field ${0} && NO_HOOK=1 git commit -am \"chore(${0}): v${1}\" && git tag ${0}-v${1}",
"version:publish": "yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public",
"version:release": "changelogithub",
"lint:eslint": "eslint . --ext .js,.ts",
"lint": "turbo lint:eslint lint",
"lint": "turbo lint:eslint",
"format:prettier": "prettier -c .",
"format:prettier:write": "prettier -w .",
"format": "turbo format:prettier",
Expand All @@ -29,7 +26,7 @@
"remove:stable-version-field": "ts-node scripts/remove-stable-version-field.ts ${0} && yarn format:prettier:write",
"precommit": "lint-staged",
"postinstall": "husky && git config --local core.editor cat",
"style": "turbo lint:eslint lint format:prettier"
"style": "turbo lint:eslint format:prettier"
},
"keywords": [
"javascript",
Expand All @@ -39,12 +36,10 @@
"zk-snarks"
],
"workspaces": [
"packages/*",
"packages/*/contracts"
"packages/*"
],
"packageManager": "[email protected]",
"devDependencies": {
"@aztec/bb.js": "^0.33.0",
"@commitlint/cli": "^18.6.1",
"@commitlint/config-conventional": "^18.6.2",
"@types/glob": "^7.2.0",
Expand Down
Loading
Loading