-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Decommission the monorepo #5292
Conversation
We'll be handling this differently with Apollo Client 3.0.
This was originally created to help promote contributions from people working for oranizations that required author names to be included with contributions. We haven't received any requests for this kind of user contribution tracking in quite some time, so let's assume it is no longer needed.
The `refactoring` folder is temporary and holds all config and other support related files from each child package, that won't be part of the new no monorepo approach, but we still neeed for reference during refactoring.
These new locations will more than likely be temporary. They're being moved to get them out of their separate package locations, so those packages can be de-commissioned.
Full removal of the monorepo child packages structure.
This commit fixes all imports paths that were broken after merging the monorepo packages togther. It then wires up a new and fully functional single package.json for the entire project, which replaces the package.json's that were in the monorepo packages. All package.json scripts included are functional, which means tests are passing and bundles are being built. Note: `npm run deploy` has intentionally been left out for now since our deployment process is going to change quite significantly.
Not really needed and is interfering with `npm install`'s of Apollo Client into applications.
Looks a little better when the bundle is referred to in stacktraces.
Everyhing we need (for now) has been moved elsewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hwillson I really appreciate the commit by commit grouping that you did here, it made the review quite easy. This looks great to me and I think we should land it asap so @benjamn and @JakeDawkins can begin working on top of it
As an interested bystander, what are some of the reasons for this move? It seems to me that tight coupling between package changes will still be desireable? |
This reverts my previous PR #4538, now that siddharthkp/bundlesize#260 has been merged and published to npm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is a huge testament to your code wrangling skills @hwillson, and also to the value of TypeScript, without which it would be so much harder to know that everything still works as it did before. Thanks for splitting everything up so cleanly!
I have one important change to request (see below), but I can push that one-line commit myself.
This saves 1.1KB of minified+gzip code, and I believe it aligns with our goals of consolidating the parts of apollo-utilities that we actually use into the combined @apollo/client package. More explanation in this comment: #5292 (comment)
This saves 1.1KB of minified+gzip code, and I believe it aligns with our goals of consolidating the parts of apollo-utilities that we actually use into the combined @apollo/client package. More explanation in this comment: #5292 (comment)
This PR represents a first pass at removing Apollo Client's monorepo structure. For Apollo Client 3.0 we're moving away from using lerna and a monorepo based structure / deployment approach, to reduce complexity, better integrate project internals, and pave the way to better leverage modern build tooling capabilities.
This PR should be seen as a starting point for the new structure, not the endpoint. There are still a lot of adjustments to make, but it would be great to get these structural changes in place first to serve as a basis for subsequent PR's.
Key changes in this PR:
@apollo/client
packages
have been removed, with their contents moved alongside the rest of the Apollo Client coresrc
Important notes:
apollo-cache
andapollo-cache-inmemory
packages have been moved intosrc/cache/core
andsrc/cache/inmemory
respectively, but these locations can be considered temporary. There are many cache changes coming for AC 3 that will likely require re-adjusting this structure.apollo-utilities
was moved intosrc/utilities
. We already have asrc/utils
directory, so this duplication seems odd. I've left things like this for now, as we're going to be re-visiting all of the utilities included with Apollo Client, to decide what stays in place, and what gets moved into@apollo/graphql
.The changes in this PR (and everything in
release-3.0
) have been published as@apollo/client@alpha
.