Skip to content

Add support for component size limits #690

Open
@JordanForeman

Description

@JordanForeman

Is your feature request related to a problem? Please describe.

I want to define a perf budget in the form of a maximum component size. ds size allows me to set thresholds for changesets, but not for a component totally.

Describe the solution you'd like

The ds size command presently only considers the diff in size between the current changeset and the current release. I believe that with some minimal changes, we should be able to support a size limit for components.

It would be ideal to be able to specify a size limit on a component-by-component basis. I'm super new to this codebase, but it seems like ds.config is system-wide. If it's possible to make component-specific configurations, then exposing a size.limit configuration for a given component that is enforced by ds size would be great. Barring that, setting a size.limit for all components should be feasible as well.

Describe alternatives you've considered

  • ds size will can result in a report being added to Pull Requests via comments. It's possible to enforce a size limit by refusing to approve PRs where a limit is surpassed. ie. team norms
  • Possible to author instrumentation that parses output of ds size and fails if a limit is surpassed

Additional context

👋

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions