Joystream / Joystream/joystream
TypeScript libraries - improve monorepo setup
Open
@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 sharepathsand reference each other more easily (we would then have the right handlig ofjump-to-definitionin 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 likets-nodeetc.
Related sources:
- https://medium.com/@NiGhTTraX/how-to-set-up-a-typescript-monorepo-with-lerna-c6acda7d4559,
- https://medium.com/@NiGhTTraX/making-typescript-monorepos-play-nice-with-other-tools-a8d197fdc680
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 packcan 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 runningnpm installandnode index.jsinside 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 inpackage.jsonfiles to point to tarballs, instead of not-yet published versions of our packages so that we can then run a check likenpm install && node index.jsinside 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.