[tgui] Replaces node with bun (#91359)

## About The Pull Request
Swaps out node & yarn in favor of [bun](https://bun.sh/)

![image](https://github.com/user-attachments/assets/3df68cdf-98ed-477b-a9b6-5072d0de27ed)

sub tasks
- [x] add bun setup script
- [x] fix tgui-dev-server (bun glob is different)
- [x] set juke to run bun
- [x] remove all yarn stuff 
- [x] convert all tests from vitest to bun 
- [x] fight with CI/tgs

## Why It's Good For The Game
Yarn has served us over the years as our package manager but the method
it bundles dependencies has lead to issues and setbacks, notably needing
to wait on rspack support, but more recently in trying to switch to
biome
1. I can add in packages that do not need these workarounds, like god
intended
2. We won't need to [keep around
sdks](https://yarnpkg.com/getting-started/editor-sdks) which rely on
yarn to even publish
3. We're not committing the yarn cache or .pnp file, which kind of
defeats the purpose
4. Native typescript support and testing
5. Because it'd be cool

## Caveats
Rspack was throwing errors on TGS while doing this. I needed to switch
back to webpack/swc, which seems to work flawlessly. It was too tiring
for anyone involved to debug and this was the simplest route. It adds a
completely negligible amount of time to build. It might even resolve
some issues elsewhere.

Making this switch extends that very first setup time! I'm working on
cutting it down, but as of right now, it takes about 80 seconds just for
TGUI to download all the packages. Afterwards, it's the same.
## Changelog
This commit is contained in:
Jeremiah
2025-06-16 14:03:23 -07:00
committed by Roxy
parent 0fe7ee1949
commit 4e1f33e5af
67 changed files with 2182 additions and 13491 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
if: steps.secrets_set.outputs.SECRETS_ENABLED
run: |
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci autowiki
tools/build/build.sh --ci autowiki
- name: Run Autowiki
if: steps.secrets_set.outputs.SECRETS_ENABLED
env:
+6 -6
View File
@@ -15,14 +15,14 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: ./.github/actions/setup_node
- name: Setup Bun
uses: ./.github/actions/setup_bun
- name: Restore BYOND from Cache
uses: ./.github/actions/restore_or_install_byond
- name: Compile All Maps
run: |
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS
tools/build/build.sh --ci dm -DCIBUILDING -DCITESTING -DALL_MAPS
- name: Check client Compatibility
uses: tgstation/byond-client-compatibility-check@v3
with:
@@ -36,11 +36,11 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: ./.github/actions/setup_node
- name: Setup Bun
uses: ./.github/actions/setup_bun
- name: Restore BYOND from Cache
uses: ./.github/actions/restore_or_install_byond
- name: Compile All Maps
run: |
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DCITESTING -DALL_TEMPLATES
tools/build/build.sh --ci dm -DCIBUILDING -DCITESTING -DALL_TEMPLATES
+3 -5
View File
@@ -17,10 +17,8 @@ jobs:
key: ${{ runner.os }}-spacemandmm-${{ hashFiles('dependencies.sh') }}
restore-keys: |
${{ runner.os }}-spacemandmm-
- name: Setup Node
uses: ./.github/actions/setup_node
with:
restore-yarn-cache: true
- name: Setup Bun
uses: ./.github/actions/setup_bun
- name: Restore Bootstrap cache
uses: actions/cache@v4
with:
@@ -103,4 +101,4 @@ jobs:
run: bash tools/ci/check_misc.sh
- name: Run TGUI Checks
if: steps.linter-setup.conclusion == 'success' && !cancelled()
run: tools/build/build --ci lint tgui-test
run: tools/build/build.sh --ci lint tgui-test
+3 -3
View File
@@ -15,8 +15,8 @@ jobs:
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: ./.github/actions/setup_node
- name: Setup Bun
uses: ./.github/actions/setup_bun
- name: Restore BYOND from Cache
uses: ./.github/actions/restore_or_install_byond
with:
@@ -25,7 +25,7 @@ jobs:
- name: Compile
run: |
source $HOME/BYOND/byond/bin/byondsetup
tools/build/build --ci dm -DCIBUILDING -DANSICOLORS -Werror -ITG0001 -I"loop_checks"
tools/build/build.sh --ci dm -DCIBUILDING -DANSICOLORS -Werror -ITG0001 -I"loop_checks"
- name: Setup variable for output path
run: |
OUTPUT_DIR="target"