Skip to content

build: Update monorepo internal dependencies#2976

Open
edison-cy-yang wants to merge 8 commits intomasterfrom
edi_cleanup_internal_dependencies
Open

build: Update monorepo internal dependencies#2976
edison-cy-yang wants to merge 8 commits intomasterfrom
edi_cleanup_internal_dependencies

Conversation

@edison-cy-yang
Copy link
Copy Markdown
Contributor

@edison-cy-yang edison-cy-yang commented Mar 11, 2026

Motivations

While trying to implement Turborepo caching in this repo, I found a few issues with how we're managing internal dependencies in the repo:

  • Internal packages listed in the root package.json. This was probably from us building for Storybook v7 at root previously
  • internal packages listed in peerDependencies but not in devDependencies, and sometimes in dependencies at the same time
  • Internal dependency just simply not listed (hooks depends on formatters)

This PR fixes the internal dependencies in the monorepo.

Changes

components-native

  • @jobber/hooks added to peerDependencies
  • Both @jobber/hooks and @jobber/design added to devDependencies
  • Set tsconfig.build.tsbuildinfo to not be shipped in bundle output

components

  • @jobber/formatters removed from dependencies
  • @jobber/formatters @jobber/design @jobber/hooks added to devDependencies
  • @jobber/formatters added to peerDependencies

hooks

  • @jobber/formatters added to peerDependencies

root

  • Removed all @jobber/* packages from devDependencies

Added

Changed

Deprecated

Removed

Fixed

Security

Testing

Changes can be
tested via Pre-release


In Atlantis we use Github's built in pull request reviews.

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 11, 2026

Deploying atlantis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2e16e3a
Status: ✅  Deploy successful!
Preview URL: https://e20b5c51.atlantis.pages.dev
Branch Preview URL: https://edi-cleanup-internal-depende.atlantis.pages.dev

View logs

"@csstools/postcss-global-data": "^1.0.3",
"@jobber/design": "*",
"@jobber/formatters": "^0.5.0",
"@jobber/hooks": ">=2",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This >= 2 is an issue and makes CI fail on scripts/preventManualRelease.js. The script only checks for @jobber/ dependencies in dependencies or devDependencies. @jdeichert I dont have too much context on what kind of manual release we were trying to prevent, but wondering if it makes sense to update the check to allow >=?

Copy link
Copy Markdown
Contributor

@jdeichert jdeichert Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ha, that's interesting and I'm actually not sure why that script fails on that.

However, I did try this with * instead and I think that's completely fine? Your peerDep rule means that >=2 is required, and the devDep being * seems to work fine. At least bootstrap succeeds for me.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdeichert thinking about this more, the version in devDep probably doesn't matter for the internal dependencies? The "version" will be whatever that's in the codebase right now.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yupp, that's why I think * is fine!

@edison-cy-yang
Copy link
Copy Markdown
Contributor Author

@jdeichert I ran the diff output action and there are diffs. However I think there will always be diffs since package.json is updated. Would it be better to diff excluding package.json and *.tsbuildinfo?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 11, 2026

Published Pre-release for 753c899 with versions:

  - @jobber/components@6.115.3-edicleanu-753c899.3+753c89916
  - @jobber/components-native@0.97.2-edicleanu-753c899.26+753c89916
  - @jobber/design@0.92.1-edicleanu-753c899.11+753c89916
  - @jobber/eslint-config@0.13.3-edicleanu-753c899.1300+753c89916
  - @jobber/formatters@0.5.1-edicleanu-753c899.262+753c89916
  - @jobber/generators@0.12.6-edicleanu-753c899.1+753c89916
  - @jobber/hooks@2.19.4-edicleanu-753c899.153+753c89916
  - @jobber/stylelint-config@0.7.3-edicleanu-753c899.1300+753c89916

To install the new version(s) for Web run:

npm install @jobber/components@6.115.3-edicleanu-753c899.3+753c89916 @jobber/design@0.92.1-edicleanu-753c899.11+753c89916 @jobber/eslint-config@0.13.3-edicleanu-753c899.1300+753c89916 @jobber/formatters@0.5.1-edicleanu-753c899.262+753c89916 @jobber/generators@0.12.6-edicleanu-753c899.1+753c89916 @jobber/hooks@2.19.4-edicleanu-753c899.153+753c89916 @jobber/stylelint-config@0.7.3-edicleanu-753c899.1300+753c89916

To install the new version(s) for Mobile run:

npm install @jobber/components-native@0.97.2-edicleanu-753c899.26+753c89916 @jobber/design@0.92.1-edicleanu-753c899.11+753c89916 @jobber/eslint-config@0.13.3-edicleanu-753c899.1300+753c89916 @jobber/formatters@0.5.1-edicleanu-753c899.262+753c89916 @jobber/generators@0.12.6-edicleanu-753c899.1+753c89916 @jobber/hooks@2.19.4-edicleanu-753c899.153+753c89916 @jobber/stylelint-config@0.7.3-edicleanu-753c899.1300+753c89916

@jdeichert
Copy link
Copy Markdown
Contributor

@jdeichert I ran the diff output action and there are diffs. However I think there will always be diffs since package.json is updated. Would it be better to diff excluding package.json and *.tsbuildinfo?

@edison-cy-yang I saw your diff output.

  1. Should we ignore package.json? I don't think we need to! Most of the time, the diff will be small and although we know it will cause a diff, the Diff Outputs action failing on that is not a bad thing, it's just validating our expectations that things are changing in terms of what the shipped package includes. If this becomes really annoying, I guess we could make a workflow option that disables diffing package.json. I just personally don't think it's a bad thing 👍

  2. Should we ignore *.tsbuildinfo? Actually, this seems like a file we shouldn't be shipping in our package at all? Possibly package.json files array needs to be updated to exclude *.tsbuildinfo. You could make that cleanup here, or we could open a separate PR to do that.

@edison-cy-yang
Copy link
Copy Markdown
Contributor Author

@jdeichert I ran the diff output action and there are diffs. However I think there will always be diffs since package.json is updated. Would it be better to diff excluding package.json and *.tsbuildinfo?

@edison-cy-yang I saw your diff output.

  1. Should we ignore package.json? I don't think we need to! Most of the time, the diff will be small and although we know it will cause a diff, the Diff Outputs action failing on that is not a bad thing, it's just validating our expectations that things are changing in terms of what the shipped package includes. If this becomes really annoying, I guess we could make a workflow option that disables diffing package.json. I just personally don't think it's a bad thing 👍
  2. Should we ignore *.tsbuildinfo? Actually, this seems like a file we shouldn't be shipping in our package at all? Possibly package.json files array needs to be updated to exclude *.tsbuildinfo. You could make that cleanup here, or we could open a separate PR to do that.

@jdeichert I did the tsbuildinfo cleanup. AS you can see from this output diff, the only differences are package.json, tsconfig.build.json and tsconfig.build.tsbuildinfo gone from bundle output.

@edison-cy-yang edison-cy-yang marked this pull request as ready for review March 13, 2026 21:44
@edison-cy-yang edison-cy-yang requested a review from a team as a code owner March 13, 2026 21:44
@jdeichert
Copy link
Copy Markdown
Contributor

I did the tsbuildinfo cleanup. AS you can see from this output diff, the only differences are package.json, tsconfig.build.json and tsconfig.build.tsbuildinfo gone from bundle output.

Yupp, looks good! I do question whether tsconfig.build.json and tsconfig.json should be included in the dist dir, looks like they do get bundled right now. I found it's because they were missing in the exclude config. Up to you if you want to make this change here or not.

I'll complete my review next week 👍

Screenshot 2026-03-13 at 3 04 17 PM

"bootstrap": "npm run build",
"prepack": "npm run build",
"compile": "tsc -p tsconfig.build.json",
"build:clean": "rm -rf ./dist",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

npm run clean was not called when running npm run build. This build:clean does not delete the build cache. Removing this script to be more consistent with other packages.

@edison-cy-yang
Copy link
Copy Markdown
Contributor Author

@jdeichert New diff shows that tsconfig.build.json, tsconfig.json, and tsconfig.build.tsbuildinfo are all removed from the bundle output. The only other change is package.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants