Skip to content

Commit

Permalink
Merge pull request #54 from firstbatchxyz/erhant/quick-fix
Browse files Browse the repository at this point in the history
fix lint and test errors
  • Loading branch information
fco-fbatch authored Nov 15, 2023
2 parents c842bf5 + 6fbb9be commit 5b8a97a
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 9 deletions.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hollowdb",
"version": "1.2.4",
"version": "1.3.0",
"description": "A decentralized privacy-preserving key-value database",
"license": "MIT",
"homepage": "https://github.com/firstbatchxyz/hollowdb#readme",
Expand Down Expand Up @@ -77,6 +77,7 @@
"@types/node": "^14.11.2",
"@types/yargs": "^17.0.24",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.11.0",
"arlocal": "^1.1.60",
"arweave": "^1.13.0",
"copyfiles": "^2.4.1",
Expand Down
6 changes: 2 additions & 4 deletions src/bin/build.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import {build as esbuild} from 'esbuild';
import {getPath} from './utils';
import {readdirSync} from 'fs';
import replace from 'replace-in-file';

Expand All @@ -11,7 +10,7 @@ const DEST = CONTRACTS_DIR + '/build';
* If no name is provided, all contracts will be built.
*/
export async function build(name?: string) {
let contracts = name
const contracts = name
? [name + '.contract.ts']
: readdirSync(CONTRACTS_DIR).filter(file => file.endsWith('.contract.ts'));

Expand All @@ -24,8 +23,7 @@ export async function build(name?: string) {
format: 'iife',
})
.catch(() => {
console.error('Build failed');
process.exit(1);
throw new Error('Build failed.');
})
.finally(() => {
const files = contracts.map(source => `${DEST}/${source}`.replace('.ts', '.js'));
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cli.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env node
import {copyFileSync, existsSync, readFileSync, writeFileSync} from 'fs';
import {copyFileSync, readFileSync, writeFileSync} from 'fs';
import yargs from 'yargs';
import {hideBin} from 'yargs/helpers';

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/build/hollowdb-htx.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
var NotWhitelistedError = new ContractError("Not whitelisted.");
var InvalidProofError = new ContractError("Invalid proof.");
var ExpectedProofError = new ContractError("Expected a proof.");
var NullValueError = new ContractError("Value cant be null, use remove instead.");
var NotOwnerError = new ContractError("Not contract owner.");
var InvalidFunctionError = new ContractError("Invalid function.");
var NullValueError = new ContractError("Value cant be null, use remove instead.");

// src/contracts/utils/index.ts
var verifyProof = async (proof, psignals, verificationKey) => {
Expand Down
2 changes: 1 addition & 1 deletion src/contracts/build/hollowdb.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
var NotWhitelistedError = new ContractError("Not whitelisted.");
var InvalidProofError = new ContractError("Invalid proof.");
var ExpectedProofError = new ContractError("Expected a proof.");
var NullValueError = new ContractError("Value cant be null, use remove instead.");
var NotOwnerError = new ContractError("Not contract owner.");
var InvalidFunctionError = new ContractError("Invalid function.");
var NullValueError = new ContractError("Value cant be null, use remove instead.");

// src/contracts/utils/index.ts
var verifyProof = async (proof, psignals, verificationKey) => {
Expand Down
1 change: 0 additions & 1 deletion src/contracts/errors/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,3 @@ export const ExpectedProofError = new ContractError('Expected a proof.');
export const NullValueError = new ContractError('Value cant be null, use remove instead.');
export const NotOwnerError = new ContractError('Not contract owner.');
export const InvalidFunctionError = new ContractError('Invalid function.');
export const NullValueError = new ContractError('Value cant be null, use remove instead.');
45 changes: 45 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3231,6 +3231,25 @@
semver "^7.5.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/parser@^6.11.0":
version "6.11.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.11.0.tgz#9640d9595d905f3be4f278bf515130e6129b202e"
integrity sha512-+whEdjk+d5do5nxfxx73oanLL9ghKO3EwM9kBCkUtWMRwWuPaFv9ScuqlYfQ6pAD6ZiJhky7TZ2ZYhrMsfMxVQ==
dependencies:
"@typescript-eslint/scope-manager" "6.11.0"
"@typescript-eslint/types" "6.11.0"
"@typescript-eslint/typescript-estree" "6.11.0"
"@typescript-eslint/visitor-keys" "6.11.0"
debug "^4.3.4"

"@typescript-eslint/scope-manager@6.11.0":
version "6.11.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.11.0.tgz#621f603537c89f4d105733d949aa4d55eee5cea8"
integrity sha512-0A8KoVvIURG4uhxAdjSaxy8RdRE//HztaZdG8KiHLP8WOXSk0vlF7Pvogv+vlJA5Rnjj/wDcFENvDaHb+gKd1A==
dependencies:
"@typescript-eslint/types" "6.11.0"
"@typescript-eslint/visitor-keys" "6.11.0"

"@typescript-eslint/scope-manager@6.5.0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.5.0.tgz#f2cb20895aaad41b3ad27cc3a338ce8598f261c5"
Expand All @@ -3249,11 +3268,29 @@
debug "^4.3.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/types@6.11.0":
version "6.11.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.11.0.tgz#8ad3aa000cbf4bdc4dcceed96e9b577f15e0bf53"
integrity sha512-ZbEzuD4DwEJxwPqhv3QULlRj8KYTAnNsXxmfuUXFCxZmO6CF2gM/y+ugBSAQhrqaJL3M+oe4owdWunaHM6beqA==

"@typescript-eslint/types@6.5.0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.5.0.tgz#f4e55cfd99ac5346ea772770bf212a3e689a8f04"
integrity sha512-eqLLOEF5/lU8jW3Bw+8auf4lZSbbljHR2saKnYqON12G/WsJrGeeDHWuQePoEf9ro22+JkbPfWQwKEC5WwLQ3w==

"@typescript-eslint/typescript-estree@6.11.0":
version "6.11.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.11.0.tgz#7b52c12a623bf7f8ec7f8a79901b9f98eb5c7990"
integrity sha512-Aezzv1o2tWJwvZhedzvD5Yv7+Lpu1by/U1LZ5gLc4tCx8jUmuSCMioPFRjliN/6SJIvY6HpTtJIWubKuYYYesQ==
dependencies:
"@typescript-eslint/types" "6.11.0"
"@typescript-eslint/visitor-keys" "6.11.0"
debug "^4.3.4"
globby "^11.1.0"
is-glob "^4.0.3"
semver "^7.5.4"
ts-api-utils "^1.0.1"

"@typescript-eslint/typescript-estree@6.5.0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.5.0.tgz#1cef6bc822585e9ef89d88834bc902d911d747ed"
Expand All @@ -3280,6 +3317,14 @@
"@typescript-eslint/typescript-estree" "6.5.0"
semver "^7.5.4"

"@typescript-eslint/visitor-keys@6.11.0":
version "6.11.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.11.0.tgz#d991538788923f92ec40d44389e7075b359f3458"
integrity sha512-+SUN/W7WjBr05uRxPggJPSzyB8zUpaYo2hByKasWbqr3PM8AXfZt8UHdNpBS1v9SA62qnSSMF3380SwDqqprgQ==
dependencies:
"@typescript-eslint/types" "6.11.0"
eslint-visitor-keys "^3.4.1"

"@typescript-eslint/visitor-keys@6.5.0":
version "6.5.0"
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.5.0.tgz#1a6f474a0170a447b76f0699ce6700110fd11436"
Expand Down

0 comments on commit 5b8a97a

Please sign in to comment.