From 5600ad17fe1b3c827017eba3b564361941353d9f Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Sun, 31 Dec 2023 13:45:20 +0200 Subject: [PATCH 1/2] build: switch to bun for dep management --- .github/workflows/ci-deep.yml | 32 ++++++++---------------------- .github/workflows/ci.yml | 36 ++++++++++------------------------ .gitignore | 1 + .prettierignore | 1 + CONTRIBUTING.md | 5 ++--- README.md | 6 ++++-- bun.lockb | Bin 0 -> 43293 bytes package.json | 10 +++++----- shell/prepare-artifacts.sh | 4 ++-- 9 files changed, 33 insertions(+), 62 deletions(-) create mode 100755 bun.lockb diff --git a/.github/workflows/ci-deep.yml b/.github/workflows/ci-deep.yml index f80fc622..924f546f 100644 --- a/.github/workflows/ci-deep.yml +++ b/.github/workflows/ci-deep.yml @@ -23,22 +23,14 @@ jobs: - name: "Install Foundry" uses: "foundry-rs/foundry-toolchain@v1" - - name: "Install Pnpm" - uses: "pnpm/action-setup@v2" - with: - version: "8" - - - name: "Install Node.js" - uses: "actions/setup-node@v3" - with: - cache: "pnpm" - node-version: "lts/*" + - name: "Install Bun" + uses: "oven-sh/setup-bun@v1" - name: "Install the Node.js dependencies" - run: "pnpm install" + run: "bun install" - - name: "Lint the contracts" - run: "pnpm lint" + - name: "Lint the code" + run: "bun run lint" - name: "Add lint summary" run: | @@ -57,19 +49,11 @@ jobs: - name: "Install Foundry" uses: "foundry-rs/foundry-toolchain@v1" - - name: "Install Pnpm" - uses: "pnpm/action-setup@v2" - with: - version: "8" - - - name: "Install Node.js" - uses: "actions/setup-node@v3" - with: - cache: "pnpm" - node-version: "lts/*" + - name: "Install Bun" + uses: "oven-sh/setup-bun@v1" - name: "Install the Node.js dependencies" - run: "pnpm install" + run: "bun install" - name: "Produce an optimized build with --via-ir" run: "FOUNDRY_PROFILE=optimized forge build" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96a07403..dc3b23aa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,22 +24,14 @@ jobs: - name: "Install Foundry" uses: "foundry-rs/foundry-toolchain@v1" - - name: "Install Pnpm" - uses: "pnpm/action-setup@v2" - with: - version: "8" - - - name: "Install Node.js" - uses: "actions/setup-node@v3" - with: - cache: "pnpm" - node-version: "lts/*" + - name: "Install Bun" + uses: "oven-sh/setup-bun@v1" - name: "Install the Node.js dependencies" - run: "pnpm install" + run: "bun install" - - name: "Lint the contracts" - run: "pnpm lint" + - name: "Lint the code" + run: "bun run lint" - name: "Add lint summary" run: | @@ -55,19 +47,11 @@ jobs: - name: "Install Foundry" uses: "foundry-rs/foundry-toolchain@v1" - - name: "Install Pnpm" - uses: "pnpm/action-setup@v2" - with: - version: "8" - - - name: "Install Node.js" - uses: "actions/setup-node@v3" - with: - cache: "pnpm" - node-version: "lts/*" + - name: "Install Bun" + uses: "oven-sh/setup-bun@v1" - name: "Install the Node.js dependencies" - run: "pnpm install" + run: "bun install" - name: "Show the Foundry config" run: "forge config" @@ -76,7 +60,7 @@ jobs: run: "./shell/prepare-artifacts.sh" - name: "Build the test contracts" - run: "FOUNDRY_PROFILE=test-optimized forge build" + run: "FOUNDRY_PROFILE=test-optimized forge build" - name: "Cache the build and the node modules so that they can be re-used by the other jobs" uses: "actions/cache/save@v3" @@ -195,7 +179,7 @@ jobs: runs-on: "ubuntu-latest" steps: - name: "Check out the repo" - uses: "actions/checkout@v3" + uses: "actions/checkout@v3" - name: "Restore the cached build and the node modules" uses: "actions/cache/restore@v3" diff --git a/.gitignore b/.gitignore index 30006812..bdad7088 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,5 @@ out .pnp.* lcov.info package-lock.json +pnpm-lock.yaml yarn.lock diff --git a/.prettierignore b/.prettierignore index 801408fa..4bd66a9d 100644 --- a/.prettierignore +++ b/.prettierignore @@ -16,6 +16,7 @@ test *.log .DS_Store .pnp.* +bun.lockb lcov.info package-lock.json pnpm-lock.yaml diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 52d437e0..9e5f1fbb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -14,7 +14,7 @@ You will need the following software on your machine: - [Git](https://git-scm.com/downloads) - [Foundry](https://github.com/foundry-rs/foundry) - [Node.Js](https://nodejs.org/en/download/) -- [Pnpm](https://pnpm.io/) +- [Bun](https://bun.sh) In addition, familiarity with [Solidity](https://soliditylang.org/) is requisite. @@ -29,7 +29,7 @@ $ git clone --recurse-submodules -j8 git@github.com:sablier-labs/v2-periphery.gi Then, inside the project's directory, run this to install the Node.js dependencies: ```shell -$ pnpm install +$ bun install ``` Now you can start making changes. @@ -48,7 +48,6 @@ When making a pull request, ensure that: - Gas snapshots are provided and demonstrate an improvement (or an acceptable deficit given other improvements). - Reference contracts are modified correspondingly if relevant. - New tests are included for all new features or code paths. -- If making a modification to third-party Node.js dependencies, `pnpm audit` passes. - A descriptive summary of the PR has been provided. ## Environment Variables diff --git a/README.md b/README.md index 4425b4ce..bda4176d 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,10 @@ In-depth documentation is available at [docs.sablier.com](https://docs.sablier.c This is the recommended approach. -Install Sablier V2 Periphery as a Node.js package: +Install Sablier V2 Periphery using your favorite package manager, e.g., with Bun: ```shell -yarn add @sablier/v2-periphery +bun add @sablier/v2-periphery ``` Then, if you are using Foundry, add these to your `remappings.txt` file: @@ -36,6 +36,8 @@ Then, if you are using Foundry, add these to your `remappings.txt` file: ### Git Submodules +This installation method is not recommended, but it is available for those who prefer it. + First, install the submodule using Forge: ```sh diff --git a/bun.lockb b/bun.lockb new file mode 100755 index 0000000000000000000000000000000000000000..47adad30ae5cb275f714732bb2d2d87ed4aac712 GIT binary patch literal 43293 zcmeIb2|U!__dh-~g!Upyh4wIZSrS5NQ7KeH8VtrVGtCTA5~W>5Qk3>pT4FID)I~lBkxUmn}mTuJzrg2I=%e9zSe04 z$Jyu3SWX?+b;*SQ*L#)=w?ZKZVoAhM`YDc+-gg&CFQ`b3!H5H5w1!v!u`W$9tAP-FNJcgAZCX|0y={c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|tYh;)J4g{&KC|m3=>kJa#f&d0aFs0)#lWjzj zcQC*qxv1aM$S{~XIe@M1npy_>Vr_o78-f=X0z9^m`E>GANr3w)rC!y3>@eI21hC*_ zRHg!cEQpXla5k!eQ+iG$qh8t}E%4Ir!2C>MfI(++!v%by7|u;NqG0N@mwF;YYh>ZtL#;pl@SrAZ zCa5b7mDF9s=xg}+p}t0n6%KMF4}{bUHx$p_kL||^1JU8=F;ECcQPf;7VdF${cq~7T z7~VdxsF!JQw8!I!;6ye6rmwJwaGtE)`ajBo1pi0_E#n(8*+WdGNPsFcAMCE-GbHk= z5WvVK)&JCk8cddKp^zQT70H@6Xr%y!c1InEH?(5@qZ66KpNZ(%Wj3_Bo|h3JUs^fAMT-k zD=@ppAmH(D9edqba6`OOd#N)6K&ZQxSc_zPD;eFvoG^IB$BKllD?C8Lp*J@GPJ_6C z@cIvya_YQF)<~`^1GUs$H){GJV*b8<6#VzO*c5#6+<+$Ob1VSTZ=o-x)41dX8!Mb2 z5J5c(Q%`PqoGrsd$nzc+17P}XquT#NodEE|J!Pbnnfb$?W8lj>S)EW<24L#0p>=qM z(vY1=UnwFddA*1aLDH9EGTKi~9mqyaA-Gj<==}W0`2bjdOu!CpP+&4E05`d8l(uo{ zmS|W6th76rf*WqDffeFJ{rcZptcayngoAmgYP#bQ!O_z zT85@2<$rwV05UcwN0^q3^@YMJ72rc>4;(zbo{|8X?5kdd} literal 0 HcmV?d00001 diff --git a/package.json b/package.json index 3adac6a0..b7bad1e6 100644 --- a/package.json +++ b/package.json @@ -61,14 +61,14 @@ "clean": "rm -rf artifacts broadcast cache docs out-optimized out", "gas:report": "forge test --gas-report --no-match-test \"test(Fuzz)?_RevertWhen_\\w{1,}?\"", "gas:snapshot": "forge snapshot --no-match-test \"test(Fuzz)?_RevertWhen_\\w{1,}?\"", - "gas:snapshot:optimized": "pnpm build:optimized && FOUNDRY_PROFILE=test-optimized forge snapshot --no-match-test \"test(Fork)?(Fuzz)?_RevertWhen_\\w{1,}?\"", - "lint": "pnpm lint:sol && pnpm prettier:check", - "lint:sol": "forge fmt --check && pnpm solhint \"{script,src,test}/**/*.sol\"", - "prepack": "pnpm install && bash ./shell/prepare-artifacts.sh", + "gas:snapshot:optimized": "bun run build:optimized && FOUNDRY_PROFILE=test-optimized forge snapshot --no-match-test \"test(Fork)?(Fuzz)?_RevertWhen_\\w{1,}?\"", + "lint": "bun run lint:sol && bun run prettier:check", + "lint:sol": "forge fmt --check && bun solhint \"{script,src,test}/**/*.sol\"", + "prepack": "bun install && bash ./shell/prepare-artifacts.sh", "prettier:check": "prettier --check \"**/*.{json,md,yml}\"", "prettier:write": "prettier --write \"**/*.{json,md,yml}\"", "test": "forge test", "test:lite": "FOUNDRY_PROFILE=lite forge test", - "test:optimized": "pnpm build:optimized && FOUNDRY_PROFILE=test-optimized forge test" + "test:optimized": "bun run build:optimized && FOUNDRY_PROFILE=test-optimized forge test" } } diff --git a/shell/prepare-artifacts.sh b/shell/prepare-artifacts.sh index 671063fa..e417fdd2 100755 --- a/shell/prepare-artifacts.sh +++ b/shell/prepare-artifacts.sh @@ -5,7 +5,7 @@ # Pre-requisites: # - foundry (https://getfoundry.sh) -# - pnpm (https://pnpm.io) +# - bun (https://bun.sh) # Strict mode: https://gist.github.com/vncsna/64825d5609c146e80de8b1fd623011ca set -euo pipefail @@ -40,4 +40,4 @@ libraries=./artifacts/libraries cp out-optimized/Errors.sol/Errors.json $libraries # Format the artifacts with Prettier -pnpm prettier --write ./artifacts +bun prettier --write ./artifacts From 44c82eeac960ac2e1315bae6c144f10368821105 Mon Sep 17 00:00:00 2001 From: Paul Razvan Berg Date: Mon, 1 Jan 2024 11:49:29 +0200 Subject: [PATCH 2/2] docs: add more context in contributing guide --- CONTRIBUTING.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9e5f1fbb..17248ea3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,14 +26,21 @@ Clone this repository including submodules: $ git clone --recurse-submodules -j8 git@github.com:sablier-labs/v2-periphery.git ``` -Then, inside the project's directory, run this to install the Node.js dependencies: +Then, inside the project's directory, run this to install the Node.js dependencies and build the contracts: ```shell $ bun install +$ bun run build ``` Now you can start making changes. +To see a list of all available scripts: + +```shell +$ bun run +``` + ## Pull Requests When making a pull request, ensure that: