Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monorepo with yarn workspaces and lerna #2892

Merged
merged 1 commit into from
Dec 26, 2019
Merged

Conversation

onursumer
Copy link
Member

@onursumer onursumer commented Nov 22, 2019

  • Enabled yarn workspaces for package management -- needed to update the yarn to the latest version for this.
  • Using lerna for multi package tasks (test, build, publish, etc.)
  • Moved src/public-lib contents under packages/cbioportal-frontend-commons with a proper package.json and updated references accordingly -- this increases the number of files changed dramatically, but majority of these changes are just reference updates.
  • Using shared rollup and ts config options to bundle modules under packages.
  • Added github workflow to auto publish public packages to npm.

Checks

  • Has tests or has a separate issue that describes the types of test that should be created. If no test is included it should explicitly be mentioned in the PR why there is no test.
  • The commit log is comprehensible. It follows 7 rules of great commit messages. For most PRs a single commit should suffice, in some cases multiple topical commits can be useful. During review it is ok to see tiny commits (e.g. Fix reviewer comments), but right before the code gets merged to master or rc branch, any such commits should be squashed since they are useless to the other developers. Definitely avoid merge commits, use rebase instead.
  • Is this PR adding logic based on one or more clinical attributes? If yes, please make sure validation for this attribute is also present in the data validation / data loading layers (in backend repo) and documented in File-Formats Clinical data section!

@onursumer onursumer force-pushed the lerna branch 9 times, most recently from 45b1a4c to 989d458 Compare November 23, 2019 00:40
@inodb
Copy link
Member

inodb commented Nov 23, 2019

@onursumer Nice work! Just wanted to share I found something describing lerna and yarn workspaces. Maybe of interest: https://doppelmutzi.github.io/monorepo-lerna-yarn-workspaces/. Lerna seems more powerful for publishing individual packages but yarn workspaces allows skipping the bootstrap step. You can use both as well

When we introduce lerna, we prolly need some docs on how to install packages. Like how to install a dependency for one of the projects vs a dependency for all of them. As well as how to run the individual projects

@onursumer onursumer force-pushed the lerna branch 6 times, most recently from b7e9a84 to d553f85 Compare November 29, 2019 22:19
@onursumer onursumer force-pushed the lerna branch 6 times, most recently from 7666e4a to 37a733e Compare December 3, 2019 23:44
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-rh2ckna38ru December 10, 2019 22:28 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-bllos20eihn December 10, 2019 23:26 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-77jfhpl90si December 11, 2019 21:02 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-orvdimfp8d6 December 11, 2019 22:26 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-vw4rduog5ch December 20, 2019 02:37 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-li60cjgmufb December 20, 2019 04:14 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-1hr60sdctwu December 20, 2019 16:38 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-svo57qdwtoh December 20, 2019 17:16 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-itqufdd6ekb December 20, 2019 17:37 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-2pqqmkb0wok December 20, 2019 19:16 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-e00l3pkwp2u December 20, 2019 20:05 Inactive
"clean": "rimraf dist tsDist common-dist",
"build": "yarn run clean && yarn run compileOqlParser && yarn run buildDLL:prod && cross-env NODE_ENV=production NODE_OPTIONS=--max-old-space-size=2048 webpack",
"build": "./scripts/env_vars.sh && eval \"$(./scripts/env_vars.sh)\" && yarn run buildAll",
"buildAll": "yarn run buildModules && yarn run buildMain",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

currently, jitpack is the only use case where we don't need to set env vars, so we call buildAll instead of build there.

@jjgao jjgao temporarily deployed to cbioportal-f-lerna-hssvz8dcxup December 20, 2019 21:12 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-sjutdsiljr2 December 23, 2019 17:06 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-udvhsvhudg5 December 23, 2019 17:36 Inactive
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-qymfdpd86zh December 23, 2019 20:01 Inactive
Signed-off-by: Onur Sumer <s.onur.sumer@gmail.com>
@jjgao jjgao temporarily deployed to cbioportal-f-lerna-yuaamkr9ydc December 23, 2019 20:25 Inactive
Copy link
Member

@inodb inodb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@inodb inodb merged commit c64e65e into cBioPortal:master Dec 26, 2019
@onursumer onursumer deleted the lerna branch July 2, 2021 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants