Skip to content

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

Merged
AbhiPrasad merged 1 commit into
masterfrom
abhi-package-json-typescript
Dec 10, 2021
Merged

build: Extract typescript pkg into main package.json#4242
AbhiPrasad merged 1 commit into
masterfrom
abhi-package-json-typescript

Conversation

@AbhiPrasad

Copy link
Copy Markdown
Contributor

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, iker-barriocanal and rhcarvalho and removed request for a team December 6, 2021 19:53
@github-actions

github-actions Bot commented Dec 6, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
Contributor 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
Copy Markdown
Contributor 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)

Comment thread packages/hub/package.json
Comment thread packages/minimal/package.json
Comment thread packages/types/package.json

@rhcarvalho rhcarvalho left a comment

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.

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
Copy Markdown
Contributor 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