Skip to content

Commit

Permalink
chore: remove Lerna
Browse files Browse the repository at this point in the history
Signed-off-by: Oleksii Orel <oorel@redhat.com>
  • Loading branch information
olexii4 committed Oct 23, 2024
1 parent 27ec6a0 commit 5252f8c
Show file tree
Hide file tree
Showing 14 changed files with 310 additions and 7,560 deletions.
338 changes: 0 additions & 338 deletions .deps/dev.md

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions .deps/prod.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,7 @@
| [`multi-ini@2.3.2`](git://github.com/evangelion1204/multi-ini.git) | MIT | clearlydefined |
| `nanoid@3.3.7` | MIT | #7571 |
| `negotiator@0.6.3` | MIT | clearlydefined |
| [`node-fetch@2.7.0`](https://github.com/bitinn/node-fetch.git) | MIT | #10509 |
| [`node-gyp@10.2.0`](git://github.com/nodejs/node-gyp.git) | MIT | #15698 |
| [`nopt@7.2.0`](https://github.com/npm/nopt.git) | ISC | #9086 |
| [`oauth-sign@0.9.0`](https://github.com/mikeal/oauth-sign) | Apache-2.0 | clearlydefined |
Expand Down
2 changes: 1 addition & 1 deletion build/dockerfiles/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ RUN if ! [ type "yarn" &> /dev/null ]; then \

COPY package.json /dashboard/
COPY yarn.lock /dashboard/
COPY lerna.json /dashboard/
COPY tsconfig.json /dashboard/
COPY run/wrksps.sh /dashboard/run/

ENV COMMON=packages/common
COPY ${COMMON}/package.json /dashboard/${COMMON}/
Expand Down
3 changes: 0 additions & 3 deletions build/dockerfiles/brew.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ RUN ln -s "$REMOTE_SOURCES_DIR"/devspaces-images-dashboard/app/devspaces-dashboa
# see https://source.redhat.com/groups/public/container-build-system/container_build_system_wiki/containers_from_source_multistage_builds_in_osbs#jive_content_id_Cachito_Integration_for_yarn
RUN yarn config set nodedir /usr; yarn config set unsafe-perm true && yarn install

# cachito:yarn step 4: lerna installed to $REMOTE_SOURCES_DIR/devspaces-images-dashboard/app/devspaces-dashboard/node_modules/.bin/lerna - add to path
RUN ln -s "$REMOTE_SOURCES_DIR"/devspaces-images-dashboard/app/devspaces-dashboard/node_modules/.bin/lerna /usr/local/bin/lerna

# cachito:yarn step 5: the actual build!
# hadolint ignore=DL3059
RUN yarn build
Expand Down
9 changes: 0 additions & 9 deletions lerna.json

This file was deleted.

8 changes: 5 additions & 3 deletions make-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ function update_pkgs_versions() {
local VER=$1
# update root `package.json` version
npm --no-git-tag-version version --allow-same-version "${VER}"
# update each package version
yarn install --frozen-lockfile --no-immutable
npx lerna version --no-git-tag-version -y "${VER}"
# update packages versions
sed_in_place -e "s/\"version\": \".*\"/\"version\": \"${VER}\"/" package.json
sed_in_place -e "s/\"version\": \".*\"/\"version\": \"${VER}\"/" packages/dashboard-backend/package.json
sed_in_place -e "s/\"version\": \".*\"/\"version\": \"${VER}\"/" packages/dashboard-frontend/package.json
sed_in_place -e "s/\"version\": \".*\"/\"version\": \"${VER}\"/" packages/common/package.json
if [[ ${VER} != *"-next" ]]; then
# update devworkspace generator version for release
jq ".\"dependencies\".\"@eclipse-che/che-devworkspace-generator\" = \"${VER}\"" packages/dashboard-backend/package.json > packages/dashboard-backend/package.json.update
Expand Down
36 changes: 16 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,24 @@
},
"license": "EPL-2.0",
"scripts": {
"build": "yarn prebuild && lerna run build --scope=@eclipse-che/dashboard-\\* --concurrency 1",
"build:dev": "yarn prebuild && lerna run build:dev --scope=@eclipse-che/dashboard-\\*",
"prebuild": "lerna run build --scope=@eclipse-che/common",
"prebuild:dev": "yarn prebuild",
"build": "yarn wrksps build",
"build:dev": "yarn wrksps build:dev",
"frontend:start": "yarn workspace @eclipse-che/dashboard-frontend start",
"start": "${PWD}/run/local-run.sh $@",
"start:prepare": "${PWD}/run/prepare-local-run.sh",
"start:cleanup": "${PWD}/run/revert-local-run.sh",
"license:check": "${PWD}/scripts/container_tool.sh run --rm -t -v ${PWD}/:/workspace/project quay.io/che-incubator/dash-licenses:next --check",
"license:generate": "${PWD}/scripts/container_tool.sh run --rm -t -v ${PWD}/:/workspace/project quay.io/che-incubator/dash-licenses:next",
"test": "yarn run pretest && lerna run test --stream -- --no-cache $@",
"start": "$PWD/run/local-run.sh $@",
"start:prepare": "$PWD/run/prepare-local-run.sh",
"start:cleanup": "$PWD/run/revert-local-run.sh",
"license:check": "$PWD/scripts/container_tool.sh run --rm -t -v $PWD/:/workspace/project quay.io/che-incubator/dash-licenses:next --check",
"license:generate": "$PWD/scripts/container_tool.sh run --rm -t -v $PWD/:/workspace/project quay.io/che-incubator/dash-licenses:next",
"test": "yarn run pretest && yarn wrksps test --no-cache",
"test:check": "yarn run pretest && yarn workspace @eclipse-che/dashboard-frontend test --config=jest.config.check.js",
"pretest": "yarn run prebuild",
"test:coverage": "yarn run test -- --coverage",
"format:check": "lerna run format:check",
"format:fix": "lerna run --stream format:fix",
"lint:check": "lerna run lint:check",
"lint:fix": "lerna run --stream lint:fix",
"patch": "${PWD}/run/patch.sh $@"
},
"devDependencies": {
"lerna": "^6"
"pretest": "yarn workspace @eclipse-che/common run build",
"test:coverage": "yarn run pretest && yarn wrksps test --coverage",
"format:check": "yarn wrksps format:check",
"format:fix": "yarn wrksps format:fix",
"lint:check": "yarn wrksps lint:check",
"lint:fix": "yarn wrksps lint:fix",
"patch": "$PWD/run/patch.sh $@",
"wrksps": "$PWD/run/wrksps.sh $*"
},
"resolutions": {
"@adobe/css-tools": "^4.3.2",
Expand Down
18 changes: 18 additions & 0 deletions run/wrksps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
#
# Copyright (c) 2021-2024 Red Hat, Inc.
# This program and the accompanying materials are made
# available under the terms of the Eclipse Public License 2.0
# which is available at https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#

# The script is used to backward compatibility between yarn3 and yarn1 package managers.
# It will be removed with yarn1 support.

set -e

yarn workspace @eclipse-che/common "$@"
yarn workspace @eclipse-che/dashboard-frontend "$@"
yarn workspace @eclipse-che/dashboard-backend "$@"
2 changes: 1 addition & 1 deletion scripts/container_tool.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# Copyright (c) 2021-2024 Red Hat, Inc.
# This program and the accompanying materials are made
Expand Down
2 changes: 1 addition & 1 deletion scripts/sed_in_place.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh
#
# Copyright (c) 2021-2024 Red Hat, Inc.
# This program and the accompanying materials are made
Expand Down
Loading

0 comments on commit 5252f8c

Please sign in to comment.