Skip to content

Commit

Permalink
Merge pull request #73 from zkemail/dimidumo/extract-matched-str
Browse files Browse the repository at this point in the history
feat: add extractSubstr to match strs; add js errors
  • Loading branch information
Bisht13 authored Oct 22, 2024
2 parents 81d0299 + bd515aa commit 3319327
Show file tree
Hide file tree
Showing 18 changed files with 2,373 additions and 867 deletions.
56 changes: 30 additions & 26 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,30 +1,34 @@
name: Test
name: Build and Test

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Download circom v2.1.9 (Linux)
run: wget https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64 -O /usr/local/bin/circom && chmod +x /usr/local/bin/circom
- name: Install yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install --immutable
- name: Run tests
run: yarn test
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
components: rustfmt, clippy
- name: Install wasm-pack
run: cargo install wasm-pack
- name: Download circom v2.1.9 (Linux)
run: wget https://github.com/iden3/circom/releases/download/v2.1.9/circom-linux-amd64 -O /usr/local/bin/circom && chmod +x /usr/local/bin/circom
- name: Install yarn
run: npm install -g yarn
- name: Install dependencies
run: yarn install --immutable
- name: Install bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Run tests
run: yarn test
10 changes: 10 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"tabWidth": 4,
"useTabs": false,
"semi": true,
"singleQuote": true,
"endOfLine": "lf",
"trailingComma": "none",
"bracketSpacing": true,
"arrowParens": "avoid"
}
108 changes: 54 additions & 54 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
{
"name": "@zk-email/zk-regex",
"version": "2.1.1",
"private": true,
"description": "zk regex circuit for content attestation",
"main": "pkg/zk_regex_compiler_bg.wasm",
"workspaces": [
"packages/*"
],
"contributors": [
"Sora Suegami <[email protected]>",
"Yush G <[email protected]>",
"Javier Su <[email protected]>",
"Kata Choi <[email protected]>",
"Aditya Bisht <[email protected]>"
],
"scripts": {
"install": "yarn workspaces -pt run install",
"build": "yarn workspaces -pt run build",
"postinstall": "cargo install --path ./packages/compiler",
"test": "yarn workspaces -pt run test",
"upload-binary": "yarn workspaces -pt run upload-binary"
},
"repository": {
"type": "git",
"url": "git+https://github.com/zk-email-verify/zk-regex.git"
},
"keywords": [
"circom",
"circuit",
"regex",
"zk",
"attestation"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/zk-email-verify/zk-regex/issues"
},
"homepage": "https://github.com/zk-email-verify/zk-regex#readme",
"devDependencies": {
"@babel/core": "^7.22.5",
"@babel/plugin-transform-modules-commonjs": "^7.22.15",
"@babel/preset-env": "^7.22.2",
"@babel/preset-react": "^7.22.0",
"@types/jest": "^29.5.4",
"babel-jest": "^29.5.0",
"babel-preset-jest": "^29.5.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"prettier-plugin-solidity": "^1.1.3"
},
"engines": {
"yarn": "^1.22.0"
}
}
"name": "@zk-email/zk-regex",
"version": "2.1.1",
"private": true,
"description": "zk regex circuit for content attestation",
"main": "pkg/zk_regex_compiler_bg.wasm",
"workspaces": [
"packages/*"
],
"contributors": [
"Sora Suegami <[email protected]>",
"Yush G <[email protected]>",
"Javier Su <[email protected]>",
"Kata Choi <[email protected]>",
"Aditya Bisht <[email protected]>"
],
"scripts": {
"install": "yarn workspaces -pt run install",
"build": "yarn workspaces -pt run build",
"postinstall": "cargo install --path ./packages/compiler",
"test": "yarn workspaces -pt run test",
"upload-binary": "yarn workspaces -pt run upload-binary"
},
"repository": {
"type": "git",
"url": "git+https://github.com/zk-email-verify/zk-regex.git"
},
"keywords": [
"circom",
"circuit",
"regex",
"zk",
"attestation"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/zk-email-verify/zk-regex/issues"
},
"homepage": "https://github.com/zk-email-verify/zk-regex#readme",
"devDependencies": {
"@babel/core": "^7.22.5",
"@babel/plugin-transform-modules-commonjs": "^7.22.15",
"@babel/preset-env": "^7.22.2",
"@babel/preset-react": "^7.22.0",
"@types/jest": "^29.5.4",
"babel-jest": "^29.5.0",
"babel-preset-jest": "^29.5.0",
"jest": "^29.5.0",
"prettier": "^3.0.0",
"prettier-plugin-solidity": "^1.1.3"
},
"engines": {
"yarn": "^1.22.0"
}
}
55 changes: 30 additions & 25 deletions packages/apis/package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,31 @@
{
"name": "@zk-email/zk-regex-apis",
"version": "2.2.0",
"description": "apis compatible with [zk-regex](https://github.com/zkemail/zk-regex/tree/main).",
"contributors": [
"Javier Su <[email protected]>",
"Kata Choi <[email protected]>",
"Sora Suegami <[email protected]>",
"Yush G <[email protected]>",
"Aditya Bisht <[email protected]>"
],
"repository": {
"type": "git",
"url": "git+https://github.com/zkemail/zk-regex.git"
},
"scripts": {
"build": "wasm-pack build --target nodejs --out-dir ./pkg/",
"build-debug": "npm run build --",
"build-release": "npm run build --",
"install": "npm run build-debug",
"install-release": "npm run build-release",
"test": "cargo test && wasm-pack test --node",
"upload-binary": "wasm-pack publish -t nodejs"
},
"license": "MIT"
}
"name": "@zk-email/zk-regex-apis",
"version": "2.2.0",
"description": "apis compatible with [zk-regex](https://github.com/zkemail/zk-regex/tree/main).",
"contributors": [
"Javier Su <[email protected]>",
"Kata Choi <[email protected]>",
"Sora Suegami <[email protected]>",
"Yush G <[email protected]>",
"Aditya Bisht <[email protected]>"
],
"repository": {
"type": "git",
"url": "git+https://github.com/zkemail/zk-regex.git"
},
"scripts": {
"build": "wasm-pack build --target nodejs --out-dir ./pkg/",
"build-debug": "npm run build --",
"build-release": "npm run build --",
"install": "npm run build-debug",
"install-release": "npm run build-release",
"test": "cargo test && wasm-pack test --node && bun test",
"test-js": "jest",
"upload-binary": "wasm-pack publish -t nodejs"
},
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.5.13",
"jest": "^29.7.0"
}
}
Loading

0 comments on commit 3319327

Please sign in to comment.