switching to pnpm for faster build

This commit is contained in:
Christian Kellner
2025-05-16 13:38:25 +02:00
parent 25dfad4f5d
commit b3c11320d4
6 changed files with 25 additions and 8544 deletions

View File

@@ -17,7 +17,10 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache: 'pnpm'
- run: yarn install
- run: yarn test
- name: Install pnpm
run: corepack enable
- run: pnpm install
- run: pnpm test

View File

@@ -113,7 +113,7 @@ I'm using Eslint to maintain quote style and quality. Do not skip it...
##### To do before merging:
- executed tests? (`yarn run test`)
- executed tests? (`pnpm test`)
- sure the changes are useful for everybody? Or is it maybe a custom modification just for your case?
_Thanks!_ :heart:

View File

@@ -9,14 +9,13 @@ RUN apt-get update && apt-get install -y chromium
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true \
PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium
# Timeout fix für yarn hinzugefügt
RUN yarn config set network-timeout 600000
RUN corepack enable && pnpm config set network-timeout 600000
RUN yarn install
RUN pnpm install
RUN yarn global add pm2
RUN pnpm add -g pm2
RUN yarn run prod
RUN pnpm run prod
RUN mkdir /db /conf && \
chown 1000:1000 /db /conf && \
@@ -25,4 +24,4 @@ RUN mkdir /db /conf && \
EXPOSE 9998
CMD pm2-runtime index.js
CMD pm2-runtime index.js

View File

@@ -25,9 +25,10 @@ If you want to try out _Fredy_, you can access the demo version [here](https://f
- Make sure to use Node.js 20 or above
- Run the following commands:
```ssh
yarn (or npm install)
yarn run prod
yarn run start
corepack enable (if you use node < 22)
pnpm i
pnpm prod
pnpm start
```
_Fredy_ will start with the default port, set to `9998`. You can access _Fredy_ by opening your browser at `http://localhost:9998`. The default login is `admin`, both for username and password. You should change the password as soon as possible when you plan to run Fredy on a server.
@@ -66,18 +67,18 @@ As an administrator, you can create, edit and remove users from _Fredy_. Be care
To run _Fredy_ in development mode, you need to run the backend & frontend separately.
Start the backend with:
```shell
yarn run start
pnpm start
```
For the frontend, run:
```shell
yarn run dev
pnpm dev
```
You should now be able to access _Fredy_ from your browser. Check your Terminal to see what port the frontend is running on.
### Running Tests
To run the tests, run
```shell
yarn run test
pnpm test
```
# Architecture

View File

@@ -1,12 +1,13 @@
{
"name": "fredy",
"version": "11.2.0",
"version": "11.3.0",
"description": "[F]ind [R]eal [E]states [d]amn eas[y].",
"packageManager": "pnpm@9.1.0",
"scripts": {
"start": "node prod.js",
"dev": "yarn && rm -rf ./ui/public/* && vite",
"dev": "pnpm install && rm -rf ./ui/public/* && vite",
"ui": "rm -rf ./ui/public/* && vite",
"prod": "yarn && vite build --emptyOutDir",
"prod": "pnpm install && vite build --emptyOutDir",
"format": "prettier --write lib/**/*.js ui/src/**/*.jsx test/**/*.js *.js --single-quote --print-width 120",
"test": "mocha --loader=esmock --timeout 3000000 test/**/*.test.js",
"lint": "eslint ./index.js ./lib/**/*.js ./test/**/*.js ./ui/src/**/*.jsx"
@@ -41,7 +42,7 @@
"license": "MIT",
"engines": {
"node": ">=20.0.0",
"npm": ">=7.0.0"
"pnpm": ">=9.0.0"
},
"browserslist": [
"> 0.5%",
@@ -105,4 +106,4 @@
"prettier": "3.5.3",
"redux-logger": "3.0.6"
}
}
}

8523
yarn.lock

File diff suppressed because it is too large Load Diff