inversify / InversifyJS

A powerful and lightweight inversion of control container for JavaScript & Node.js apps powered by TypeScript.
http://inversify.io/
MIT License
11.21k stars 715 forks source link

Implement Initial Monorepo #1551

Open Lord-Valen opened 9 months ago

Lord-Valen commented 9 months ago

Description

Since it takes a lot of work to adapt the tools/scripts and match dependencies between projects, I think it may be best to migrate just this project and set up the infrastructure in this PR and migrate the other projects in subsequent PRs. Moving the git history alone has proven to be the easy part (I have done it, but didn't want to go through with the full migration right away). Essentially, we move all files in the repo to /apps/<repo-name>, commit, add it as a remote in this repo, and git merge <repo-name>/<branch> --allow-unrelated-histories. The hard (tedious?) part is to rework the package.json and resolve dependency conflicts.

I took the liberty of trying out turborepo here, since it only adds to the workspace experience. A free and painless addition, it turns out.

What is done here:

Related Issue

1550

Motivation and Context

Monorepos are easier to maintain, as has been discussed in #1550 and on the Inversify Discord server. Turborepo allows for faster CI and developer experience without forcing us into a system other than workspaces. tsup allowed for a simplification of the build and the tsconfig setup (tsup doesn't support amd so I left build:amd intact). I hope this simplification makes things more approachable.

How Has This Been Tested?

Types of changes

Checklist: