Merge pull request #2212 from automatisch/remove-lerna

Remove lerna and yarn workspaces
This commit is contained in:
Ömer Faruk Aydın
2024-11-21 13:51:57 +03:00
committed by GitHub
22 changed files with 18230 additions and 16803 deletions

View File

@@ -41,8 +41,11 @@ jobs:
with:
node-version: 18
- name: Install dependencies
run: cd packages/backend && yarn
run: yarn
working-directory: packages/backend
- name: Copy .env-example.test file to .env.test
run: cd packages/backend && cp .env-example.test .env.test
run: cp .env-example.test .env.test
working-directory: packages/backend
- name: Run tests
run: cd packages/backend && yarn test
run: yarn test
working-directory: packages/backend

View File

@@ -18,11 +18,13 @@ jobs:
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: yarn.lock
cache-dependency-path: packages/backend/yarn.lock
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- run: yarn --frozen-lockfile
- run: cd packages/backend && yarn lint
working-directory: packages/backend
- run: yarn lint
working-directory: packages/backend
- run: echo "🍏 This job's status is ${{ job.status }}."
start-backend-server:
runs-on: ubuntu-latest
@@ -35,11 +37,13 @@ jobs:
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: yarn.lock
cache-dependency-path: packages/backend/yarn.lock
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- run: yarn --frozen-lockfile
- run: cd packages/backend && yarn start
working-directory: packages/backend
- run: yarn start
working-directory: packages/backend
env:
ENCRYPTION_KEY: sample_encryption_key
WEBHOOK_SECRET_KEY: sample_webhook_secret_key
@@ -55,11 +59,13 @@ jobs:
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: yarn.lock
cache-dependency-path: packages/backend/yarn.lock
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- run: yarn --frozen-lockfile
- run: cd packages/backend && yarn start:worker
working-directory: packages/backend
- run: yarn start:worker
working-directory: packages/backend
env:
ENCRYPTION_KEY: sample_encryption_key
WEBHOOK_SECRET_KEY: sample_webhook_secret_key
@@ -75,11 +81,13 @@ jobs:
with:
node-version: '18'
cache: 'yarn'
cache-dependency-path: yarn.lock
cache-dependency-path: packages/web/yarn.lock
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- run: yarn --frozen-lockfile
- run: cd packages/web && yarn build
working-directory: packages/web
- run: yarn build
working-directory: packages/web
env:
CI: false
- run: echo "🍏 This job's status is ${{ job.status }}."

View File

@@ -58,13 +58,21 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
- name: Install web dependencies
run: yarn
working-directory: ./packages/web
- name: Install backend dependencies
run: yarn
working-directory: ./packages/backend
- name: Install e2e-tests dependencies
run: yarn
working-directory: ./packages/e2e-tests
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
working-directory: ./packages/e2e-tests
- name: Build Automatisch web
working-directory: ./packages/web
run: yarn build
working-directory: ./packages/web
env:
# Keep this until we clean up warnings in build processes
CI: false

1
.gitignore vendored
View File

@@ -4,7 +4,6 @@ logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)

View File

@@ -11,10 +11,12 @@ WORKDIR /automatisch
# copy the app, note .dockerignore
COPY . /automatisch
RUN yarn
RUN cd packages/web && yarn
RUN cd packages/web && yarn build
RUN cd packages/backend && yarn --production
RUN \
rm -rf /usr/local/share/.cache/ && \
apk del build-dependencies

View File

@@ -1,11 +0,0 @@
{
"packages": ["packages/*"],
"version": "0.14.0",
"npmClient": "yarn",
"command": {
"add": {
"exact": true
}
},
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}

View File

@@ -1,32 +0,0 @@
{
"name": "@automatisch/root",
"license": "See LICENSE file",
"private": true,
"scripts": {
"start": "lerna run --stream --parallel --scope=@*/{web,backend} dev",
"start:web": "lerna run --stream --scope=@*/web dev",
"start:backend": "lerna run --stream --scope=@*/backend dev",
"build:docs": "cd ./packages/docs && yarn install && yarn build"
},
"workspaces": {
"packages": [
"packages/*"
],
"nohoist": [
"**/babel-loader",
"**/webpack",
"**/@automatisch/web",
"**/ajv"
]
},
"devDependencies": {
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"lerna": "^8.0.0",
"prettier": "^2.5.1"
},
"publishConfig": {
"access": "public"
}
}

View File

@@ -23,6 +23,7 @@
"dependencies": {
"@bull-board/express": "^3.10.1",
"@casl/ability": "^6.5.0",
"@faker-js/faker": "^9.2.0",
"@node-saml/passport-saml": "^4.0.4",
"@rudderstack/rudder-sdk-node": "^1.1.2",
"@sentry/node": "^7.42.0",
@@ -36,6 +37,9 @@
"crypto-js": "^4.1.1",
"debug": "~2.6.9",
"dotenv": "^10.0.0",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"express": "~4.18.2",
"express-async-errors": "^3.1.1",
"express-basic-auth": "^1.2.1",
@@ -61,6 +65,7 @@
"pg": "^8.7.1",
"php-serialize": "^4.0.2",
"pluralize": "^8.0.0",
"prettier": "^2.5.1",
"raw-body": "^2.5.2",
"showdown": "^2.1.0",
"uuid": "^9.0.1",

4807
packages/backend/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

1
packages/docs/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
pages/.vitepress/cache

View File

@@ -4,6 +4,7 @@
"license": "See LICENSE file",
"description": "The open source Zapier alternative. Build workflow automation without spending time and money.",
"private": true,
"type": "module",
"scripts": {
"dev": "vitepress dev pages --port 3002",
"build": "vitepress build pages",

View File

@@ -6,11 +6,19 @@ Clone main branch of Automatisch.
git clone git@github.com:automatisch/automatisch.git
```
Then, install the dependencies.
Then, install the dependencies for both backend and web packages separately.
```bash
cd automatisch
# Install backend dependencies
cd packages/backend
yarn install
# Install web dependencies
cd packages/web
yarn install
```
## Backend
@@ -53,12 +61,14 @@ yarn db:seed:user
Start the main backend server.
```bash
cd packages/backend
yarn dev
```
Start the worker server in another terminal tab.
```bash
cd packages/backend
yarn worker
```
@@ -84,6 +94,7 @@ It will automatically open [http://localhost:3001](http://localhost:3001) in you
```bash
cd packages/docs
yarn install
yarn dev
```

View File

@@ -1,6 +1,6 @@
# Repository Structure
We use `lerna` with `yarn workspaces` to manage the mono repository. We have the following packages:
We manage a monorepo structure with the following packages:
```
.
@@ -15,3 +15,5 @@ We use `lerna` with `yarn workspaces` to manage the mono repository. We have the
- `docs` - The docs package contains the documentation website.
- `e2e-tests` - The e2e-tests package contains the end-to-end tests for the internal usage.
- `web` - The web package contains the frontend application of Automatisch.
Each package is independently managed, and has its own package.json file to manage dependencies. This allows for better isolation and flexibility.

1192
packages/docs/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -29,10 +29,12 @@
"@playwright/test": "^1.45.1"
},
"dependencies": {
"axios": "^1.6.0",
"dotenv": "^16.3.1",
"eslint": "^8.13.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"knex": "^2.4.0",
"luxon": "^3.4.4",
"micro": "^10.0.1",
"pg": "^8.12.0",

1099
packages/e2e-tests/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -18,6 +18,7 @@
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"axios": "^1.6.0",
"clipboard-copy": "^4.0.1",
"compare-versions": "^4.1.3",
"lodash": "^4.17.21",

View File

@@ -6,7 +6,7 @@ import FormHelperText from '@mui/material/FormHelperText';
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
import ClearIcon from '@mui/icons-material/Clear';
import { ActionButtonsWrapper } from './style';
import ClickAwayListener from '@mui/base/ClickAwayListener';
import { ClickAwayListener } from '@mui/base/ClickAwayListener';
import InputLabel from '@mui/material/InputLabel';
import { createEditor } from 'slate';
import { Editable, ReactEditor } from 'slate-react';

View File

@@ -1,5 +1,5 @@
import PropTypes from 'prop-types';
import ClickAwayListener from '@mui/base/ClickAwayListener';
import { ClickAwayListener } from '@mui/base/ClickAwayListener';
import FormHelperText from '@mui/material/FormHelperText';
import InputLabel from '@mui/material/InputLabel';
import * as React from 'react';

View File

@@ -2,7 +2,7 @@ import PropTypes from 'prop-types';
import ArrowDropDownIcon from '@mui/icons-material/ArrowDropDown';
import Button from '@mui/material/Button';
import ButtonGroup from '@mui/material/ButtonGroup';
import ClickAwayListener from '@mui/material/ClickAwayListener';
import { ClickAwayListener } from '@mui/base/ClickAwayListener';
import Grow from '@mui/material/Grow';
import MenuItem from '@mui/material/MenuItem';
import MenuList from '@mui/material/MenuList';

11069
packages/web/yarn.lock Normal file

File diff suppressed because it is too large Load Diff

16740
yarn.lock

File diff suppressed because it is too large Load Diff