Replace yarn with pnpm

It's time to move on from yarn 1, imo.
Not that I contribute enough to care, but it was frustrating to use yarn
while setting my local repo up again.
This commit is contained in:
Max Leiter 2024-01-27 15:47:33 -08:00
parent 2b146ba3e6
commit a55dc206bb
9 changed files with 9351 additions and 8457 deletions

View file

@ -29,7 +29,11 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
@ -37,12 +41,12 @@ jobs:
node-version: ${{ matrix.node_version }} node-version: ${{ matrix.node_version }}
- name: Install - name: Install
run: yarn --frozen-lockfile --non-interactive run: pnpm --frozen-lockfile --non-interactive
- name: Build - name: Build
run: yarn build run: pnpm build
env: env:
NODE_ENV: production NODE_ENV: production
- name: Test - name: Test
run: yarn test run: pnpm test

View file

@ -15,7 +15,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@v4 uses: actions/setup-node@v4
@ -23,15 +27,15 @@ jobs:
registry-url: "https://registry.npmjs.org/" registry-url: "https://registry.npmjs.org/"
- name: Install - name: Install
run: yarn --frozen-lockfile --non-interactive run: pnpm --frozen-lockfile
- name: Build - name: Build
run: yarn build run: pnpm build
env: env:
NODE_ENV: production NODE_ENV: production
- name: Test - name: Test
run: yarn test run: pnpm test
- name: Update npm - name: Update npm
run: npm install -g npm run: npm install -g npm

View file

@ -25,4 +25,7 @@ yarn.lock
.gitattributes .gitattributes
.browserslistrc .browserslistrc
.pnpm-debug.log*
.pnpm
*.css *.css

View file

@ -66,7 +66,7 @@ Please refer to the commit list given above for a complete list of changes, or w
As with all pre-releases, this version requires explicit use of the `next` tag to be installed: As with all pre-releases, this version requires explicit use of the `next` tag to be installed:
```sh ```sh
yarn global add thelounge@next pnpm global add thelounge@next
``` ```
## v4.4.0 - 2023-04-22 ## v4.4.0 - 2023-04-22

View file

@ -24,7 +24,7 @@
<a href="https://demo.thelounge.chat/"><img <a href="https://demo.thelounge.chat/"><img
alt="#thelounge IRC channel on Libera.Chat" alt="#thelounge IRC channel on Libera.Chat"
src="https://img.shields.io/badge/Libera.Chat-%23thelounge-415364.svg?colorA=ff9e18"></a> src="https://img.shields.io/badge/Libera.Chat-%23thelounge-415364.svg?colorA=ff9e18"></a>
<a href="https://yarn.pm/thelounge"><img <a href="https://npmjs.com/thelounge"><img
alt="npm version" alt="npm version"
src="https://img.shields.io/npm/v/thelounge.svg?colorA=333a41&maxAge=3600"></a> src="https://img.shields.io/npm/v/thelounge.svg?colorA=333a41&maxAge=3600"></a>
<a href="https://github.com/thelounge/thelounge/actions"><img <a href="https://github.com/thelounge/thelounge/actions"><img
@ -51,7 +51,7 @@ The Lounge is the official and community-managed fork of [Shout](https://github.
## Installation and usage ## Installation and usage
The Lounge requires latest [Node.js](https://nodejs.org/) LTS version or more recent. The Lounge requires latest [Node.js](https://nodejs.org/) LTS version or more recent.
The [Yarn package manager](https://yarnpkg.com/) is also recommended. The [pnpm package manager](https://pnpm.io/) is also recommended.
If you want to install with npm, `--unsafe-perm` is required for a correct install. If you want to install with npm, `--unsafe-perm` is required for a correct install.
### Running stable releases ### Running stable releases
@ -65,9 +65,9 @@ The following commands install and run the development version of The Lounge:
```sh ```sh
git clone https://github.com/thelounge/thelounge.git git clone https://github.com/thelounge/thelounge.git
cd thelounge cd thelounge
yarn install pnpm install
NODE_ENV=production yarn build NODE_ENV=production pnpm build
yarn start pnpm start
``` ```
When installed like this, `thelounge` executable is not created. Use `node index <command>` to run commands. When installed like this, `thelounge` executable is not created. Use `node index <command>` to run commands.
@ -83,13 +83,13 @@ fork.
Before submitting any change, make sure to: Before submitting any change, make sure to:
- Read the [Contributing instructions](https://github.com/thelounge/thelounge/blob/master/.github/CONTRIBUTING.md#contributing) - Read the [Contributing instructions](https://github.com/thelounge/thelounge/blob/master/.github/CONTRIBUTING.md#contributing)
- Run `yarn test` to execute linters and the test suite - Run `pnpm test` to execute linters and the test suite
- Run `yarn format:prettier` if linting fails - Run `pnpm format:prettier` if linting fails
- Run `yarn build:client` if you change or add anything in `client/js` or `client/components` - Run `pnpm build:client` if you change or add anything in `client/js` or `client/components`
- The built files will be output to `public/` by webpack - The built files will be output to `public/` by webpack
- Run `yarn build:server` if you change anything in `server/` - Run `pnpm build:server` if you change anything in `server/`
- The built files will be output to `dist/` by tsc - The built files will be output to `dist/` by tsc
- `yarn dev` can be used to start The Lounge with hot module reloading - `pnpm dev` can be used to start The Lounge with hot module reloading
To ensure that you don't commit files that fail the linting, you can install a pre-commit git hook. To ensure that you don't commit files that fail the linting, you can install a pre-commit git hook.
Execute `yarn githooks-install` to do so. Execute `pnpm githooks-install` to do so.

View file

@ -31,7 +31,7 @@ if (fs.existsSync("./dist/server/index.js")) {
require("./dist/server/index.js"); require("./dist/server/index.js");
} else { } else {
console.error( console.error(
"Files in ./dist/server/ not found. Please run `yarn build` before trying to run `node index.js`." "Files in ./dist/server/ not found. Please run `pnpm build` before trying to run `node index.js`."
); );
process.exit(1); process.exit(1);

View file

@ -48,7 +48,7 @@
"files": [ "files": [
"./.thelounge_home", "./.thelounge_home",
"./index.js", "./index.js",
"./yarn.lock", "./pnpm-lock.yaml",
"./client/index.html.tpl", "./client/index.html.tpl",
"./dist/package.json", "./dist/package.json",
"./dist/**/*.js", "./dist/**/*.js",
@ -80,8 +80,7 @@
"tlds": "1.228.0", "tlds": "1.228.0",
"ua-parser-js": "1.0.33", "ua-parser-js": "1.0.33",
"uuid": "8.3.2", "uuid": "8.3.2",
"web-push": "3.4.5", "web-push": "3.4.5"
"yarn": "1.22.17"
}, },
"optionalDependencies": { "optionalDependencies": {
"sqlite3": "5.1.6" "sqlite3": "5.1.6"
@ -169,5 +168,6 @@
"webpack-cli": "4.9.2", "webpack-cli": "4.9.2",
"webpack-dev-middleware": "5.3.3", "webpack-dev-middleware": "5.3.3",
"webpack-hot-middleware": "2.25.4" "webpack-hot-middleware": "2.25.4"
} },
"packageManager": "pnpm@8.15.0+sha256.fd1eab68a6d403f35cf3259c53780d70b0f14bd74e39da2f917d201f554d8665"
} }

9315
pnpm-lock.yaml Normal file

File diff suppressed because it is too large Load diff

8432
yarn.lock

File diff suppressed because it is too large Load diff