mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-08 06:03:03 -04:00
testing bun migration
This commit is contained in:
parent
608ffa0764
commit
6f558aa561
6 changed files with 156 additions and 5415 deletions
34
.github/workflows/build.yml
vendored
34
.github/workflows/build.yml
vendored
|
@ -10,76 +10,58 @@ env:
|
||||||
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
GITHUB_TOKEN: ${{ secrets.ETOKEN }}
|
||||||
REPO: Equicord/Equibored
|
REPO: Equicord/Equibored
|
||||||
USERNAME: GitHub-Actions
|
USERNAME: GitHub-Actions
|
||||||
|
|
||||||
permissions: write-all
|
permissions: write-all
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Build:
|
Build:
|
||||||
name: Build Equicord
|
name: Build Equicord
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
- uses: oven-sh/setup-bun@v2
|
||||||
- uses: pnpm/action-setup@v3
|
with:
|
||||||
|
bun-version: latest
|
||||||
- name: Use Node.js 20
|
- name: Use Node.js 20
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: "pnpm"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --no-frozen-lockfile
|
run: bun install
|
||||||
|
|
||||||
- name: Build web
|
- name: Build web
|
||||||
run: pnpm buildWebStandalone
|
run: bun run buildWebStandalone
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: pnpm buildStandalone
|
run: bun run buildStandalone
|
||||||
|
|
||||||
- name: Generate plugin list
|
- name: Generate plugin list
|
||||||
run: pnpm generatePluginJson dist/plugins.json
|
run: bun run generatePluginJson dist/plugins.json
|
||||||
|
|
||||||
- name: Generate Equicord plugin list
|
- name: Generate Equicord plugin list
|
||||||
run: pnpm generateEquicordPluginJson dist/equicordplugins.json
|
run: bun run generateEquicordPluginJson dist/equicordplugins.json
|
||||||
|
|
||||||
- name: Collect files to be released
|
- name: Collect files to be released
|
||||||
run: |
|
run: |
|
||||||
cd dist
|
cd dist
|
||||||
mkdir release
|
mkdir release
|
||||||
|
|
||||||
cp browser/browser.* release
|
cp browser/browser.* release
|
||||||
cp Vencord.user.{js,js.LEGAL.txt} release
|
cp Vencord.user.{js,js.LEGAL.txt} release
|
||||||
|
|
||||||
# copy the plugin data jsons, the extension zips and the desktop/vesktop asars
|
# copy the plugin data jsons, the extension zips and the desktop/vesktop asars
|
||||||
cp *.{json,zip,asar} release
|
cp *.{json,zip,asar} release
|
||||||
|
|
||||||
# legacy un-asared files
|
# legacy un-asared files
|
||||||
cp desktop/* release
|
cp desktop/* release
|
||||||
for file in equibop/*; do
|
for file in equibop/*; do
|
||||||
filename=$(basename "$file")
|
filename=$(basename "$file")
|
||||||
cp "$file" "release/equibop${filename^}"
|
cp "$file" "release/equibop${filename^}"
|
||||||
done
|
done
|
||||||
|
|
||||||
find release -size 0 -delete
|
find release -size 0 -delete
|
||||||
rm release/package.json
|
rm release/package.json
|
||||||
rm release/*.map
|
rm release/*.map
|
||||||
|
|
||||||
- name: Upload Equicord Stable
|
- name: Upload Equicord Stable
|
||||||
if: ${{ github.ref_name == 'main' }}
|
if: ${{ github.ref_name == 'main' }}
|
||||||
run: |
|
run: |
|
||||||
gh release upload latest --clobber dist/release/*
|
gh release upload latest --clobber dist/release/*
|
||||||
|
|
||||||
- name: Upload Plugins JSON to Equibored repo
|
- name: Upload Plugins JSON to Equibored repo
|
||||||
run: |
|
run: |
|
||||||
git config --global user.name "GitHub-Actions"
|
git config --global user.name "GitHub-Actions"
|
||||||
git config --global user.email actions@github.com
|
git config --global user.email actions@github.com
|
||||||
git clone https://$USERNAME:$GITHUB_TOKEN@github.com/$REPO.git plugins
|
git clone https://$USERNAME:$GITHUB_TOKEN@github.com/$REPO.git plugins
|
||||||
cd plugins
|
cd plugins
|
||||||
|
|
||||||
cp ../dist/release/*plugins.json .
|
cp ../dist/release/*plugins.json .
|
||||||
git add -A
|
git add -A
|
||||||
|
|
||||||
git commit -m "Plugins for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
git commit -m "Plugins for https://github.com/$GITHUB_REPOSITORY/commit/$GITHUB_SHA"
|
||||||
git push --force https://$USERNAME:$GITHUB_TOKEN@github.com/$REPO.git
|
git push --force https://$USERNAME:$GITHUB_TOKEN@github.com/$REPO.git
|
||||||
|
|
20
.github/workflows/test.yml
vendored
20
.github/workflows/test.yml
vendored
|
@ -8,30 +8,24 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- dev
|
- dev
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Test:
|
Test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- 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
|
- name: Use Node.js 20
|
||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20
|
node-version: 20
|
||||||
cache: "pnpm"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pnpm install --no-frozen-lockfile
|
run: bun install
|
||||||
|
|
||||||
- name: Lint & Test if desktop version compiles
|
- name: Lint & Test if desktop version compiles
|
||||||
run: pnpm test
|
run: bun run test
|
||||||
|
|
||||||
- name: Test if web version compiles
|
- name: Test if web version compiles
|
||||||
run: pnpm buildWeb
|
run: bun run buildWeb
|
||||||
|
|
||||||
- name: Test if plugin structure is valid
|
- name: Test if plugin structure is valid
|
||||||
run: pnpm generatePluginJson
|
run: bun run generatePluginJson
|
||||||
|
|
27
.vscode/tasks.json
vendored
27
.vscode/tasks.json
vendored
|
@ -6,7 +6,7 @@
|
||||||
{
|
{
|
||||||
"label": "Build",
|
"label": "Build",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pnpm build",
|
"command": "bun run build",
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build",
|
"kind": "build",
|
||||||
"isDefault": true
|
"isDefault": true
|
||||||
|
@ -16,7 +16,7 @@
|
||||||
// for use with the vencord companion extension
|
// for use with the vencord companion extension
|
||||||
"label": "Build Companion Reporter",
|
"label": "Build Companion Reporter",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pnpm build --dev --reporter --companion-test",
|
"command": "bun run build --dev --reporter --companion-test",
|
||||||
"presentation": {
|
"presentation": {
|
||||||
"echo": true,
|
"echo": true,
|
||||||
"reveal": "silent",
|
"reveal": "silent",
|
||||||
|
@ -28,32 +28,13 @@
|
||||||
{
|
{
|
||||||
"label": "Build Dev",
|
"label": "Build Dev",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pnpm build --dev",
|
"command": "bun run build --dev",
|
||||||
"group": "build"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// for use with the vencord companion extension
|
|
||||||
"label": "Build Companion Reporter",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "pnpm build --dev --reporter --companion-test",
|
|
||||||
"presentation": {
|
|
||||||
"echo": true,
|
|
||||||
"reveal": "silent",
|
|
||||||
"panel": "shared",
|
|
||||||
"showReuseMessage": true,
|
|
||||||
"clear": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"label": "Build Dev",
|
|
||||||
"type": "shell",
|
|
||||||
"command": "pnpm build --dev",
|
|
||||||
"group": "build"
|
"group": "build"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"label": "Watch",
|
"label": "Watch",
|
||||||
"type": "shell",
|
"type": "shell",
|
||||||
"command": "pnpm watch",
|
"command": "bun run watch",
|
||||||
"problemMatcher": [],
|
"problemMatcher": [],
|
||||||
"group": {
|
"group": {
|
||||||
"kind": "build"
|
"kind": "build"
|
||||||
|
|
66
package.json
66
package.json
|
@ -14,25 +14,25 @@
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"author": "Equicord",
|
"author": "Equicord",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/build.mjs",
|
"build": "bun run scripts/build/build.mjs",
|
||||||
"buildStandalone": "pnpm build --standalone",
|
"buildStandalone": "bun run build --standalone",
|
||||||
"buildWeb": "node --require=./scripts/suppressExperimentalWarnings.js scripts/build/buildWeb.mjs",
|
"buildWeb": "bun run scripts/build/buildWeb.mjs",
|
||||||
"buildWebStandalone": "pnpm buildWeb --standalone",
|
"buildWebStandalone": "bun run buildWeb --standalone",
|
||||||
"buildReporter": "pnpm buildWebStandalone --reporter --skip-extension",
|
"buildReporter": "bun run buildWebStandalone --reporter --skip-extension",
|
||||||
"buildReporterDesktop": "pnpm build --reporter",
|
"buildReporterDesktop": "bun run build --reporter",
|
||||||
"watch": "pnpm build --watch",
|
"watch": "bun run build --watch",
|
||||||
"dev": "pnpm watch",
|
"dev": "bun run watch",
|
||||||
"watchWeb": "pnpm buildWeb --watch",
|
"watchWeb": "bun run buildWeb --watch",
|
||||||
"generatePluginJson": "tsx scripts/generatePluginList.ts",
|
"generatePluginJson": "bun run scripts/generatePluginList.ts",
|
||||||
"generateEquicordPluginJson": "tsx scripts/generateEquicordPluginList.ts",
|
"generateEquicordPluginJson": "bun run scripts/generateEquicordPluginList.ts",
|
||||||
"generateTypes": "tspc --emitDeclarationOnly --declaration --outDir packages/vencord-types --allowJs false",
|
"generateTypes": "tspc --emitDeclarationOnly --declaration --outDir packages/vencord-types --allowJs false",
|
||||||
"inject": "node scripts/runInstaller.mjs -- --install",
|
"inject": "bun run scripts/runInstaller.mjs --install",
|
||||||
"uninject": "node scripts/runInstaller.mjs -- --uninstall",
|
"uninject": "bun run scripts/runInstaller.mjs --uninstall",
|
||||||
"lint": "eslint",
|
"lint": "eslint",
|
||||||
"lint-styles": "stylelint \"src/**/*.css\" --ignore-pattern src/userplugins",
|
"lint-styles": "stylelint \"src/**/*.css\" --ignore-pattern src/userplugins",
|
||||||
"lint:fix": "pnpm lint --fix",
|
"lint:fix": "bun run lint --fix",
|
||||||
"test": "pnpm buildStandalone && pnpm testTsc && pnpm lint:fix && pnpm lint-styles && pnpm generatePluginJson",
|
"test": "bun run buildStandalone && bun run testTsc && bun run lint:fix && bun run lint-styles && bun run generatePluginJson",
|
||||||
"testWeb": "pnpm lint && pnpm buildWeb && pnpm testTsc",
|
"testWeb": "bun run lint && bun run buildWeb && bun run testTsc",
|
||||||
"testTsc": "tsc --noEmit"
|
"testTsc": "tsc --noEmit"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -57,8 +57,8 @@
|
||||||
"virtual-merge": "^1.0.1"
|
"virtual-merge": "^1.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@stylistic/eslint-plugin": "^4.2.0",
|
|
||||||
"@electron/asar": "^3.2.10",
|
"@electron/asar": "^3.2.10",
|
||||||
|
"@stylistic/eslint-plugin": "^4.2.0",
|
||||||
"@types/chrome": "^0.0.312",
|
"@types/chrome": "^0.0.312",
|
||||||
"@types/diff": "^7.0.2",
|
"@types/diff": "^7.0.2",
|
||||||
"@types/lodash": "^4.17.14",
|
"@types/lodash": "^4.17.14",
|
||||||
|
@ -84,39 +84,17 @@
|
||||||
"stylelint-config-standard": "^37.0.0",
|
"stylelint-config-standard": "^37.0.0",
|
||||||
"ts-patch": "^3.3.0",
|
"ts-patch": "^3.3.0",
|
||||||
"ts-pattern": "^5.6.0",
|
"ts-pattern": "^5.6.0",
|
||||||
"tsx": "^4.19.3",
|
"type-fest": "^4.41.0",
|
||||||
"type-fest": "^4.38.0",
|
|
||||||
"typed-emitter": "^2.1.0",
|
|
||||||
"typescript": "^5.8.2",
|
"typescript": "^5.8.2",
|
||||||
"typescript-eslint": "^8.28.0",
|
"typescript-eslint": "^8.28.0",
|
||||||
"typescript-transform-paths": "^3.5.5",
|
"typescript-transform-paths": "^3.5.5",
|
||||||
"zip-local": "^0.3.5",
|
"zip-local": "^0.3.5",
|
||||||
"zustand": "^3.7.2"
|
"zustand": "^3.7.2"
|
||||||
},
|
},
|
||||||
"packageManager": "pnpm@10.4.1",
|
"packageManager": "bun@1.1.0",
|
||||||
"pnpm": {
|
"trustedDependencies": ["esbuild"],
|
||||||
"patchedDependencies": {
|
|
||||||
"eslint@9.20.1": "patches/eslint@9.20.1.patch",
|
|
||||||
"@types/less@3.0.6": "patches/@types__less@3.0.6.patch"
|
|
||||||
},
|
|
||||||
"peerDependencyRules": {
|
|
||||||
"ignoreMissing": [
|
|
||||||
"eslint-plugin-import",
|
|
||||||
"eslint"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"allowedDeprecatedVersions": {
|
|
||||||
"source-map-resolve": "*",
|
|
||||||
"resolve-url": "*",
|
|
||||||
"source-map-url": "*",
|
|
||||||
"urix": "*",
|
|
||||||
"q": "*"
|
|
||||||
},
|
|
||||||
"onlyBuiltDependencies": [
|
|
||||||
"esbuild"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18"
|
"node": ">=18",
|
||||||
|
"bun": ">=1.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
5192
pnpm-lock.yaml
generated
5192
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
@ -1,2 +0,0 @@
|
||||||
packages:
|
|
||||||
- packages/*
|
|
Loading…
Add table
Add a link
Reference in a new issue