Skip to content
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

build: Extract typescript pkg into main package.json #4242

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

AbhiPrasad
Copy link
Member

As prep for unifying our package.json, let's move dependencies that every package uses into the root package.json.

This patch does that for the typescript package.

@AbhiPrasad AbhiPrasad requested review from a team, rhcarvalho and iker-barriocanal and removed request for a team December 6, 2021 19:53
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2021

size-limit report

Path Base Size (6f6ced2) Current Size Change
@sentry/browser - CDN Bundle (gzipped) 22.44 KB 22.45 KB +0.02% 🔺
@sentry/browser - Webpack 23.29 KB 23.29 KB 0%
@sentry/react - Webpack 23.32 KB 23.32 KB 0%
@sentry/nextjs Client - Webpack 48.07 KB 48.07 KB 0%
@sentry/browser + @sentry/tracing - CDN Bundle (gzipped) 29.98 KB 29.98 KB +0.01% 🔺

@AbhiPrasad AbhiPrasad force-pushed the abhi-package-json-typescript branch from 0b0e109 to eb2feba Compare December 7, 2021 15:15
"devDependencies": {
"typescript": "3.7.5"
},
"devDependencies": {},
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"devDependencies": {},

?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah this is because I just find and replaced the value. I can update.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually I'm going to leave it like this. This makes makes the diff when adding new packages much cleaner (which in turn makes git blame easier to understand in the future)

packages/hub/package.json Show resolved Hide resolved
packages/minimal/package.json Show resolved Hide resolved
packages/types/package.json Show resolved Hide resolved
Copy link
Contributor

@rhcarvalho rhcarvalho left a comment

Choose a reason for hiding this comment

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

Isn't this change going to make it harder to work on single packages in isolation? (In particular because certain requirements become implicit/defined elsewhere).

One of the supposed advantages of having multiple packages is not being forced to upgrade everything in lock step. If we do this change, I imagine will be in a situation of all or nothing when trying to upgrade common dependencies including typescript version.

@AbhiPrasad
Copy link
Member Author

We use a common tsconfig for all of our packages, so having inconsistent typescript versions will lead to problems.

In addition, certain packages having different versions than others can cause problems. Having a single source of truth (the main package.json) is easier maintence wise.

typescript (because of the variety of issues it introduces), should for sure be an all or nothing change - a common dependency. Having these spread out just create potential for problems or inconsistencies.

Isn't this change going to make it harder to work on single packages in isolation? (In particular because certain requirements become implicit/defined elsewhere).

No, because yarn workspaces should take care of everything being resolved correctly.

@AbhiPrasad AbhiPrasad force-pushed the abhi-package-json-typescript branch from eb2feba to 7e1cf0f Compare December 10, 2021 15:10
@AbhiPrasad AbhiPrasad enabled auto-merge (squash) December 10, 2021 15:11
@AbhiPrasad AbhiPrasad merged commit 7ff913a into master Dec 10, 2021
@AbhiPrasad AbhiPrasad deleted the abhi-package-json-typescript branch December 10, 2021 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants