Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
10 changes: 2 additions & 8 deletions .github/workflows/build-helper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,8 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
- name: Install Yarn
uses: nick-fields/retry@v3
with:
command: |
corepack enable
yarn install
timeout_minutes: 5
max_attempts: 3
- name: npm ci
run: npm ci
- name: Install Task
uses: arduino/setup-task@v2
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
- name: Install Yarn
run: |
corepack enable
yarn install
- name: npm ci
run: npm ci
- name: Install Task
uses: arduino/setup-task@v2
with:
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,8 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
- name: Install yarn
run: |
corepack enable
yarn install
- name: npm ci
run: npm ci

- name: Setup Go
uses: actions/setup-go@v6
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/deploy-docsite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ jobs:
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install yarn
run: |
corepack enable
yarn install
- name: npm ci
run: npm ci
- name: Build docsite
run: task docsite:build:public
- name: Upload Build Artifact
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/testdriver-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,8 @@ jobs:
- uses: actions/setup-node@v5
with:
node-version: ${{env.NODE_VERSION}}
- name: Install Yarn
uses: nick-fields/retry@v3
with:
command: |
corepack enable
yarn install
timeout_minutes: 5
max_attempts: 3
- name: npm ci
run: npm ci
- name: Install Task
uses: arduino/setup-task@v2
with:
Expand Down
2 changes: 0 additions & 2 deletions .roo/rules/rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ Wave Terminal is a modern terminal which provides graphical blocks, dynamic layo

It has a TypeScript/React frontend and a Go backend. They talk together over `wshrpc` a custom RPC protocol that is implemented over websocket (and domain sockets).

The frontend uses yarn (berry).

### Coding Guidelines

- **Go Conventions**:
Expand Down
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

19 changes: 1 addition & 18 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,7 @@ Make sure you have a NodeJS 22 LTS installed.

See NodeJS's website for platform-specific instructions: https://nodejs.org/en/download

### Yarn Modern

Once you have NodeJS installed, you'll need to enable Corepack so that Yarn Modern can work:

```sh
corepack enable
```

If your NodeJS distribution does not ship with Corepack, you can install it manually using NPM:

```sh
npm install -g corepack
corepack enable
```

Corepack's official documentation says to uninstall Yarn and PnPM first, but this is probably overkill. If you have any issues, try removing them from your system before continuing.

For more information on Corepack, check out [this link](https://yarnpkg.com/corepack).
We now use `npm`, so you can just run an `npm install` to install node dependencies.

## Clone the Repo

Expand Down
58 changes: 28 additions & 30 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ vars:
tasks:
electron:dev:
desc: Run the Electron application via the Vite dev server (enables hot reloading).
cmd: yarn dev
cmd: npm run dev
aliases:
- dev
deps:
- yarn
- npm:install
- docsite:build:embedded
- build:backend
env:
Expand All @@ -31,11 +31,11 @@ tasks:

electron:start:
desc: Run the Electron application directly.
cmd: yarn start
cmd: npm run start
aliases:
- start
deps:
- yarn
- npm:install
- docsite:build:embedded
- build:backend
env:
Expand All @@ -44,41 +44,41 @@ tasks:

electron:quickdev:
desc: Run the Electron application via the Vite dev server (quick dev - no docsite, arm64 only, no generate, no wsh).
cmd: yarn dev
cmd: npm run dev
deps:
- yarn
- npm:install
- build:backend:quickdev
env:
WCLOUD_ENDPOINT: "https://api-dev.waveterm.dev/central"
WCLOUD_WS_ENDPOINT: "wss://wsapi-dev.waveterm.dev/"

storybook:
desc: Start the Storybook server.
cmd: yarn storybook
cmd: npm run storybook
deps:
- yarn
- npm:install

storybook:build:
desc: Build the Storybook static site.
cmd: yarn build-storybook
cmd: npm run build-storybook
generates:
- storybook-static/**/*
deps:
- yarn
- npm:install

docsite:start:
desc: Start the docsite dev server.
cmd: yarn start
cmd: npm run start
dir: docs
aliases:
- docsite
deps:
- yarn
- npm:install

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
docsite:build:public:
desc: Build the full docsite.
cmds:
- cd docs && yarn build
- cd docs && npm run build
- task: copyfiles:'storybook-static':'docs/build/storybook'
sources:
- "docs/*"
Expand All @@ -89,7 +89,7 @@ tasks:
generates:
- "docs/build/**/*"
deps:
- yarn
- npm:install
- storybook:build

docsite:build:embedded:
Expand All @@ -102,18 +102,18 @@ tasks:
generates:
- "dist/docsite/**/*"
cmds:
- cd docs && yarn build-embedded
- cd docs && npm run build-embedded
- task: copyfiles:'docs/build/':'dist/docsite'
deps:
- yarn
- npm:install

package:
desc: Package the application for the current platform.
cmds:
- yarn build:prod && yarn electron-builder -c electron-builder.config.cjs -p never {{.CLI_ARGS}}
- npm run build:prod && npm exec electron-builder -- -c electron-builder.config.cjs -p never {{.CLI_ARGS}}
deps:
- clean
- yarn
- npm:install
- docsite:build:embedded
- build:backend

Expand Down Expand Up @@ -298,7 +298,7 @@ tasks:

outdated:
desc: Check for outdated packages using npm-check-updates.
cmd: yarn dlx npm-check-updates
cmd: npx npm-check-updates

version:
desc: Get the current package version, or bump version if args are present. To pass args to `version.cjs`, add them after `--`. See `version.cjs` for usage definitions for the arguments.
Expand Down Expand Up @@ -385,9 +385,9 @@ tasks:
init:
desc: Initialize the project for development.
cmds:
- yarn
- npm install
- go mod tidy
- cd docs && yarn
- cd docs && npm install

dev:cleardata:windows:
internal: true
Expand All @@ -404,18 +404,16 @@ tasks:
platforms: [darwin]
cmd: 'rm -rf ~/Library/Application\ Support/waveterm-dev'

yarn:
desc: Runs `yarn`
npm:install:
desc: Runs `npm install`
internal: true
generates:
- node_modules/**/*
- yarn.lock
- .yarn/*
- package-lock.json
sources:
- yarn.lock
- package-lock.json
- package.json
- .yarnrc.yml
cmd: yarn
cmd: npm install

go:mod:tidy:
desc: Runs `go mod tidy`
Expand Down Expand Up @@ -453,12 +451,12 @@ tasks:

tsunami:frontend:build:
desc: Build the tsunami frontend
cmd: yarn build
cmd: npm run build
dir: tsunami/frontend

tsunami:frontend:devbuild:
desc: Build the tsunami frontend in development mode (with source maps and symbols)
cmd: yarn build:dev
cmd: npm run build:dev
dir: tsunami/frontend

tsunami:scaffold:
Expand Down
4 changes: 0 additions & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ This is the home for Wave Terminal's documentation site. This README is specific

Our docs are built using [Docusaurus](https://docusaurus.io/), a modern static website generator.

```sh
yarn
```

### Local Development

```sh
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"docusaurus": "docusaurus",
"start": "docusaurus start",
"build": "USE_SIMPLE_CSS_MINIFIER=true docusaurus build",
"build-embedded": "EMBEDDED=true run build",
"build-embedded": "EMBEDDED=true npm run build",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
Expand Down
21 changes: 14 additions & 7 deletions electron.vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,28 @@
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "electron-vite";
import flow from "rollup-plugin-flow";
import { ViteImageOptimizer } from "vite-plugin-image-optimizer";
import { viteStaticCopy } from "vite-plugin-static-copy";
import svgr from "vite-plugin-svgr";
import tsconfigPaths from "vite-tsconfig-paths";

// from our electron build
const CHROME = "chrome140";
const NODE = "node22";

export default defineConfig({
main: {
root: ".",
build: {
target: NODE,
rollupOptions: {
input: {
index: "emain/emain.ts",
},
},
outDir: "dist/main",
},
plugins: [tsconfigPaths(), flow()],
plugins: [tsconfigPaths()],
resolve: {
alias: {
"@": "frontend",
Expand All @@ -38,6 +42,7 @@ export default defineConfig({
preload: {
root: ".",
build: {
target: NODE,
sourcemap: true,
rollupOptions: {
input: {
Expand All @@ -53,12 +58,12 @@ export default defineConfig({
server: {
open: false,
},
plugins: [tsconfigPaths(), flow()],
plugins: [tsconfigPaths()],
},
renderer: {
root: ".",
build: {
target: "es6",
target: CHROME,
sourcemap: true,
outDir: "dist/frontend",
rollupOptions: {
Expand All @@ -67,10 +72,13 @@ export default defineConfig({
},
},
},
optimizeDeps: {
include: ["monaco-yaml/yaml.worker.js"],
},
server: {
open: false,
watch: {
ignored: ["**/*.go", "**/go.mod", "**/go.sum", "**/*.md", "**/*.json"],
ignored: ["dist/**", "**/*.go", "**/go.mod", "**/go.sum", "**/*.md", "**/*.json"],
},
},
css: {
Expand All @@ -81,9 +89,8 @@ export default defineConfig({
},
},
plugins: [
ViteImageOptimizer(),
tsconfigPaths(),
flow(),
ViteImageOptimizer(),
svgr({
svgrOptions: { exportType: "default", ref: true, svgo: false, titleProp: true },
include: "**/*.svg",
Expand Down
Loading