-
Notifications
You must be signed in to change notification settings - Fork 32
build(deps-dev): Move Duplicate Deps into Dev #2738
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
base: master
Are you sure you want to change the base?
Conversation
Deploying atlantis with
|
| Latest commit: |
99be0f8
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://44897bba.atlantis.pages.dev |
| Branch Preview URL: | https://move-duplicate-dependencies.atlantis.pages.dev |
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.
Looks great, just a few suggestions!
I also diffed the bundle outputs against master and zero changes, so I'm positive this is working as expected 👍
docs/guides/dependency-policy.mdx
Outdated
| @@ -0,0 +1,183 @@ | |||
| ## Dependency strategy for @jobber/components (monorepo + Rollup) | |||
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.
Great documentation 👍
Is this meant to be live on storybook or the docs site? Looks like it's not available/showing in SB.
docs/guides/ i think is mostly for SBv7. Ideally all new docs are just stored within packages/site/src/content and configured to load up on the docs site.
However, this is not a blocker IMO. The doc is still visible as raw markdown in the repo, though discoverability might be difficult for now until we set up a proper docs page for it.
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.
good question. I hadn't thought about where it should go that thoroughly.... docs site seems better than storybook for sure.
I'll see how that feels with the other guides that are more focused on how to use Atlantis rather than internal docs on how to build Atlantis, though iirc we do have at least a couple bits of documentation talking about internal build processes.
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.
added the extra entries required for it to show up on the docs site now. it does feel slightly out of place, getting into some details that realistically very few contributors outside of the primary team are going to need to think about, but I don't think it hurts to have documented like this 🤷
there's really nothing sensitive or secretive in it. if we felt like it though, could always move it to some internal docs.
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.
Storing under "Guides" makes sense to me, seeing we have "Contributing" docs under there too.
Nice improvements 👍
packages/components/package.json
Outdated
| "react-dom": "^18", | ||
| "react-hook-form": "^7", | ||
| "react-router-dom": "^6" | ||
| "react-router-dom": "^5" |
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 is a notable change that has theoretical impacts. I talked to Scott about it, and we're quite confident this was just an oversight since we want something in the ^5 range in our deps/devDeps
looking at our projects, we do have one that has ^6, but that's coming in from another dependency.
then the other project, interestingly it's only got 5.3.4 being used which is kind of weird. clearly our peerDep is not being respected which is fair, it's a very confusing defintion we have, and I guess it's resulting in being ignore so it should functionally have no difference there
probably worth using a pre-release on this to verify though, so I'll kick one off
|
Published Pre-release for 99be0f8 with versions: To install the new version(s) for Web run: To install the new version(s) for Mobile run: |
jdeichert
left a comment
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.
Looks great 👍
Just removing my approval after we discovered some issues with the pre-release in 1 consumer. Because deps of moved to devDeps, we're no longer shipping a thing we require as a peerDep and this specific consumer has various apps that are missing that peerDep.... because we supplied it before..
Motivations
we made a change some time ago that added a bunch of our external libraries to peerDeps. I believe this is all correct, and required for the overall ESM build change
https://github.com/GetJobber/atlantis/pull/1851/files#diff-2c76dc06185f93bec73660e15338433b95eac6707317564c0f778f5b9abe446cL78-R478
however, we did not then remove those same entires from
dependenciesso we find ourselves in a state where we haveand
and finally in
rollup.configforcomponentswhile a few of us have previously noticed this and remarked that it's not how we should be defining our deps, the main catalyst for this for me personally was getting stuck on trying to upgrade "framer-motion" and running into blockers with the version getting picked up, and then all these other "dependencies" getting their version specifier changed from the "peerDependencies" specifier, which leads to even more problems since for example
react-router-domis specified as^6vs our5. actually this is likely still an issue, having a full major version difference doesn't seem right.there's a small rabbit hole with that though because >6 ships with types, and you no longer need to import types - nor can you because they stop existing on later versions. so to deal with this we need to update our versions, imports and a few other small things.
Changes
Added
wrapping my head around this all took a moment and we don't have it documented anywhere. as such I've added a guide that provides context and hopefully helps us make the right dependency decision going forward.
it is largely LLM generated with some edits that I suggested, so please be as critical as you like with it. I will do the same.
Changed
moved some duplicated "dependencies" that also appear in "peerDependencies" into "devDependencies"
with the benefits of that being:
Deprecated
Removed
Fixed
Security
Testing
Changes can be
tested via Pre-release
In Atlantis we use Github's built in pull request reviews.