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:
Evan Simkowitz 2024-05-02 14:13:32 -07:00 committed by GitHub
parent 397d4d7369
commit cd855762cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 12494 additions and 8988 deletions

View File

@ -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: |

View File

@ -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
View File

@ -22,3 +22,12 @@ test/
.vscode/
make/
waveterm-builds.zip
# Yarn Modern
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions

View File

@ -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
View File

@ -0,0 +1 @@
nodeLinker: node-modules

View File

@ -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
```

View File

@ -106,5 +106,6 @@
},
"scripts": {
"postinstall": "electron-builder install-app-deps"
}
},
"packageManager": "yarn@4.1.1"
}

View File

@ -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"
```

21312
yarn.lock

File diff suppressed because it is too large Load Diff