Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(repo): Change from PNPM to Bun #400

Merged
merged 7 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 11 additions & 13 deletions .github/actions/setup-node/action.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Setup Node & PNPM
description: Install NodeJS and PNPM tooling
name: Setup Node & Bun
description: Install NodeJS and Bun tooling

runs:
using: composite
Expand All @@ -8,19 +8,17 @@ runs:
uses: actions/setup-node@v4
with:
node-version: 22.11.0
- uses: pnpm/action-setup@v4
name: Install pnpm
- uses: oven-sh/setup-bun@v1
name: Install Bun
with:
version: 10.2.0
run_install: true
- name: Get pnpm store directory
bun-version: 1.0.30
- name: Install dependencies
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
run: bun install
- uses: actions/cache@v4
name: Setup pnpm cache
name: Setup Bun cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lockb') }}
restore-keys: |-
${{ runner.os }}-pnpm-store-
${{ runner.os }}-bun-
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
- name: Install Python
uses: actions/setup-python@v5

- name: Setup Node && PNPM
- name: Setup Node && Bun
uses: ./.github/actions/setup-node

- name: Run Pre Commit
Expand All @@ -97,17 +97,17 @@ jobs:
with:
fetch-depth: 0

- name: Setup Node && PNPM
- name: Setup Node && Bun
uses: ./.github/actions/setup-node

- name: Validate current commit (last commit) with commitlint
if: github.event_name == 'push'
run: pnpm commitlint --last --verbose
run: bun x commitlint --last --verbose

- name: Validate PR commits with commitlint
if: github.event_name == 'pull_request'
run: |
pnpm commitlint \
bun x commitlint \
--from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} \
--to ${{ github.event.pull_request.head.sha }} \
--verbose
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
with:
toolchain: ${{ env.RUST_NIGHTLY_VERSION }}

- name: Setup Node && PNPM
- name: Setup Node && Bun
uses: ./.github/actions/setup-node

- name: Check for typos
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/release-plz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,26 @@ jobs:
target: x86_64-unknown-linux-gnu,wasm32-unknown-unknown

- name: Run release-plz
id: release-plz
uses: release-plz/action@v0.5
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

- name: Update README in the release PR
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ steps.release-plz.outputs.pr }}
run: |-
set -e

pr_number=${{ fromJSON(steps.release-plz.outputs.pr).number }}
if [[ -n "$pr_number" ]]; then
gh pr checkout $pr_number
make fmt
git add .
git commit -m "ci(repo): Format files in the release PR"
git push
fi
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ default_stages:
exclude: |
(?x)^(
CHANGELOG.md|
pnpm-lock.yaml|
bun.lockb|
cluster/charts|
node_modules|
target
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pnpm-lock.yaml
bun.lockb
cluster/charts
2 changes: 1 addition & 1 deletion .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ extend-exclude = [
"crates/sv-webserver/README.md",
"docker/chain-config",
"docker/monitoring",
"pnpm-lock.yaml",
"bun.lockb",
]
15 changes: 5 additions & 10 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,22 @@

## [0.0.24](https://github.com/FuelLabs/data-systems/compare/v0.0.23...v0.0.24) - 2025-02-04





### ⭐ Features

- *(repo)*: Added API key rate limiting on active ws sessions (#398) ([5f02830](https://github.com/FuelLabs/data-systems/commit/5f02830cf76051f4f8395cd84874a7a3586db8dd) @0xterminator)
- _(repo)_: Added API key rate limiting on active ws sessions (#398) ([5f02830](https://github.com/FuelLabs/data-systems/commit/5f02830cf76051f4f8395cd84874a7a3586db8dd) @0xterminator)

### 🐛 Bug Fixes

- *(repo)*: Bump fuel-core to v0.40.4 ([49ee9e9](https://github.com/FuelLabs/data-systems/commit/49ee9e9d366bc5c1f79a5ff360b3ebf6f29334f8) @pedronauck)
- _(repo)_: Bump fuel-core to v0.40.4 ([49ee9e9](https://github.com/FuelLabs/data-systems/commit/49ee9e9d366bc5c1f79a5ff360b3ebf6f29334f8) @pedronauck)

### 📚 Documentation

- *(repo)*: Change Fuel logo on READMEs ([9b50b8f](https://github.com/FuelLabs/data-systems/commit/9b50b8f207296edbabfca80d3e25f0776a3e882c) @pedronauck)
- _(repo)_: Change Fuel logo on READMEs ([9b50b8f](https://github.com/FuelLabs/data-systems/commit/9b50b8f207296edbabfca80d3e25f0776a3e882c) @pedronauck)

### 💪🏼 Contributors

* @pedronauck
* @0xterminator

- @pedronauck
- @0xterminator

Want to contribute? Check out our [CONTRIBUTING.md](./CONTRIBUTING.md) guide!

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Most projects under the umbrella of data systems are written in Rust, so we pref
- [Rust](https://www.rust-lang.org/tools/install) (version 1.84.0)
- [Rust Nightly](https://rust-lang.github.io/rustup/concepts/channels.html) (version nightly-2025-01-24)
- [NodeJS](https://nodejs.org/en/download/) (version >=22.11.0)
- [PNPM](https://pnpm.io/installation) (version 10.2.0)
- [Bun](https://bun.sh/docs/installation) (version 1.0.30)
- [Make](https://www.gnu.org/software/make/)
- [Pre-commit](https://pre-commit.com/#install)
- [NATS](https://nats.io/download/)
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ fmt-rust:
cargo +$(RUST_NIGHTLY_VERSION) fmt --all -- --color always

fmt-prettier:
pnpm prettier:fix
bun run prettier:fix

fmt-markdown:
pnpm md:fix
bun run md:fix

lint: lint-cargo lint-rust lint-clippy lint-prettier lint-markdown lint-machete

Expand All @@ -167,10 +167,10 @@ lint-clippy:
cargo clippy --workspace --all-targets --all-features -- -D warnings

lint-prettier:
pnpm prettier:validate
bun run prettier:validate

lint-markdown:
pnpm md:lint
bun run md:lint

lint-machete:
cargo machete --skip-target-dir
Expand Down Expand Up @@ -316,7 +316,9 @@ setup-db:
# I removed this for now because it was not working on CI
# @cargo sqlx prepare --workspace -- --all-features

reset-db: clean-docker start-docker setup-db
reset-db: clean-docker start-docker
@sleep 1
@$(MAKE) setup-db

# ------------------------------------------------------------
# Local cluster (Minikube)
Expand Down
Loading
Loading