Skip to content

Commit

Permalink
Remove lerna dependency (#1997)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
lerna/nx does not support s390x, and therefore the jaeger-ui build fails
on this platform. This PR removes the lerna dependency from jaeger-ui.


https://github.com/nrwl/nx/blob/16.6.0/packages/nx/src/native/index.js#L161

https://github.com/nrwl/nx/blob/16.6.0/docs/shared/installation/troubleshoot-installation.md#supported-native-module-platforms

Resolves: #1996
Resolves: #341

## Description of the changes
Remove `lerna` and use `yarn workspaces` instead. 

## How was this change tested?
- local

## Checklist
- [X] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [X] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `yarn lint` and `yarn test`

---------

Signed-off-by: Andreas Gerstmayr <agerstmayr@redhat.com>
  • Loading branch information
andreasgerstmayr authored Nov 23, 2023
1 parent 7c1692c commit f391b86
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 2,686 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ npm-debug.log
.vscode
.idea
yarn-error.log
lerna-debug.log
.eslintcache
.vscode

Expand Down
6 changes: 1 addition & 5 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ In `./packages/plexus`, `typescript` is used to generate type declarations for t

#### `build`

`lerna run build` executes the build in each of `./packages/*` sub-packages.
`yarn build` executes the build in each of `./packages/*` sub-packages.

#### `eslint`

Expand Down Expand Up @@ -81,10 +81,6 @@ CodeCov is integrated into the unit tests workflow to report coverage data from

[`yarn install --frozen-lockfile`](https://yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-frozen-lockfile) ensures installs in CI fail if they would typically mutate the lockfile.

## `lerna.json`

We should probably audit our use of `lerna` to make sure a) it's necessary and b) it's idiomatic if it is necessary. We have ended up relying quite a bit on `yarn` workspaces, which has reduced the relevance of `lerna`. ([Ticket](https://github.com/jaegertracing/jaeger-ui/issues/341))

## `tsconfig.json`

Used to configure the `tsc-lint` script and, in theory, the IDE (such as VS Code).
Expand Down
6 changes: 0 additions & 6 deletions lerna.json

This file was deleted.

9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"eslint-plugin-react": "7.33.2",
"husky": "8.0.3",
"jsdom": "22.1.0",
"lerna": "7.4.2",
"npm-run-all": "4.1.5",
"prettier": "3.1.0",
"rxjs-compat": "6.6.7",
Expand All @@ -37,17 +36,17 @@
]
},
"scripts": {
"build": "lerna run build",
"build": "yarn workspaces run build",
"check-license": "./scripts/check-license.sh",
"coverage": "lerna run coverage",
"coverage": "yarn workspaces run coverage",
"depcheck": "./scripts/run-depcheck.sh",
"eslint": "eslint --cache 'scripts/*.{js,jsx,ts,tsx}' 'packages/*/src/**/*.{js,jsx,ts,tsx}' 'packages/*/*.{js,jsx,ts,tsx}'",
"fmt": "yarn prettier",
"lint": "npm-run-all -ln --parallel prettier-lint tsc-lint eslint check-license",
"prepare": "lerna run --stream --sort prepublishOnly",
"prepare": "yarn workspace @jaegertracing/plexus prepublishOnly",
"prettier": "prettier --write '{.,scripts}/*.{js,jsx,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,jsx,json,md,ts,tsx}' 'packages/*/*.{css,js,jsx,json,md,ts,tsx}'",
"prettier-lint": "prettier --list-different '{.,scripts}/*.{js,jsx,json,md,ts,tsx}' 'packages/*/{src,demo/src}/**/!(layout.worker.bundled|react-vis).{css,js,jsx,json,md,ts,tsx}' 'packages/*/*.{css,js,jsx,json,md,ts,tsx}' || (echo '*** PLEASE RUN yarn prettier AND RESUBMIT ***' && false)",
"test": "lerna run test",
"test": "yarn workspaces run test",
"tsc-lint": "tsc --build",
"tsc-lint-debug": "tsc --listFiles",
"start": "cd packages/jaeger-ui && yarn start"
Expand Down
Loading

0 comments on commit f391b86

Please sign in to comment.