Skip to content

Commit

Permalink
pnpm stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
erhant committed Jan 2, 2024
1 parent a58fd15 commit 25d75e7
Show file tree
Hide file tree
Showing 10 changed files with 10,987 additions and 97 deletions.
8 changes: 0 additions & 8 deletions .editorconfig

This file was deleted.

6 changes: 0 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@ name: build
# run when `dev` has a push or PR
# or when `master` has a push
on:
pull_request:
types:
- opened
branches:
- dev
push:
branches:
- master
- dev

jobs:
Expand Down
46 changes: 0 additions & 46 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,53 +5,7 @@ on:
types: [published]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 19.x

- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 7
redis-port: 6379

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"

- name: Restore yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn

- name: Formatting
run: yarn format

- name: Linting
run: yarn lint

- name: Build
run: yarn build

- name: Run tests
run: yarn test

publish:
needs: test
runs-on: ubuntu-latest

steps:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/test-tmp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: test-tmp

on:
push:
branches:
- erhant/peer-deps

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: 19.x

- name: Start Redis
uses: supercharge/[email protected]
with:
redis-version: 7
redis-port: 6379

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install

- name: Run tests
run: pnpm test
5 changes: 1 addition & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
name: test

# run when `dev` has a push or PR
# or when `master` has a push
on:
pull_request:
types:
- opened
branches:
- dev
- master
push:
branches:
- master
- dev

jobs:
test:
Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ Depending on your use-cases, we have several optional dependencies:

## Usage

You can read the full documentation of HollowDB at <https://docs.hollowdb.xyz>. If you are interested in customizing the smart contract of HollowDB and extending its SDKs, refer to this [README](./src/contracts/README.md).
You can read the full documentation of HollowDB at <https://docs.hollowdb.xyz>.

> [!NOTE]
>
> If you are interested in customizing the smart contract of HollowDB and extending its SDKs, refer to this [README](./src/contracts/README.md).
## Examples

Expand All @@ -64,7 +68,7 @@ Check out the [examples](./examples/) folder for a few examples of HollowDB usag
You can run all tests via:

```sh
yarn test
pnpm test
```

Tests operate on a local Arweave instance using [arlocal](https://www.npmjs.com/package/arlocal). They will run for all cache types (LMDB, Redis, LevelDB). You will need to have a Redis server running for some of the tests to pass, the URL shall be specified [here](./tests/constants/index.ts).
Expand All @@ -74,6 +78,6 @@ Tests operate on a local Arweave instance using [arlocal](https://www.npmjs.com/
You can check the formatting of the code or lint everything with the following commands:

```sh
yarn format # prettier
yarn lint # eslint
pnpm format # prettier
pnpm lint # eslint
```
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hollowdb",
"version": "1.3.5",
"version": "1.4.0",
"description": "A decentralized privacy-preserving key-value database",
"license": "MIT",
"homepage": "https://github.com/firstbatchxyz/hollowdb#readme",
Expand Down Expand Up @@ -47,32 +47,31 @@
"README.md"
],
"scripts": {
"prebuild": "yarn clean && yarn check",
"prebuild": "pnpm clean && pnpm check",
"build": "parcel build",
"clean": "rimraf ./lib",
"check": "tsc --noEmit",
"clean": "rimraf ./lib && rimraf ./.parcel-cache",
"check": "tsc --noEmit && echo 'All good.'",
"contract": "node --no-warnings --loader ts-node/esm ./src/bin/cli.ts",
"compile": "rimraf ./dist && npx tsc",
"test": "jest",
"pretest": "yarn contract build",
"lint": "eslint '**/*.ts'",
"pretest": "pnpm contract build",
"lint": "eslint '**/*.ts' && echo 'All good.'",
"format": "prettier --check '**/*.ts'",
"prepublishOnly": "yarn lint",
"preversion": "yarn lint && yarn build",
"version": "yarn format && git add -A src",
"prepublishOnly": "pnpm lint",
"preversion": "pnpm lint && pnpm build",
"version": "pnpm format && git add -A src",
"postversion": "git push && git push --tags",
"yalc:publish": "yarn build && yalc publish --push"
"yalc:publish": "pnpm build && yalc publish --push"
},
"dependencies": {
"warp-contracts": "^1.4.2",
"warp-contracts-plugin-deploy": "^1.0.7",
"warp-contracts-plugin-ethers": "^1.0.7",
"warp-contracts-plugin-snarkjs": "^0.2.1"
"peerDependencies": {
"warp-contracts": "^1.4.2"
},
"optionalDependencies": {
"hollowdb-prover": "^0.1.4",
"ioredis": "^5.3.2",
"warp-contracts-lmdb": "^1.1.10",
"warp-contracts-plugin-ethers": "^1.0.7",
"warp-contracts-plugin-snarkjs": "^0.2.1",
"warp-contracts-redis": "^0.3.4"
},
"devDependencies": {
Expand All @@ -84,7 +83,7 @@
"@types/yargs": "^17.0.24",
"@typescript-eslint/eslint-plugin": "^6.5.0",
"@typescript-eslint/parser": "^6.11.0",
"arlocal": "^1.1.60",
"arlocal": "^1.1.62",
"arweave": "^1.13.0",
"copyfiles": "^2.4.1",
"esbuild": "^0.16.4",
Expand All @@ -101,6 +100,7 @@
"ts-jest": "^29.0.5",
"ts-node": "^10.9.1",
"typescript": "^5.1.3",
"warp-contracts-plugin-deploy": "^1.0.7",
"yargs": "^17.7.2"
},
"keywords": [
Expand Down
Loading

0 comments on commit 25d75e7

Please sign in to comment.