Skip to content

Commit 770d2f9

Browse files
committed
chore: update dev dependencies + new cz adapter
re #662
1 parent 2fabdb8 commit 770d2f9

25 files changed

+917
-1045
lines changed

.commitlintrc.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const fs = require("node:fs")
2+
const path = require("node:path")
3+
4+
const packages = fs.readdirSync(path.resolve(__dirname, "packages"))
5+
6+
module.exports = {
7+
extends: ["@commitlint/config-conventional"],
8+
prompt: {
9+
scopes: [...packages],
10+
markBreakingChangeMode: true,
11+
allowCustomIssuePrefix: false,
12+
allowEmptyIssuePrefix: false,
13+
issuePrefixes: [
14+
{
15+
value: "re",
16+
name: "re: ISSUES related"
17+
}
18+
]
19+
}
20+
}

.commitlintrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.husky/prepare-commit-msg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env sh
2+
. "$(dirname -- "$0")/_/husky.sh"
3+
4+
if [ "$NO_HOOK" != "1" ]; then
5+
exec < /dev/tty && yarn cz --hook || true
6+
fi

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ We always use ESLint and Prettier. To check that your code follows the rules, si
4646

4747
For commits it is recommended to use [Conventional Commits](https://www.conventionalcommits.org).
4848

49-
Don't worry if it looks complicated, in our repositories, after `git add`, you can usually run the npm script `yarn commit` to make many of these steps interactive.
49+
Don't worry if it looks complicated, in our repositories, `git commit` opens an interactive app to create your conventional commit.
5050

5151
Each commit message consists of a **header**, a **body** and a **footer**. The **header** has a special format that includes a **type**, a **scope** and a **subject**:
5252

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
<a href="https://www.gitpoap.io/gh/semaphore-protocol/semaphore" target="_blank">
3535
<img src="https://public-api.gitpoap.io/v1/repo/semaphore-protocol/semaphore/badge">
3636
</a>
37-
37+
<a href="http://commitizen.github.io/cz-cli/">
38+
<img alt="Commitizen friendly" src="https://img.shields.io/badge/commitizen-friendly-586D76?style=flat-square">
39+
</a>
3840
</p>
3941

4042
<div align="center">

package.json

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
"prettier": "prettier -c .",
2222
"prettier:write": "prettier -w .",
2323
"docs": "typedoc --cname js.semaphore.pse.dev --githubPages true",
24-
"version:bump": "yarn workspaces foreach -A --no-private version -d ${0} && yarn version apply --all && yarn remove:stable-version-field && git commit -am \"chore: v${0}\" && git tag v${0}",
24+
"version:bump": "yarn workspaces foreach -A --no-private version -d ${0} && yarn version apply --all && yarn remove:stable-version-field && NO_HOOK=1 git commit -am \"chore: v${0}\" && git tag v${0}",
2525
"version:publish": "yarn build:libraries && yarn clean:cli-templates && yarn workspaces foreach -A --no-private npm publish --tolerate-republish --access public",
2626
"version:release": "changelogithub",
2727
"clean": "ts-node scripts/clean-apps.ts && ts-node scripts/clean-packages.ts && yarn clean:cli-templates && rimraf node_modules",
2828
"clean:cli-templates": "ts-node scripts/clean-cli-templates.ts",
2929
"remove:stable-version-field": "ts-node scripts/remove-stable-version-field.ts && yarn prettier:write",
30-
"commit": "cz",
3130
"precommit": "lint-staged",
3231
"postinstall": "husky install"
3332
},
@@ -51,47 +50,42 @@
5150
],
5251
"packageManager": "[email protected]",
5352
"devDependencies": {
54-
"@commitlint/cli": "^16.0.2",
55-
"@commitlint/config-conventional": "^16.0.0",
56-
"@rollup/plugin-typescript": "^11.1.6",
57-
"@types/circomlibjs": "^0.1.4",
58-
"@types/download": "^8.0.1",
53+
"@commitlint/cli": "^18.6.1",
54+
"@commitlint/config-conventional": "^18.6.2",
5955
"@types/glob": "^7.2.0",
6056
"@types/jest": "^29.5.12",
6157
"@types/node": "^20",
62-
"@types/rimraf": "^3.0.2",
63-
"@typescript-eslint/eslint-plugin": "^5.9.1",
64-
"@typescript-eslint/parser": "^5.9.1",
58+
"@typescript-eslint/eslint-plugin": "^7.0.2",
59+
"@typescript-eslint/parser": "^7.0.2",
6560
"changelogithub": "0.12.7",
66-
"commitizen": "^4.2.4",
67-
"cz-conventional-changelog": "^3.3.0",
61+
"commitizen": "^4.3.0",
62+
"cz-git": "^1.9.0",
6863
"dotenv": "^16.0.2",
69-
"eslint": "^8.2.0",
64+
"eslint": "^8.56.0",
7065
"eslint-config-airbnb": "^19.0.4",
71-
"eslint-config-airbnb-typescript": "^16.1.0",
72-
"eslint-config-prettier": "^8.3.0",
73-
"eslint-plugin-import": "^2.25.2",
74-
"eslint-plugin-jest": "^27.8.0",
66+
"eslint-config-airbnb-typescript": "^17.1.0",
67+
"eslint-config-prettier": "^9.1.0",
68+
"eslint-plugin-import": "^2.29.1",
69+
"eslint-plugin-jest": "^27.9.0",
7570
"eslint-plugin-jsx-a11y": "^6.8.0",
76-
"eslint-plugin-react": "^7.33.2",
71+
"eslint-plugin-react": "^7.34.0",
7772
"eslint-plugin-react-hooks": "^4.6.0",
78-
"husky": "^8.0.3",
73+
"husky": "^9.0.11",
7974
"jest": "^29.7.0",
8075
"jest-config": "^29.7.0",
81-
"lint-staged": "^12.1.7",
82-
"prettier": "^2.5.1",
76+
"lint-staged": "^15.2.2",
77+
"prettier": "^3.2.5",
8378
"rimraf": "^5.0.5",
84-
"rollup": "^4.9.6",
8579
"snarkjs": "^0.7.2",
8680
"ts-jest": "^29.1.2",
8781
"ts-node": "^10.9.2",
8882
"tslib": "^2.6.2",
89-
"typedoc": "^0.25.7",
83+
"typedoc": "^0.25.8",
9084
"typescript": "^5.3.3"
9185
},
9286
"config": {
9387
"commitizen": {
94-
"path": "./node_modules/cz-conventional-changelog"
88+
"path": "./node_modules/cz-git"
9589
}
9690
},
9791
"resolutions": {

packages/cli/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,14 @@
3131
"access": "public"
3232
},
3333
"devDependencies": {
34+
"@rollup/plugin-typescript": "^11.1.6",
3435
"@types/figlet": "^1.5.8",
3536
"@types/inquirer": "^9.0.7",
3637
"@types/pacote": "^11.1.8",
3738
"@types/semver": "^7.5.8",
38-
"rollup-plugin-cleanup": "^3.2.1",
39-
"rollup-plugin-typescript2": "^0.36.0"
39+
"rimraf": "^5.0.5",
40+
"rollup": "^4.12.0",
41+
"rollup-plugin-cleanup": "^3.2.1"
4042
},
4143
"dependencies": {
4244
"@semaphore-protocol/data": "4.0.0-beta.2",

packages/cli/rollup.config.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import typescript from "rollup-plugin-typescript2"
1+
import typescript from "@rollup/plugin-typescript"
22
import fs from "fs"
33
import cleanup from "rollup-plugin-cleanup"
44

@@ -9,7 +9,7 @@ const banner = `#!/usr/bin/env node
99
* @module ${pkg.name}
1010
* @version ${pkg.version}
1111
* @file ${pkg.description}
12-
* @copyright Ethereum Foundation 2024
12+
* @copyright Ethereum Foundation ${new Date().getFullYear()}
1313
* @license ${pkg.license}
1414
* @see [Github]{@link ${pkg.homepage}}
1515
*/
@@ -20,9 +20,8 @@ export default {
2020
output: [{ file: pkg.bin.semaphore, format: "es", banner }],
2121
external: [...Object.keys(pkg.dependencies), "url", "fs", "path", "child_process"],
2222
plugins: [
23-
(typescript as any)({
24-
tsconfig: "./build.tsconfig.json",
25-
useTsconfigDeclarationDir: true
23+
typescript({
24+
tsconfig: "./build.tsconfig.json"
2625
}),
2726
cleanup({ comments: "jsdoc" })
2827
]

packages/data/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
},
3232
"devDependencies": {
3333
"@rollup/plugin-json": "^6.1.0",
34-
"rollup-plugin-cleanup": "^3.2.1",
35-
"rollup-plugin-typescript2": "^0.36.0"
34+
"@rollup/plugin-typescript": "^11.1.6",
35+
"rimraf": "^5.0.5",
36+
"rollup": "^4.12.0",
37+
"rollup-plugin-cleanup": "^3.2.1"
3638
},
3739
"dependencies": {
3840
"axios": "1.6.6",

packages/data/rollup.config.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import json from "@rollup/plugin-json"
2+
import typescript from "@rollup/plugin-typescript"
23
import * as fs from "fs"
34
import cleanup from "rollup-plugin-cleanup"
4-
import typescript from "rollup-plugin-typescript2"
55

66
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"))
77
const banner = `/**
88
* @module ${pkg.name}
99
* @version ${pkg.version}
1010
* @file ${pkg.description}
11-
* @copyright Ethereum Foundation 2024
11+
* @copyright Ethereum Foundation ${new Date().getFullYear()}
1212
* @license ${pkg.license}
1313
* @see [Github]{@link ${pkg.homepage}}
1414
*/`
@@ -20,9 +20,5 @@ export default {
2020
{ file: pkg.exports.default, format: "es", banner }
2121
],
2222
external: [...Object.keys(pkg.dependencies), "ethers/contract", "ethers/constants", "ethers/providers"],
23-
plugins: [
24-
json(),
25-
typescript({ tsconfig: "./build.tsconfig.json", useTsconfigDeclarationDir: true }),
26-
cleanup({ comments: "jsdoc" })
27-
]
23+
plugins: [json(), typescript({ tsconfig: "./build.tsconfig.json" }), cleanup({ comments: "jsdoc" })]
2824
}

packages/group/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@
3232
"devDependencies": {
3333
"@rollup/plugin-commonjs": "^25.0.7",
3434
"@rollup/plugin-node-resolve": "^15.2.3",
35+
"@rollup/plugin-typescript": "^11.1.6",
3536
"poseidon-lite": "^0.2.0",
36-
"rollup-plugin-cleanup": "^3.2.1",
37-
"rollup-plugin-typescript2": "^0.36.0"
37+
"rimraf": "^5.0.5",
38+
"rollup": "^4.12.0",
39+
"rollup-plugin-cleanup": "^3.2.1"
3840
},
3941
"dependencies": {
4042
"@zk-kit/imt": "2.0.0-beta.2"

packages/group/rollup.config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
import commonjs from "@rollup/plugin-commonjs"
22
import { nodeResolve } from "@rollup/plugin-node-resolve"
3+
import typescript from "@rollup/plugin-typescript"
34
import * as fs from "fs"
45
import cleanup from "rollup-plugin-cleanup"
5-
import typescript from "rollup-plugin-typescript2"
66

77
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"))
88
const banner = `/**
99
* @module ${pkg.name}
1010
* @version ${pkg.version}
1111
* @file ${pkg.description}
12-
* @copyright Ethereum Foundation 2024
12+
* @copyright Ethereum Foundation ${new Date().getFullYear()}
1313
* @license ${pkg.license}
1414
* @see [Github]{@link ${pkg.homepage}}
1515
*/`
@@ -23,8 +23,7 @@ export default {
2323
external: Object.keys(pkg.dependencies),
2424
plugins: [
2525
typescript({
26-
tsconfig: "./build.tsconfig.json",
27-
useTsconfigDeclarationDir: true
26+
tsconfig: "./build.tsconfig.json"
2827
}),
2928
commonjs(),
3029
nodeResolve(),

packages/hardhat/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@
3030
"access": "public"
3131
},
3232
"devDependencies": {
33+
"@rollup/plugin-typescript": "^11.1.6",
3334
"hardhat": "^2.19.4",
34-
"rollup-plugin-cleanup": "^3.2.1",
35-
"rollup-plugin-typescript2": "^0.36.0"
35+
"rimraf": "^5.0.5",
36+
"rollup": "^4.12.0",
37+
"rollup-plugin-cleanup": "^3.2.1"
3638
},
3739
"peerDependencies": {
3840
"hardhat": "^2.19.4"

packages/hardhat/rollup.config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import typescript from "rollup-plugin-typescript2"
1+
import typescript from "@rollup/plugin-typescript"
22
import * as fs from "fs"
33
import cleanup from "rollup-plugin-cleanup"
44

@@ -7,7 +7,7 @@ const banner = `/**
77
* @module ${pkg.name}
88
* @version ${pkg.version}
99
* @file ${pkg.description}
10-
* @copyright Ethereum Foundation 2024
10+
* @copyright Ethereum Foundation ${new Date().getFullYear()}
1111
* @license ${pkg.license}
1212
* @see [Github]{@link ${pkg.homepage}}
1313
*/`
@@ -21,8 +21,7 @@ export default {
2121
external: [...Object.keys(pkg.dependencies), "hardhat/config"],
2222
plugins: [
2323
typescript({
24-
tsconfig: "./build.tsconfig.json",
25-
useTsconfigDeclarationDir: true
24+
tsconfig: "./build.tsconfig.json"
2625
}),
2726
cleanup({ comments: "jsdoc" })
2827
]

packages/heyauthn/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,10 @@
3030
"access": "public"
3131
},
3232
"devDependencies": {
33-
"rollup-plugin-cleanup": "^3.2.1",
34-
"rollup-plugin-typescript2": "^0.36.0"
33+
"@rollup/plugin-typescript": "^11.1.6",
34+
"rimraf": "^5.0.5",
35+
"rollup": "^4.12.0",
36+
"rollup-plugin-cleanup": "^3.2.1"
3537
},
3638
"dependencies": {
3739
"@semaphore-protocol/identity": "4.0.0-beta.2",

packages/heyauthn/rollup.config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import typescript from "rollup-plugin-typescript2"
1+
import typescript from "@rollup/plugin-typescript"
22
import * as fs from "fs"
33
import cleanup from "rollup-plugin-cleanup"
44

@@ -7,7 +7,7 @@ const banner = `/**
77
* @module ${pkg.name}
88
* @version ${pkg.version}
99
* @file ${pkg.description}
10-
* @copyright Vivek Bhupatiraju 2024
10+
* @copyright Vivek Bhupatiraju ${new Date().getFullYear()}
1111
* @license ${pkg.license}
1212
* @see [Github]{@link ${pkg.homepage}}
1313
*/`
@@ -21,8 +21,7 @@ export default {
2121
external: Object.keys(pkg.dependencies),
2222
plugins: [
2323
typescript({
24-
tsconfig: "./build.tsconfig.json",
25-
useTsconfigDeclarationDir: true
24+
tsconfig: "./build.tsconfig.json"
2625
}),
2726
cleanup({ comments: "jsdoc" })
2827
]

packages/identity/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@
4141
"@rollup/plugin-alias": "^5.1.0",
4242
"@rollup/plugin-commonjs": "^25.0.7",
4343
"@rollup/plugin-node-resolve": "^15.2.3",
44-
"rollup-plugin-cleanup": "^3.2.1",
45-
"rollup-plugin-typescript2": "^0.36.0"
44+
"@rollup/plugin-typescript": "^11.1.6",
45+
"rimraf": "^5.0.5",
46+
"rollup": "^4.12.0",
47+
"rollup-plugin-cleanup": "^3.2.1"
4648
},
4749
"dependencies": {
4850
"@zk-kit/baby-jubjub": "0.2.0",

packages/identity/rollup.browser.config.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ import alias from "@rollup/plugin-alias"
22
import commonjs from "@rollup/plugin-commonjs"
33
import json from "@rollup/plugin-json"
44
import { nodeResolve } from "@rollup/plugin-node-resolve"
5+
import typescript from "@rollup/plugin-typescript"
56
import * as fs from "fs"
67
import cleanup from "rollup-plugin-cleanup"
7-
import typescript from "rollup-plugin-typescript2"
88

99
const pkg = JSON.parse(fs.readFileSync("./package.json", "utf-8"))
1010
const banner = `/**
1111
* @module ${pkg.name}
1212
* @version ${pkg.version}
1313
* @file ${pkg.description}
14-
* @copyright Ethereum Foundation 2024
14+
* @copyright Ethereum Foundation ${new Date().getFullYear()}
1515
* @license ${pkg.license}
1616
* @see [Github]{@link ${pkg.homepage}}
1717
*/`
@@ -31,8 +31,7 @@ export default {
3131
entries: [{ find: "./random-number.node", replacement: "./random-number.browser" }]
3232
}),
3333
typescript({
34-
tsconfig: "./build.tsconfig.json",
35-
useTsconfigDeclarationDir: true
34+
tsconfig: "./build.tsconfig.json"
3635
}),
3736
commonjs(),
3837
nodeResolve(),

0 commit comments

Comments
 (0)