RFC: Monorepo management #896
Closed
matheusps
started this conversation in
Technical RFCs
Replies: 3 comments
-
I'm convinced with the change to |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Implemented |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Monorepo Management
This is a proposal on how the shoreline repository package management will work. It includes a brief context of Monorepos, the set of tooling that we use, and the CI/CD.
Context
To be more accessible to readers of different contexts, this is a short context of Monorepos.
What is a Monorepo?
A Monorepo, short for "monolithic repository," is a software development approach where multiple projects or components are stored within a single, unified repository. In other words, instead of having separate repositories for each project or component, all the code and related assets are housed in a single version control system.
Why do we use a Monorepo?
It has numerous advantages including, but not restricted to:
Tooling
Why
pnpm
overyarn
?One compelling reason to choose
pnpm
overyarn
is its unique approach to dependency management. Unlikeyarn
,pnpm
uses a single shared store for all packages within the repository. This means that common dependencies are not duplicated across different projects, resulting in significant disk space savings and faster installation times. This efficiency is particularly beneficial in Monorepo setups where multiple projects share dependencies. Additionally,pnpm
supports a flat dependency structure by default, which avoids nested folders and reduces the potential for conflicts or version mismatch issues. It is also compatible with the npm registry, allowing for seamless integration with the existing JavaScript ecosystem.Consider looking into the references:
Bundle
A JavaScript bundler is a tool that combines multiple JavaScript files and their dependencies into a single file, known as a bundle. It analyzes the code and its dependencies, resolves any import statements or module dependencies, and merges them into a single file. This process enhances performance by minimizing network overhead and reducing the file size, resulting in faster loading times for users. Additionally, JavaScript bundlers often include optimizations such as minification and tree shaking to further optimize the bundle's size and remove unused code.
We have two bundle setups:
CI/CD
Next Steps
In the future, we intend to extend our Monorepo architecture to be used throughout VTEX frontend teams. This should be achieved by creating a new pipeline for the DK CI/CD.
Beta Was this translation helpful? Give feedback.
All reactions