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

Update dependency polished to v4 #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Oct 27, 2020

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
polished (source) ^1.4.1 -> ^4.0.0 age adoption passing confidence

Release Notes

styled-components/polished

v4.2.2

Compare Source

Bug Fixes

  • Color Modules - addresses an issue with longer floats in color values. (#​610 - Thanks to @​levymetal)

v4.2.1

Compare Source

Bug Fixes

  • hls(a) - now properly parses percentages for opacity.
  • rgb(a) - now properly parses percentages for opacity.

v4.2.0

Compare Source

Improvements
  • color Modules - now support space-separated CSS color values for rgb(a) and hsl(a). (#​605)
  • rgb - now accepts optional opacity value.
  • hsl - now accepts optional opacity value.

v4.1.4

Compare Source

Bug Fixes

  • mix - remove unnecessary division by 1 (#​59)

v4.1.3

Compare Source

Bug Fixes

  • Addressed several performance issues with regexes.

v4.1.2

Compare Source

Bug Fixes

  • fluidRange - updated return value to use an array to address unclear object property typing error in flow.

v4.1.1

Compare Source

Bug Fixes

  • scarf - removed scarf analytics package due to yarn incompatibilities and concerns over GDPR compliance.

v4.1.0

Compare Source

Introducing polished.js v4.1.0!

We're super stoked to announce that polished.js v4.1.0 is officially out! It is available via your package manager of choice. This will be the final non-patch release before v5.

npm install polished
yarn add polished

Release Highlights

New Module
  • remToPx: We've introduced a new module to handle converting to rem values to px values. (#​376)
Analytics
  • We are now leveraging Scarf to track package analytics. You can opt-out of this functionality by following these instructions

v4.0.5

Compare Source

Documentation

  • readableColor - Update docs and function signature to be clearer about the use of each parameter.

v4.0.4

Compare Source

Bug Fixes

  • transparentize - addressed an issue where we weren't handling cases where floats were greater than 2 decimals. (#​548)
  • npm - addressed an issue where .yarn cache was bloating published package size, along with some other ignore optimization. (#​553 Thanks @​scttcper)

v4.0.3

Compare Source

Bug Fix

v4.0.2

Bug Fix

  • ellipsis: Fixes an issue where the webkit prefix was not properly applied with the multiline option. (Thanks @​drakang4 - #​546)

v3.7.2: LTS

Compare Source

Bug Fixes

  • Addressed several performance issues with regexes.

v3.7.1: LTS

Compare Source

Bug Fixes

  • scarf - removed scarf analytics package due to yarn incompatibilities and concerns over GDPR compliance.

v3.7.0: LTS

Compare Source

Introducing polished.js v3.7.0 LTS!

We're excited to release v3.7.0, polished's first Long Term Support (LTS) branch. We will continue to back-port critical bug and security fixes to this branch until the release of v5, at which point v4 will become the new LTS branch. This release also officially deprecates polished v2.x.x.

npm install polished@lts
yarn add polished@lts

Release Highlights

Improvements & Bug Fixes
  • between: now properly throws an error when mixed units are used for from/toSize and min/maxScreen. This also fixes the same bug in fluidRange. (#​445)
  • readableColor - Update docs and function signature to be clearer about the use of each parameter.
    • transparentize - addressed an issue where we weren't handling cases where floats were greater than 2 decimals. (#​548)
  • triangle Improvement: once again properly works with inherit by setting individual properties when inherit is used. (#​430)
  • npm - addressed an issue where .yarn cache was bloating published package size, along with some other ignore optimization. (#​553 Thanks @​scttcper)
Contributor Improvements
  • prettier: We've implemented .prettierrc and .prettierignore to better control formatting in development environments.
  • Build Speed: Build speed has been improved by removing extraneous linting scripts.

v3.6.7

Compare Source

Bug Fix

  • linearGradient: Properly handles rgba values as the first color stop value and consistently formats all rgba calues in color stops.

v3.6.6

Compare Source

  • Security updates to build dependencies
  • Changes to support the transition from master to main as default branch

v3.6.5

Compare Source

Bug Fix

  • cssVar: Properly handles the exception where the document object is not available in non-browser environments (#​518). This simply throws a proper error. It does not enable cssVar to work server-side.

v3.6.4

Compare Source

Bug Fix

  • rgbToString: Fixes an issue where passing a rgba color with 0 alpha was incorrectly returning a hex value (#​515)

v3.6.3

Compare Source

Bug Fix

  • normalize: Updates to normalize.css 8.0.1 to fix a regression to fix a regression with main not being set to display: block.

v3.6.2

Compare Source

Bug Fix

  • Removes esmodules: true from the esm build to fix an issue with ES5 support.

v3.6.1

Compare Source

Bug Fix

  • Remove extraneous jsnext:main bundle reference that was not pointing to an ES5 compatible build.

v3.6.0

Compare Source

Build Enhancements

  • Build a commonjs bundle and make it the new main bundle.
  • Target only browsers that support ESModules for the esm bundle and leverage bugfixes: true.
  • Add specific brower support to non-esm bundles.
  • Replace uglify with terser on minified standalone build.
  • Standalone build now comes with runtime helpers on board.
  • Upgrade dependencies.

v3.5.2

Compare Source

Bug Fixes
  • cssVar: fixed issue where CSS variables set my stylesheets were returning with a leading space and breaking other polished modules when passed the return value. (#​493)

v3.5.1

Compare Source

Bug Fixes
  • between, modularScale, triangle: fixed issue where these modules were calling deprecated functionality in stripUnit and creating unnecessary console noise (and subsequent performance problems).

v3.5.0

Compare Source

Introducing polished.js v3.5.0!

We're super stoked to announce that polished.js v3.5.0 is officially out! It is available via your package manager of choice. This will be the final non-patch release before v4.

npm install polished
yarn add polished

Release Highlights

New Modules
  • cssVar: We've introduced a new module to handle fetching CSS Variable values. We chose to make this a standalone module as opposed to integrating it into all modules to keep module size down.
Improvements
  • readableColor: You can now turn on strict mode for custom provided return colors. This will ensure that they still meet AA contrasting standards. Otherwise, they will return black or white as normal. This mode is off by default in v3.5. (Thanks @​mrmckeb).
Bug Fixes
  • mix, tint, shade: Fixed a bug where mix was improperly weighting alpha channels to the second provided color instead of the first. This fix also impacts tint and shade which implement mix.
Contributors
  • Build has been updated to use Rollup 2.
  • Moved CI to GitHub Actions.
  • We now test the build in macOS, Ubuntu, and Windows to ensure all contributors are covered for compatibility.
Future Deprecations
  • Deprecation: stripUnit: The optional unit return will be deprecated in v4. Previously, this was implemented to replace getValueAndUnit. However, we've decided to keep the extra module and simplify stripUnit
  • Deprecation: readableColor: strict mode will be enabled by default in v4, it is currently disabled by default.

v3.4.4

Compare Source

Bug Fixes
  • position: fix typing for position to address typescript incompatability (63ab9a6), closes #​475

v3.4.3

Compare Source

Bug Fixes
Enhancements
  • Adds more tagging for easier discoverability - Thanks @​nurbek-ab

v3.4.2

Compare Source

  • hsl(a) - Fixed a bug preventing the use of decimal values.

v3.4.1

Compare Source

  • between (and therefore fluidRange) now supports unitless values for fromSize and toSize.

v3.4.0

Compare Source

  • Adds a color module (getContrast) for getting the contrast score between two colors.
  • Adds a color module (meetsContrastGuidelines) for checking which contrast guidelines have been met between two colors.

Thanks @​souporserious!

v3.3.2

Compare Source

  • (Color Modules) - Fixes a bug that would cause hue to be negative in some cases instead of rotating around the color wheel to a positive value. Thanks @​DavidDeprost

v3.3.1

Compare Source

Bug Fixes
  • hslToRgb: correct % for potential negative hue (5c306c8), closes #​437

v3.3.0

Compare Source

  • modularScale now supports all base values regardless of unit, including unitless values. (fixes #​429)
  • parseToRGB is now case-insensitive (thanks @​Andarist)
  • refactored export statements across the library resulting in a small decrease in bundle size.

v3.2.1

Compare Source

Bug Fixes
  • modularScale: Remove rem/em restriction (70f373e)

v3.2.0

Compare Source

  • triangle now supports intermediate directions (i.e. 'topLeft'). In most cases, it will now also
    return a smaller object than prior by combining colors into a single 'borderColor' line. (#​399)
  • triangle no longer relies on borderColorordirectionalProperty`, and therefore has a smaller bundle size.
  • fixed a bug withtriangle where passing a unitless number to triangle defaulted to a pixel value. It will instead return the unitless value.

v3.1.0

Compare Source

  • fontFace now can provide optional format hints for each file src using the formatHint configuration option. (#​416)
  • fontFace now supports a base64 encoded dataURI as the value for fontFilePath. Currently, only supports a single base64 value. Can also optionally use formatHint if fileFormats is passed. (#​416)

v3.0.4

Compare Source

  • Fixes a bug with production error logging that was pointing to non-existent documentation.

v3.0.3

Compare Source

  • adds sideEffects: false to the package.json
  • reorganizes package.json
  • moves babel-plugin-preval to devDependencies
  • Updates README.MD with note about moduleResolution: node

v3.0.2

Compare Source

  • Replaced negative lookbehind when matching seconds. This wasn't supported in all browsers.

v3.0.1

Compare Source

  • Fixes an issue where math would not work in IE11 (due to lack of support for Object.values). Thanks @​goldsziggy!
  • Adds support for s, ms, deg, gd, rad, grad, & turn in math functions.

v3.0.0: polished.js v3 is out!

Compare Source

Introducing polished.js v3!

We're super stoked to announce that polished.js v3 is officially out! It is available via your package manager of choice:

npm install polished
yarn add polished

Release Highlights

New Modules
  • New Module: linearGradient: We've introduced a new module to handle generating linear gradients. linearGradient accepts an array of color stops, and optional directions and fallback to generate a linear gradient with a single color background fallback.
  • New Module: math: We've introduced a new module to handle doing calculations on CSS values. math accepts a formula as a string and currently supports addition, subtraction, multiplication, division, square root, powers, factorial, min, max, and modification of order of operations parentheses. This can also be extended to incorporate other mathematical functions.
  • New Module: hslToColorString: Converts a HslColor or HslaColor object to a color string. (Thanks @​sandiiarov)
  • New Module: rgbToColorString: Converts a RgbColor or RgbaColor object to a color string. (Thanks @​sandiiarov)
Improvements
  • New Error System: We now have the base for our long promised error system (Thanks @​Andarist). All current errors will now show up in development, but will be stripped out and linked to our error.md in production. This reduces the overall bundle size and will set us up for our much more thorough error system coming in v4.
  • Color Module Improvement: All color modules now safely handle the transparent keyword instead of erroring out. How each module handles this is slightly different, but you wll always get a valid color or transparent back when passing transparent to a color module.
  • Color Module Improvement: Color modules that were using toColorString now properly use hslToColorString and rgbToColorString where appropriate. This speeds up color modules that were previously leveraging toColorString to convert colors between formats. (Thanks @​sandiiarov)
  • modularScale Improvement: modularScale now also accepts rem values for its base, where previously it only worked with em.
  • readableColor Improvement: readableColor now offers the option to set the color(s) it returns for light or dark colors. Otherwise, it will work the way it always has, either returning white or black based on the passed colors luminosity.
  • stripUnit Improvement: stripUnit now offers the option to return the value and unit as an array, replacing the functionality of getValueAndUnit. Without this option, it will continue to return just the stripped value.
Future Breaking Changes
  • Marked For Deprecation: getValueAndUnit: getValueAndUnit has been marked for deprecation and will be removed in v4. This in someways duplicated functionality available in stripUnit. Instead of having two similar modules,stripUnit has been improved to optionally return the stripped unit as part of an array.
Breaking Changes
  • Deprecation: selection: As indicated in the v2 release notes, selection has been deprecated. All css-in-js libraries handle this selector without additional prefixing from polished.
  • Deprecation: placeholder: As indicated in the v2 release notes, placeholder has been deprecated. All css-in-js libraries handle this selector without additional prefixing from polished.

Coming In v4

As usual, we will be taking a bit of a break from major work for a couple months, but we are already planning out v4. This release will largely focus on library-wide impact, and likely won't include any new functionality. Here is the current state of the roadmap:

  • Improved errors - We will be doing a complete re-write of our errors to drastically improve the developer experience.
  • New Docs - polished.js has grown into a pretty robust library with a wide array of uses cases. There are a lot of things it can do that people are not aware of. Our aim with the new docs site is to provide a lot more insight on how to leverage polished.js regardless of your CSS-In-JS lirbary.
  • Truly Support babel-plugin-polished - This plugin has been around since the early days of polished.js, but we've never taken official ownership of it. We will be pulling it forward in v4, updating it, and incorporating it into our testing and docs.
  • Scoped Packages - Starting in v4, we are going to start offering sub-sections of polished.js as scoped packages. Plenty of users only use certain portions, and we want to provide them a smaller way to get the portions they use.
  • Performance Audit - One thing we need to spend more time on is the performance of polished.js. We plan on performance testing each module in isolation and identifying areas for improvement in v4.
  • Size Audit- Bundle size has always been tricky with polished.js. Due to the nature of the library, we have really focused on the total size, and instead of supported tree-shaking and individual imports to keep bundle-size impact down. That being said, we will be doing an module-by-module audit to see where we can bring file size down.
  • Deprecate getValueAndUnit - v4 will see this module fully deprecated.

v2.3.3

Compare Source

Bug Fixes
  • types/deps: Update types and deps (8235d9d)

v2.3.2

Compare Source

Bug Fixes
  • Flow: add required annotations (940692a)

v2.3.1

Compare Source

Bug Fixes
  • normalize: Fix hyphenated rule in normalize (cf25f2d)

v2.3.0

Compare Source

Features
  • triangle: add ability to use float values for triangle width/height (5634c64)

v2.2.0

Compare Source

Features
  • shade: function should mix a color WITH black (fd34015)
  • tint: function should mix a color WITH white (2e9ce03)

v2.1.1

Compare Source

Feature

  • Color modules now support 4-Digit Hex code shorthands (#​368).

Build

  • Build has been upgraded to use Babel 7. (Thanks @​TrySound!)

v2.0.3

Compare Source

Bug Fixes
  • ellipsis: Remove inline-flex from ellipsis. (9d8300e), closes #​360

v2.0.2

Compare Source

Bug Fixes
  • types: Updated types to be compatible with styled-components. (5c684e6), closes #​348

v2.0.1

Compare Source

Bug Fixes
  • parseToHSL: parseToHSL can now handle float values for hue (d1d1f40), closes #​343

v2.0.0

Compare Source

This is a major release that introduces new modules, improvements to existing modules, bug fixes, improved TypeScript and Flow Support, and some deprecations.

Breaking Changes

We introduced one necessary breaking change in this release. In the future, we will warn a full major version ahead of time, but this one necessitated an immediate fix. (Un)luckily, it was never working properly in the first place.

  • mix color module now requires a ratio in order to work. It originally tried to default to .5 but this broke in most cases.

Deprecations

These items have been marked for deprecation in v3 of polished.

  • placeholder mixin is no longer required to address gaps in vendor prefixing in major CSS-in-JS libraries.
  • selection mixin is no longer required to address gaps in vendor prefixing in major CSS-in-JS libraries.

These items have been deprecated immediately as the change doesn't introduce any breaking changes. However, you will want to update your code accordingly.

  • normalize no longer accepts excludeOpinionated as a parameter, as opinionated rules have been removed in the latest versions of normalize.css.

New Modules

This release addresses our most popular feature requests as voted on by users. If something you were hoping for didn't make it, you can make your voice heard by 👍a module request in our issues.

Mixins
  • between mixin added to return a CSS calc formula for linear interpolation of a property between two values.
  • cover mixin added to return CSS to fully cover an area similar to background-image: cover.
  • fluidRange mixin added to returns a set of media queries that resizes a property (or set of properties) between a provided fromSize and toSize linearly.
Shorthands
  • border shorthand added to return shorthand for the border property that splits out individual properties for use with tools like Fela and Styletron.
Helpers
  • getValueAndUnit helper added returns a given CSS value and its unit as elements of an array.

New Features

We have made a variety of improvements to existing modules as well.

Mixins
  • fontFace now supports font-display, font-variation-settings, and font-feature-settings.
  • triangle now supports any unit of measure instead of just px. (Thanks @​lifeiscontent)
  • normalize has been upgraded to use normalize.css 8.0.
Color Modules
  • All color modules now support hex color values with alpha values (commonly referred to as 8-Digit hex colors).
  • All color modules now support string values for all parameters.
  • mix fixed an issue where mix would not curry properly.
Shorthands
  • transitions now supports applying the same transition to multiple properties in one call.

Bug Fixes

Mixins
  • ellipsis - fixed a bug to avoid potential white-space issues with display: inline-block.
  • normalize - fixed an issue where vendor prefixed values were not properly camel-cased.
  • retinaImage- fixed a bug that was causing background-image to be set to undefined (instead of not set at all) when a background image is not passed.
Flow
  • mix now properly passes flow tests in all cases, including when curried.
  • All Modules now uses the Styles type for better compatibility with CSS-In-JS libraries and their Flow type definitions. (Thanks @​vhfmag)
  • All Modules - fixed various issues with typings including improperly declared optional parameters, too loose array definitions, and inadequate object property strictness.
  • All custom types are now exported separately for use elsewhere instead of being embedded with specific modules.
TypeScript (Thanks @​ForbesLindesay)
  • TypeScript build now works properly in Windows
  • Added additional TypeScript tests for all modules.
  • TypeScript definitions properly generate regardless of module export policy.
  • All Modules now uses the Styles type for better compatibility with CSS-In-JS libraries and their TypeScript definitions. (Thanks @​vhfmag)
Documentation
  • Docs have been upgraded to the latest version of documentation.js and generation should no longer randomly break for contributors.
  • triangle documentation now properly displays.
  • toColorString documentation now properly displays.
  • Variety of clarifications and typo fixes.

v1.9.3

Compare Source

Bug Fixes

v1.9.2

Compare Source

Bug Fixes
  • build: Centralized babel config to prevent accidental mismatches (#​293) (ee912ff)

v1.9.1

Compare Source

Bug Fixes
  • package: Add version to package.json for release. (#​291) (5dc4f4e)
  • semantic-release: Fixes travis config for semantic-release (#​290) (669389e)

v1.9.0

Compare Source

Features

v1.8.2

Compare Source

Performance Improvements
  • tooling: Use loose mode for the babel transpilation (#​263) (fe7639f)

v1.8.1

Compare Source

Bug Fixes
  • Library: permit zero for directionalProperty, borderRadius (#​259) (7dc4117)

v1.8.0

Compare Source

Features
Performance Improvements
  • deps: Removed annotations from the source, annotating automatically with a babel plugin (#​253) (62f7def)

v1.7.0

Compare Source

Features

v1.6.2

Compare Source

Bug Fixes

v1.6.1

Compare Source

Bug Fixes
  • Docs: Remove redundant TOC from README and add TypeScript section. (#​237) (63b24f4)

v1.6.0

Compare Source

Features
  • Typescript: Typescript Defs and Flow Improvements (#​236) (70794c5)

v1.5.0

Compare Source

Features

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/polished-4.x branch 2 times, most recently from c5c82f8 to 778c721 Compare February 11, 2021 15:46
@renovate renovate bot force-pushed the renovate/polished-4.x branch from 778c721 to e5ef21f Compare April 19, 2021 21:13
@renovate
Copy link
Contributor Author

renovate bot commented Mar 24, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

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