From 63c0df1e138c7735e94654c0f77ff5abbdd88f1e Mon Sep 17 00:00:00 2001 From: Oleh Komendant Date: Wed, 18 Dec 2024 18:12:17 +0200 Subject: [PATCH] Rename utils file to helpers --- CHANGELOG.md | 4 ++++ package-lock.json | 12 ++++++------ package.json | 4 ++-- src/core/CircuitTypesGenerator.ts | 4 ++-- src/core/ZkitTSGenerator.ts | 2 +- src/core/templates/{utils.ts => helpers.ts} | 0 6 files changed, 15 insertions(+), 11 deletions(-) rename src/core/templates/{utils.ts => helpers.ts} (100%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 83cfbce..c3a6651 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## [v0.4.3] + +* Renamed `utils` file to `helpers` because of a path bug on Windows. + ## [v0.4.2] * Fixed redundant protocol type generation in the `hardhat.config.ts`. diff --git a/package-lock.json b/package-lock.json index 532c0d5..1b3d997 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,16 +1,16 @@ { "name": "@solarity/zktype", - "version": "0.4.2", + "version": "0.4.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@solarity/zktype", - "version": "0.4.2", + "version": "0.4.3", "license": "MIT", "dependencies": { "ejs": "3.1.10", - "prettier": "3.3.3", + "prettier": "3.4.2", "typescript": "5.5.4" }, "devDependencies": { @@ -4660,9 +4660,9 @@ } }, "node_modules/prettier": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", - "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.2.tgz", + "integrity": "sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==", "bin": { "prettier": "bin/prettier.cjs" }, diff --git a/package.json b/package.json index 024c89f..3cab542 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@solarity/zktype", - "version": "0.4.2", + "version": "0.4.3", "description": "Unleash TypeScript bindings for Circom circuits", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -45,7 +45,7 @@ "homepage": "https://github.com/dl-solarity/zktype#readme", "dependencies": { "ejs": "3.1.10", - "prettier": "3.3.3", + "prettier": "3.4.2", "typescript": "5.5.4" }, "peerDependencies": { diff --git a/src/core/CircuitTypesGenerator.ts b/src/core/CircuitTypesGenerator.ts index 8b96823..f97618e 100644 --- a/src/core/CircuitTypesGenerator.ts +++ b/src/core/CircuitTypesGenerator.ts @@ -118,10 +118,10 @@ export class CircuitTypesGenerator extends ZkitTSGenerator { await this._saveMainIndexFile(circuitSet); await this._saveHardhatZkitTypeExtensionFile(circuitSet); - // copy utils to types output dir + // copy helpers to types output dir const utilsDirPath = this.getOutputTypesDir(); fs.mkdirSync(utilsDirPath, { recursive: true }); - fs.copyFileSync(path.join(__dirname, "templates", "utils.ts"), path.join(utilsDirPath, "utils.ts")); + fs.copyFileSync(path.join(__dirname, "templates", "helpers.ts"), path.join(utilsDirPath, "helpers.ts")); } /** diff --git a/src/core/ZkitTSGenerator.ts b/src/core/ZkitTSGenerator.ts index 6908f0f..e4663e2 100644 --- a/src/core/ZkitTSGenerator.ts +++ b/src/core/ZkitTSGenerator.ts @@ -155,7 +155,7 @@ export default class ZkitTSGenerator extends BaseTSGenerator { calldataPubSignalsCount += this._getPublicSignalsCount(signal); } - const pathToUtils = path.join(this.getOutputTypesDir(), "utils"); + const pathToUtils = path.join(this.getOutputTypesDir(), "helpers"); const circuitClassName = this._getCircuitName(circuitArtifact) + (isPrefixed ? this._getPrefix(protocolType) : ""); const templateParams: WrapperTemplateParams = { diff --git a/src/core/templates/utils.ts b/src/core/templates/helpers.ts similarity index 100% rename from src/core/templates/utils.ts rename to src/core/templates/helpers.ts