Move everything away from pnpm and use bun (#278)

* testing bun migration

* e

* try no node

* test noxos

* reporter?

* reporter2

* Fix Patches

* change readme(s)

* make readme simpler

* bleh

---------

Co-authored-by: thororen1234 <78185467+thororen1234@users.noreply.github.com>
This commit is contained in:
Creation's 2025-06-04 11:17:57 -04:00 committed by GitHub
parent 608ffa0764
commit fbd1d1b551
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 184 additions and 5492 deletions

View file

@ -10,76 +10,54 @@ env:
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
REPO: Equicord/Equibored
USERNAME: GitHub-Actions
permissions: write-all
jobs:
Build:
name: Build Equicord
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
- uses: oven-sh/setup-bun@v2
with:
node-version: 20
cache: "pnpm"
bun-version: latest
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: bun install
- name: Build web
run: pnpm buildWebStandalone
run: bun run buildWebStandalone
- name: Build
run: pnpm buildStandalone
run: bun run buildStandalone
- name: Generate plugin list
run: pnpm generatePluginJson dist/plugins.json
run: bun run generatePluginJson dist/plugins.json
- name: Generate Equicord plugin list
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
run: bun run generateEquicordPluginJson dist/equicordplugins.json
- name: Collect files to be released
run: |
cd dist
mkdir release
cp browser/browser.* release
cp Vencord.user.{js,js.LEGAL.txt} release
# copy the plugin data jsons, the extension zips and the desktop/vesktop asars
cp *.{json,zip,asar} release
# legacy un-asared files
cp desktop/* release
for file in equibop/*; do
filename=$(basename "$file")
cp "$file" "release/equibop${filename^}"
done
find release -size 0 -delete
rm release/package.json
rm release/*.map
- name: Upload Equicord Stable
if: ${{ github.ref_name == 'main' }}
run: |
gh release upload latest --clobber dist/release/*
- name: Upload Plugins JSON to Equibored repo
run: |
git config --global user.name "GitHub-Actions"
git config --global user.email actions@github.com
git clone https://$USERNAME:$GITHUB_TOKEN@github.com/$REPO.git plugins
cd plugins
cp ../dist/release/*plugins.json .
git add -A
git commit -m "Plugins for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
git push --force https://$USERNAME:$GITHUB_TOKEN@github.com/$REPO.git

View file

@ -16,56 +16,39 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
- name: Use Node.js 20
uses: actions/setup-node@v4
- uses: oven-sh/setup-bun@v2
with:
node-version: 20
cache: "pnpm"
bun-version: latest
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: bun install
- name: Build web
run: pnpm buildWebStandalone
run: bun run buildWebStandalone
- name: Build
run: pnpm buildStandalone
run: bun run buildStandalone
- name: Generate plugin list
run: pnpm generatePluginJson dist/vencordplugins.json
run: bun run generatePluginJson dist/vencordplugins.json
- name: Generate Equicord plugin list
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
run: bun run generateEquicordPluginJson dist/equicordplugins.json
- name: Collect files to be released
run: |
cd dist
mkdir release
cp browser/browser.* release
cp Vencord.user.{js,js.LEGAL.txt} release
# copy the plugin data jsons, the extension zips and the desktop/vesktop asars
cp *.{json,zip,asar} release
# legacy un-asared files
cp desktop/* release
for file in equibop/*; do
filename=$(basename "$file")
cp "$file" "release/equibop${filename^}"
done
find release -size 0 -delete
rm release/package.json
rm release/*.map
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Upload Equicord Stable
run: |
gh release create ${{ steps.date.outputs.date }} --latest=false

View file

@ -32,17 +32,14 @@ jobs:
- uses: actions/checkout@v4
if: ${{ github.event_name == 'workflow_dispatch' }}
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
- uses: oven-sh/setup-bun@v2
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
bun-version: latest
- name: Install dependencies
run: |
pnpm install --no-frozen-lockfile
bun install
- name: Install Google Chrome
id: setup-chrome
@ -51,7 +48,7 @@ jobs:
chrome-version: stable
- name: Build Equicord Reporter Version
run: pnpm buildReporter
run: bun run buildReporter
- name: Run Reporter
timeout-minutes: 10
@ -59,7 +56,7 @@ jobs:
export PATH="$PWD/node_modules/.bin:$PATH"
export CHROMIUM_BIN=${{ steps.setup-chrome.outputs.chrome-path }}
esbuild scripts/generateReport.ts > dist/report.mjs
bun build scripts/generateReport.ts --outfile dist/report.mjs --target bun
stable_output_file=$(mktemp)
canary_output_file=$(mktemp)
@ -72,20 +69,20 @@ jobs:
fi
if [[ "$branch" = "both" || "$branch" = "stable" ]]; then
node dist/report.mjs > "$stable_output_file" &
bun run dist/report.mjs > "$stable_output_file" &
pids+=" $!"
fi
if [[ "$branch" = "both" || "$branch" = "canary" ]]; then
USE_CANARY=true node dist/report.mjs > "$canary_output_file" &
USE_CANARY=true bun run dist/report.mjs > "$canary_output_file" &
pids+=" $!"
fi
exit_code=0
for pid in $pids; do
if ! wait "$pid"; then
exit_code=1
fi
if ! wait "$pid"; then
exit_code=1
fi
done
cat "$stable_output_file" "$canary_output_file" >> $GITHUB_STEP_SUMMARY

View file

@ -8,30 +8,24 @@ on:
branches:
- main
- dev
jobs:
Test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3 # Install pnpm using packageManager key in package.json
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install --no-frozen-lockfile
run: bun install
- name: Lint & Test if desktop version compiles
run: pnpm test
run: bun run test
- name: Test if web version compiles
run: pnpm buildWeb
run: bun run buildWeb
- name: Test if plugin structure is valid
run: pnpm generatePluginJson
run: bun run generatePluginJson