Skip to content

Increase size limit for openapi-fetch #2039

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

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Increase size limit for openapi-fetch #2039

merged 1 commit into from
Dec 10, 2024

Conversation

drwpow
Copy link
Contributor

@drwpow drwpow commented Dec 4, 2024

Changes

A recent PR increased the weight of openapi-fetch by ~0.2kb. This is all perfectly-safe, and normal, especially with handwritten code.

The size-limits check isn’t to try to get us to participate in code golf or enforce arbitrary limits. Especially in openapi-fetch’s case, the purpose is to:

  1. Guard against sneaky package dependencies (openapi-fetch as of now should have no dependencies; just a single one could increase it by 30kb or more!)
  2. Set a baseline for size. We just want to have a gauge of roughly how big this package is (also so we know when to Find + Replace all the docs that brag about its size :P)
  3. Help reviewers catch unintentional increases. It is very easy to miss a one-line package import in a PR review. This should be an automated check.

For all these reasons, size-limit is NOT a required check, because it shouldn’t block PRs. But if failing, it should force follow-up PRs like this one.

How to Review

  • CI should pass

Checklist

  • Unit tests updated
  • docs/ updated (if necessary)
  • pnpm run update:examples run (only applicable for openapi-typescript)

@drwpow drwpow requested a review from a team as a code owner December 4, 2024 15:45
@drwpow drwpow requested a review from kerwanp December 4, 2024 15:45
Copy link

changeset-bot bot commented Dec 4, 2024

⚠️ No Changeset found

Latest commit: 38c5689

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Dec 4, 2024

size-limit report 📦

Path Size
packages/openapi-fetch/dist/index.min.js 6.42 KB (0%)

@drwpow drwpow merged commit 713ea1b into main Dec 10, 2024
11 checks passed
@drwpow drwpow deleted the fix-size branch December 10, 2024 15:49
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.

1 participant