mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-02 18:39:05 +01:00
Migrate package manager to Yarn Modern (#628)
We were using Yarn Classic. While this is not deprecated, Yarn is moving in a different direction with Yarn Modern (read more [here](https://yarnpkg.com/migration/overview)) and we should align with that. The migration mainly requires rebuilding our lockfile. We will still use `node_modules` for now, though in the future we may want to adopt the new [Plug'n'Play model](https://yarnpkg.com/features/pnp).
This commit is contained in:
parent
397d4d7369
commit
cd855762cd
4
.github/workflows/build-helper.yml
vendored
4
.github/workflows/build-helper.yml
vendored
@ -46,6 +46,10 @@ jobs:
|
||||
with:
|
||||
node-version: ${{env.NODE_VERSION}}
|
||||
cache: "yarn"
|
||||
- name: Install yarn
|
||||
run: |
|
||||
corepack enable
|
||||
yarn install
|
||||
- name: Set Version
|
||||
id: set-version
|
||||
run: |
|
||||
|
3
.github/workflows/regression.yml
vendored
3
.github/workflows/regression.yml
vendored
@ -29,7 +29,8 @@ jobs:
|
||||
brew install go
|
||||
brew tap scripthaus-dev/scripthaus
|
||||
brew install scripthaus
|
||||
npm install -g yarn
|
||||
corepack enable
|
||||
yarn install
|
||||
scripthaus run build-backend
|
||||
echo "Yarn"
|
||||
yarn
|
||||
|
9
.gitignore
vendored
9
.gitignore
vendored
@ -22,3 +22,12 @@ test/
|
||||
.vscode/
|
||||
make/
|
||||
waveterm-builds.zip
|
||||
|
||||
# Yarn Modern
|
||||
.pnp.*
|
||||
.yarn/*
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
@ -3,7 +3,8 @@ cd ~/actions-runner/_work/testdriver/testdriver/
|
||||
brew install go
|
||||
brew tap scripthaus-dev/scripthaus
|
||||
brew install scripthaus
|
||||
npm install -g yarn
|
||||
corepack enable
|
||||
yarn install
|
||||
scripthaus run build-backend
|
||||
echo "Yarn"
|
||||
yarn
|
||||
|
1
.yarnrc.yml
Normal file
1
.yarnrc.yml
Normal file
@ -0,0 +1 @@
|
||||
nodeLinker: node-modules
|
19
BUILD.md
19
BUILD.md
@ -11,13 +11,13 @@ If you install the production version of Wave, you'll see a semi-transparent gra
|
||||
|
||||
Download and install Go (must be at least go 1.18):
|
||||
|
||||
```
|
||||
```sh
|
||||
brew install go
|
||||
```
|
||||
|
||||
Download and install ScriptHaus (to run the build commands):
|
||||
|
||||
```
|
||||
```sh
|
||||
brew tap scripthaus-dev/scripthaus
|
||||
brew install scripthaus
|
||||
```
|
||||
@ -27,19 +27,20 @@ You also need a relatively modern nodejs with npm and yarn installed.
|
||||
- Node can be installed from [https://nodejs.org](https://nodejs.org).
|
||||
- npm can install yarn using:
|
||||
|
||||
```
|
||||
npm install -g yarn
|
||||
```sh
|
||||
corepack enable
|
||||
yarn install
|
||||
```
|
||||
|
||||
## Clone the Repo
|
||||
|
||||
```
|
||||
```sh
|
||||
git clone git@github.com:wavetermdev/waveterm.git
|
||||
```
|
||||
|
||||
## Building WaveShell / WaveSrv
|
||||
|
||||
```
|
||||
```sh
|
||||
scripthaus run build-backend
|
||||
```
|
||||
|
||||
@ -49,7 +50,7 @@ This builds the Golang backends for Wave. The binaries will put in waveshell/bin
|
||||
|
||||
Install modules (we use yarn):
|
||||
|
||||
```
|
||||
```sh
|
||||
yarn
|
||||
```
|
||||
|
||||
@ -57,7 +58,7 @@ yarn
|
||||
|
||||
We use webpack to build both the React and Electron App Wrapper code. They are both run together using:
|
||||
|
||||
```
|
||||
```sh
|
||||
scripthaus run webpack-watch
|
||||
```
|
||||
|
||||
@ -65,7 +66,7 @@ scripthaus run webpack-watch
|
||||
|
||||
Now that webpack is running (and watching for file changes) we can finally run the WaveTerm Dev Client! To start the client run:
|
||||
|
||||
```
|
||||
```sh
|
||||
scripthaus run electron
|
||||
```
|
||||
|
||||
|
@ -106,5 +106,6 @@
|
||||
},
|
||||
"scripts": {
|
||||
"postinstall": "electron-builder install-app-deps"
|
||||
}
|
||||
},
|
||||
"packageManager": "yarn@4.1.1"
|
||||
}
|
||||
|
@ -115,15 +115,3 @@ scripthaus run fullbuild-waveshell
|
||||
echo building wavesrv
|
||||
scripthaus run build-wavesrv
|
||||
```
|
||||
|
||||
```bash
|
||||
# @scripthaus command generate-license-disclaimers
|
||||
DISCLAIMER_DIR="./acknowledgements"
|
||||
DISCLAIMER_OUTPUT_DIR="$DISCLAIMER_DIR/disclaimers"
|
||||
if [ -d "$DISCLAIMER_OUTPUT_DIR" ]; then
|
||||
rm -rf "$DISCLAIMER_OUTPUT_DIR"
|
||||
fi
|
||||
mkdir "$DISCLAIMER_OUTPUT_DIR"
|
||||
go run github.com/google/go-licenses@latest report ./wavesrv/... ./waveshell/... --template "$DISCLAIMER_DIR/go_licenses_report.tpl" --ignore github.com/wavetermdev/waveterm > "$DISCLAIMER_OUTPUT_DIR/backend.md"
|
||||
yarn licenses generate-disclaimer > "$DISCLAIMER_OUTPUT_DIR/frontend.md"
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user