Joystream / Joystream/joystream

TypeScript libraries - improve monorepo setup

Open
#1,595 0 comments 0 reactions 1 assignee View on GitHub

@Lezek123 is already working on this.

Since Oct 26, 2020.

estimate-9h
Dominant language
Rust
Stars
1.4k
Forks
116
PR merge metrics
No merged PRs in 30d

Description

This is related to libraries like cd-schemas (probably @joystream/content in the future) and @joystream/js that should be by available for multiple other TypeScript projects in the monorepo

  • Make separate tsconfigs for IDE (tsconfig.json) and builds (tsconfig.build.json) of our TypeScript projects in the monorepo, so that they can share paths and reference each other more easily (we would then have the right handlig of jump-to-definition in IDE and it should also help us avoid re-building the libraries in order for the IDE to become aware of the changes etc.). Some research still needed w.r.t. how this would affect tools like ts-node etc.

Related sources:

This may require using the same api augmentations in all TypeScript projects, which would probably be a good thing, but may force us to make it more of a step-by-step process

  • Add publishing tests to CI. Perhaps lerna could offer some help here. npm pack can give us information about what will end up in the published package, but by itself it doesn't do anything to check if the package will work at all. We can combine it with running npm install and node index.js inside the extracted tarball, but this won't work if we have multiple packages that depend on each other and we want to publish them all at once. Perhaps we could have a CI workflow that would make tarballs of the packages that we plan to publish in a correct order (@joystream/types => @joystream/js => @joystream/cli) and modify the references in package.json files to point to tarballs, instead of not-yet published versions of our packages so that we can then run a check like npm install && node index.js inside the extracted tarballs succesfully (but probably there exsits a better way to handle this)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.