Skip to content

Commit cbab79e

Browse files
authored
new: Migrate to Vite+ for JS dev. (#2558)
* Update vite. * Migrate. * Update fmt. * Start on lint. * Update test. * Update globals. * Update typescript. * Add pack. * Fix types. * Add lint. * Remove files. * Update yarn. * Polish. * Polish. * Better config. * Update paths. * Polish. * Update CI. * Fixes. * Update agents. * Update website. * Fix visualizer. * Fixes. * Fix script. * Fix ignores.
1 parent f761198 commit cbab79e

142 files changed

Lines changed: 3951 additions & 10138 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/doc-coauthoring/SKILL.md

Lines changed: 133 additions & 69 deletions
Large diffs are not rendered by default.

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ mjs/
2323
umd/
2424

2525
# Artifacts
26-
.eslintcache
2726
*.map
2827
*.min.js
2928
*.tsbuildinfo

.github/copilot-instructions.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/workflows/benchmark.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ env:
2626
jobs:
2727
bench:
2828
name: Bench
29-
if: github.event_name == 'workflow_dispatch' ||
30-
github.event_name == 'pull_request' ||
31-
github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/develop-'))
29+
if: github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request' ||
30+
github.event_name == 'push' && (github.ref == 'refs/heads/master' || startsWith(github.ref,
31+
'refs/heads/develop-'))
3232
# || github.event.issue.pull_request && contains(github.event.comment.body, '!benchmark')
3333
strategy:
3434
fail-fast: false

.github/workflows/docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v6
1212
- uses: actions/setup-node@v6
13+
- uses: voidzero-dev/setup-vp@v1
1314
- run: yarn install --immutable
1415
- run: bash ./scripts/release/buildPackages.sh
1516
- uses: peaceiris/actions-gh-pages@v4

.github/workflows/moon.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,19 +35,20 @@ jobs:
3535
with:
3636
fetch-depth: 0
3737
- uses: actions/setup-node@v6
38+
- uses: voidzero-dev/setup-vp@v1
3839
- uses: arduino/setup-protoc@v3
3940
with:
4041
repo-token: ${{ secrets.GITHUB_TOKEN }}
4142
- uses: moonrepo/setup-rust@v1
4243
with:
43-
cache-base: "^(master|develop-)"
44-
- run: cargo run -- --color --log trace ci --base ${{ github.base_ref || 'master' }}
44+
cache-base: '^(master|develop-)'
45+
- run: cargo run -- --color --log debug ci --base ${{ github.base_ref || 'master' }}
4546
env:
4647
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}
4748
MOON_DEBUG_DAEMON: true
4849
MOON_DEBUG_REMOTE: true
4950
MOON_DEBUG_PROCESS_ENV: true
50-
RUST_BACKTRACE: "1"
51+
RUST_BACKTRACE: '1'
5152
- run: cat .moon/cache/daemon/server.log
5253
if: failure()
5354
- uses: moonrepo/run-report-action@v1
@@ -77,7 +78,7 @@ jobs:
7778
# Non-staged
7879
- run: ./target/debug/moon docker scaffold website --log trace
7980
env:
80-
MOON_SKIP_SETUP_TOOLCHAIN: "*"
81+
MOON_SKIP_SETUP_TOOLCHAIN: '*'
8182
- uses: depot/build-push-action@v1
8283
with:
8384
context: .

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ name: PR
22
on:
33
pull_request:
44
env:
5-
MOON_DEBUG: "true"
6-
PROTO_DEBUG: "true"
5+
MOON_DEBUG: 'true'
6+
PROTO_DEBUG: 'true'
77
jobs:
88
installer:
99
name: Install script check

.github/workflows/publish-npm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
with:
2121
node-version: 24
2222
registry-url: https://registry.npmjs.org
23+
- uses: voidzero-dev/setup-vp@v1
2324
- name: Install dependencies
2425
run: yarn install --immutable
2526
- name: Build packages

.github/workflows/release.yml

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,12 @@ on:
4848
push:
4949
tags:
5050
# Only release for the CLI crate
51-
- "v[0-9]+.[0-9]+.[0-9]+*"
51+
- 'v[0-9]+.[0-9]+.[0-9]+*'
5252

5353
jobs:
5454
# Run 'dist plan' (or host) to determine what tasks we need to do
5555
plan:
56-
runs-on: "ubuntu-22.04"
56+
runs-on: 'ubuntu-22.04'
5757
outputs:
5858
val: ${{ steps.plan.outputs.manifest }}
5959
tag: ${{ !github.event.pull_request && github.ref_name || '' }}
@@ -70,7 +70,9 @@ jobs:
7070
# we specify bash to get pipefail; it guards against the `curl` command
7171
# failing. otherwise `sh` won't catch that `curl` returned non-0
7272
shell: bash
73-
run: "curl --proto '=https' --tlsv1.2 -LsSf https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3/cargo-dist-installer.sh | sh"
73+
run: "curl --proto '=https' --tlsv1.2 -LsSf
74+
https://github.com/axodotdev/cargo-dist/releases/download/v0.30.3/cargo-dist-installer.sh
75+
| sh"
7476
- name: Cache dist
7577
uses: actions/upload-artifact@v6
7678
with:
@@ -87,7 +89,7 @@ jobs:
8789
echo "dist ran successfully"
8890
cat plan-dist-manifest.json
8991
echo "manifest=$(jq -c "." plan-dist-manifest.json)" >> "$GITHUB_OUTPUT"
90-
- name: "Upload dist-manifest.json"
92+
- name: 'Upload dist-manifest.json'
9193
uses: actions/upload-artifact@v6
9294
with:
9395
name: artifacts-plan-dist-manifest
@@ -99,7 +101,9 @@ jobs:
99101
# Let the initial task tell us to not run (currently very blunt)
100102
needs:
101103
- plan
102-
if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null && (needs.plan.outputs.publishing == 'true' || fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
104+
if: ${{ fromJson(needs.plan.outputs.val).ci.github.artifacts_matrix.include != null &&
105+
(needs.plan.outputs.publishing == 'true' ||
106+
fromJson(needs.plan.outputs.val).ci.github.pr_run_mode == 'upload') }}
103107
strategy:
104108
fail-fast: false
105109
# Target platforms/runners are computed by dist in create-release.
@@ -170,7 +174,7 @@ jobs:
170174
echo "EOF" >> "$GITHUB_OUTPUT"
171175
172176
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
173-
- name: "Upload artifacts"
177+
- name: 'Upload artifacts'
174178
uses: actions/upload-artifact@v6
175179
with:
176180
name: artifacts-build-local-${{ join(matrix.targets, '_') }}
@@ -183,7 +187,7 @@ jobs:
183187
needs:
184188
- plan
185189
- build-local-artifacts
186-
runs-on: "ubuntu-22.04"
190+
runs-on: 'ubuntu-22.04'
187191
env:
188192
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
189193
BUILD_MANIFEST_NAME: target/distrib/global-dist-manifest.json
@@ -217,7 +221,7 @@ jobs:
217221
echo "EOF" >> "$GITHUB_OUTPUT"
218222
219223
cp dist-manifest.json "$BUILD_MANIFEST_NAME"
220-
- name: "Upload artifacts"
224+
- name: 'Upload artifacts'
221225
uses: actions/upload-artifact@v6
222226
with:
223227
name: artifacts-build-global
@@ -231,12 +235,15 @@ jobs:
231235
- build-local-artifacts
232236
- build-global-artifacts
233237
# Only run if we're "publishing", and only if plan, local and global didn't fail (skipped is fine)
234-
if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' && (needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result == 'success') && (needs.build-local-artifacts.result == 'skipped' || needs.build-local-artifacts.result == 'success') }}
238+
if: ${{ always() && needs.plan.result == 'success' && needs.plan.outputs.publishing == 'true' &&
239+
(needs.build-global-artifacts.result == 'skipped' || needs.build-global-artifacts.result ==
240+
'success') && (needs.build-local-artifacts.result == 'skipped' ||
241+
needs.build-local-artifacts.result == 'success') }}
235242
env:
236243
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
237244
permissions:
238245
contents: write # For GitHub releases
239-
runs-on: "ubuntu-22.04"
246+
runs-on: 'ubuntu-22.04'
240247
outputs:
241248
val: ${{ steps.host.outputs.manifest }}
242249
steps:
@@ -264,14 +271,14 @@ jobs:
264271
echo "artifacts uploaded and released successfully"
265272
cat dist-manifest.json
266273
echo "manifest=$(jq -c "." dist-manifest.json)" >> "$GITHUB_OUTPUT"
267-
- name: "Upload dist-manifest.json"
274+
- name: 'Upload dist-manifest.json'
268275
uses: actions/upload-artifact@v6
269276
with:
270277
# Overwrite the previous copy
271278
name: artifacts-dist-manifest
272279
path: dist-manifest.json
273280
# Create a GitHub Release while uploading all files to it
274-
- name: "Download GitHub Artifacts"
281+
- name: 'Download GitHub Artifacts'
275282
uses: actions/download-artifact@v7
276283
with:
277284
pattern: artifacts-*
@@ -283,10 +290,12 @@ jobs:
283290
rm -f artifacts/*-dist-manifest.json
284291
- name: Create GitHub Release
285292
env:
286-
PRERELEASE_FLAG: "${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease' || '' }}"
287-
ANNOUNCEMENT_TITLE: "${{ fromJson(steps.host.outputs.manifest).announcement_title }}"
288-
ANNOUNCEMENT_BODY: "${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}"
289-
RELEASE_COMMIT: "${{ github.sha }}"
293+
PRERELEASE_FLAG:
294+
"${{ fromJson(steps.host.outputs.manifest).announcement_is_prerelease && '--prerelease'
295+
|| '' }}"
296+
ANNOUNCEMENT_TITLE: '${{ fromJson(steps.host.outputs.manifest).announcement_title }}'
297+
ANNOUNCEMENT_BODY: '${{ fromJson(steps.host.outputs.manifest).announcement_github_body }}'
298+
RELEASE_COMMIT: '${{ github.sha }}'
290299
run: |
291300
# Write and read notes from a file to avoid quoting breaking things
292301
echo "$ANNOUNCEMENT_BODY" > $RUNNER_TEMP/notes.txt
@@ -315,8 +324,9 @@ jobs:
315324
# use "always() && ..." to allow us to wait for all publish jobs while
316325
# still allowing individual publish jobs to skip themselves (for prereleases).
317326
# "host" however must run to completion, no skipping allowed!
318-
if: ${{ always() && needs.host.result == 'success' && (needs.custom-release-npm.result == 'skipped' || needs.custom-release-npm.result == 'success') }}
319-
runs-on: "ubuntu-22.04"
327+
if: ${{ always() && needs.host.result == 'success' && (needs.custom-release-npm.result ==
328+
'skipped' || needs.custom-release-npm.result == 'success') }}
329+
runs-on: 'ubuntu-22.04'
320330
env:
321331
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
322332
steps:

.github/workflows/rust.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ jobs:
117117
# Windows runs out of disk space
118118
COVERAGE: ${{ needs.test-plan.outputs.coverage == 'true' && !contains(matrix.os, 'windows') }}
119119
# Temporary until we upgrade starbase
120-
GIT_AUTHOR_NAME: "Sandbox"
121-
GIT_AUTHOR_EMAIL: "fakeemail@somedomain.dev"
122-
GIT_COMMITTER_NAME: "Sandbox"
123-
GIT_COMMITTER_EMAIL: "fakeemail@somedomain.dev"
120+
GIT_AUTHOR_NAME: 'Sandbox'
121+
GIT_AUTHOR_EMAIL: 'fakeemail@somedomain.dev'
122+
GIT_COMMITTER_NAME: 'Sandbox'
123+
GIT_COMMITTER_EMAIL: 'fakeemail@somedomain.dev'
124124
steps:
125125
- uses: actions/checkout@v6
126126
- uses: arduino/setup-protoc@v3
@@ -136,7 +136,7 @@ jobs:
136136
with:
137137
auto-install: true
138138
cache: true
139-
proto-version: "0.57.4" # Keep in sync
139+
proto-version: '0.57.4' # Keep in sync
140140
env:
141141
PROTO_LOG: trace
142142
- uses: mozilla-actions/sccache-action@v0.0.9

0 commit comments

Comments
 (0)