Skip to content

Bump styled-components from 4.4.1 to 5.1.1 in /packages/dashboard#473

Closed
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/packages/dashboard/styled-components-5.1.1
Closed

Bump styled-components from 4.4.1 to 5.1.1 in /packages/dashboard#473
dependabot[bot] wants to merge 1 commit into
masterfrom
dependabot/npm_and_yarn/packages/dashboard/styled-components-5.1.1

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 24, 2020

Copy link
Copy Markdown

Bumps styled-components from 4.4.1 to 5.1.1.

Release notes

Sourced from styled-components's releases.

v5.1.1

New Functionality

  • Implement shouldForwardProp API for native and primitive platforms, which was previously missing in [v5.1.0] (see #3093) This has been released under a patch bump instead of a minor, since it's only been missing from Native-support.

Bugfixes

  • Added useTheme hook to named exports for react-primitives entrypoint (see #2982) thanks @jladuval!
  • Escape every CSS ident character necessary when converting component display names to class names (see #3102) thanks @kripod!

v5.1.0

New Functionality

  • Add shouldForwardProp API (almost the same as emotion's, just a slightly different usage pattern); styled-components/styled-components#3006

    Sometimes when composing multiple higher-order components together, it's possible to get into scenarios when multiple layers consume props by the same name. In the past we've introduced various workarounds for popular props like "as" but this power-user API allows for more granular customization of what props are passed down to descendant component children when using the styled() HOC wrapper.

    When combined with other APIs like .attrs() this becomes a very powerful constellation of abilities.

    Here's how you use it:

    const Comp = styled('div').withConfig({
      shouldForwardProp: (prop, defaultValidatorFn) => !['filterThis'].includes(prop),
    })`
      color: red;
    `;
    render(<Comp filterThis="abc" passThru="def" />);
    Renders: <div className="[generated]" passThru="def"></div>

    The second argument defaultValidatorFn is what we use internally to validate props based on known HTML attributes. It's provided so you can filter exactly what props you don't wish to pass and then fall-back to the default filtering mechanism if desired.

    Other methods on the styled HOC like .attrs can be chained after withConfig(), and before opening your template literal:

    const Comp = styled('div').withConfig({
      shouldForwardProp: (prop, defaultValidatorFn) => !['filterThis'].includes(prop),
    }).attrs({ className: 'foo' })`
      color: red;
    `;
    render(<Comp filterThis="abc" passThru="def" />);
    Renders: <div className="[generated] foo" passThru="def"></div>

Changelog

Sourced from styled-components's changelog.

[v5.1.1] - 2020-04-07

New Functionality

  • Implement shouldForwardProp API for native and primitive platforms, which was previously missing in [v5.1.0] (see #3093) This has been released under a patch bump instead of a minor, since it's only been missing from Native-support.

Bugfixes

  • Added useTheme hook to named exports for react-primitives entrypoint (see #2982) thanks @jladuval!
  • Escape every CSS ident character necessary when converting component display names to class names (see #3102) thanks @kripod!

[v5.1.0] - 2020-04-07

New Functionality

  • Add shouldForwardProp API (almost the same as emotion's, just a slightly different usage pattern); styled-components/styled-components#3006

    Sometimes when composing multiple higher-order components together, it's possible to get into scenarios when multiple layers consume props by the same name. In the past we've introduced various workarounds for popular props like "as" but this power-user API allows for more granular customization of what props are passed down to descendant component children when using the styled() HOC wrapper.

    When combined with other APIs like .attrs() this becomes a very powerful constellation of abilities.

    Here's how you use it:

    const Comp = styled('div').withConfig({
      shouldForwardProp: (prop, defaultValidatorFn) => !['filterThis'].includes(prop),
    })`
      color: red;
    `;
    render(<Comp filterThis="abc" passThru="def" />);
    Renders: <div className="[generated]" passThru="def"></div>

    The second argument defaultValidatorFn is what we use internally to validate props based on known HTML attributes. It's provided so you can filter exactly what props you don't wish to pass and then fall-back to the default filtering mechanism if desired.

    Other methods on the styled HOC like .attrs can be chained after withConfig(), and before opening your template literal:

    const Comp = styled('div').withConfig({
      shouldForwardProp: (prop, defaultValidatorFn) => !['filterThis'].includes(prop),
    }).attrs({ className: 'foo' })`
      color: red;
    `;
    render(<Comp filterThis="abc" passThru="def" />);
    Renders: <div className="[generated] foo" passThru="def"></div>

Commits
  • f0a84f4 v5.1.1
  • 4add697 Implement shouldForwardProp for React Native/Primitives (#3107)
  • 01e5747 fix: escape every CSS ident character necessary (#3102)
  • 4893cbe export useTheme in primitives entrypoint #2975 (#3108)
  • e2f65c1 fix heading level
  • 2aa15b3 adjust changelog
  • c57a273 v5.1.0
  • 58538b7 shouldForwardProp receives the second argument, a default filter function
  • 8836289 add knowledge of react-is "typeof" to rollup
  • 55fc70a Bump acorn from 5.7.3 to 7.1.1 in /packages/styled-components (#3092)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

@dependabot dependabot Bot added the dependencies Pull requests that update a dependency file label Jun 24, 2020
@dependabot @github

dependabot Bot commented on behalf of github Sep 7, 2020

Copy link
Copy Markdown
Author

Superseded by #554.

@dependabot dependabot Bot closed this Sep 7, 2020
@dependabot dependabot Bot deleted the dependabot/npm_and_yarn/packages/dashboard/styled-components-5.1.1 branch September 7, 2020 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants