Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: styled-components/polished
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.1.2
Choose a base ref
...
head repository: styled-components/polished
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.3
Choose a head ref
  • 8 commits
  • 7 files changed
  • 2 contributors

Commits on May 8, 2021

  1. Copy the full SHA
    57afbcb View commit details
  2. Build(deps): Bump lodash from 4.17.20 to 4.17.21

    Bumps [lodash](https://github.com/lodash/lodash) from 4.17.20 to 4.17.21.
    - [Release notes](https://github.com/lodash/lodash/releases)
    - [Commits](lodash/lodash@4.17.20...4.17.21)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and bhough committed May 8, 2021
    Copy the full SHA
    aefdc41 View commit details

Commits on May 12, 2021

  1. Build(deps): Bump hosted-git-info from 2.8.8 to 2.8.9

    Bumps [hosted-git-info](https://github.com/npm/hosted-git-info) from 2.8.8 to 2.8.9.
    - [Release notes](https://github.com/npm/hosted-git-info/releases)
    - [Changelog](https://github.com/npm/hosted-git-info/blob/v2.8.9/CHANGELOG.md)
    - [Commits](npm/hosted-git-info@v2.8.8...v2.8.9)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and bhough committed May 12, 2021
    Copy the full SHA
    8ebe113 View commit details

Commits on May 25, 2021

  1. Build(deps): Bump browserslist from 4.14.3 to 4.16.6

    Bumps [browserslist](https://github.com/browserslist/browserslist) from 4.14.3 to 4.16.6.
    - [Release notes](https://github.com/browserslist/browserslist/releases)
    - [Changelog](https://github.com/browserslist/browserslist/blob/main/CHANGELOG.md)
    - [Commits](browserslist/browserslist@4.14.3...4.16.6)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and bhough committed May 25, 2021
    Copy the full SHA
    0663291 View commit details

Commits on May 29, 2021

  1. Build(deps): Bump ws from 7.3.1 to 7.4.6

    Bumps [ws](https://github.com/websockets/ws) from 7.3.1 to 7.4.6.
    - [Release notes](https://github.com/websockets/ws/releases)
    - [Commits](websockets/ws@7.3.1...7.4.6)
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored and bhough committed May 29, 2021
    Copy the full SHA
    8cceac1 View commit details

Commits on May 31, 2021

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7f551f1 View commit details
  2. Copy the full SHA
    d51efba View commit details
  3. chore(jest): pin version

    bhough committed May 31, 2021
    Copy the full SHA
    e483693 View commit details
Showing with 793 additions and 495 deletions.
  1. +4 −0 .husky/post-commit
  2. +1 −1 .husky/pre-commit
  3. +3 −3 docs/assets/polished.js
  4. +14 −20 package.json
  5. +2 −2 src/color/parseToRgb.js
  6. +1 −1 src/mixins/fontFace.js
  7. +768 −468 yarn.lock
4 changes: 4 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

validate-commit-msg
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npm test
lint-staged --debug
6 changes: 3 additions & 3 deletions docs/assets/polished.js
Original file line number Diff line number Diff line change
@@ -1328,7 +1328,7 @@
}

function isDataURI(fontFilePath) {
return !!fontFilePath.match(dataURIRegex);
return !!fontFilePath.replace(/\s+/g, ' ').match(dataURIRegex);
}

function generateFileReferences(fontFilePath, fileFormats, formatHint) {
@@ -2361,7 +2361,7 @@
};
}

var rgbaMatched = rgbaRegex.exec(normalizedColor);
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));

if (rgbaMatched) {
return {
@@ -2392,7 +2392,7 @@
};
}

var hslaMatched = hslaRegex.exec(normalizedColor);
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));

if (hslaMatched) {
var _hue = parseInt("" + hslaMatched[1], 10);
34 changes: 14 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "polished",
"version": "4.1.2",
"version": "4.1.3",
"description": "A lightweight toolset for writing styles in Javascript.",
"license": "MIT",
"author": "Brian Hough <hello@brianhough.net> (https://polished.js.org)",
@@ -63,17 +63,17 @@
"build:lib": "src/**/*.js"
},
"dependencies": {
"@babel/runtime": "^7.13.17"
"@babel/runtime": "^7.14.0"
},
"devDependencies": {
"@babel/cli": "^7.13.16",
"@babel/core": "^7.13.16",
"@babel/plugin-transform-runtime": "^7.13.15",
"@babel/cli": "^7.14.3",
"@babel/core": "^7.14.3",
"@babel/plugin-transform-runtime": "^7.14.3",
"@babel/polyfill": "^7.12.1",
"@babel/preset-env": "^7.13.15",
"@babel/preset-env": "^7.14.4",
"@babel/preset-flow": "^7.13.13",
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-node-resolve": "^11.2.1",
"@rollup/plugin-node-resolve": "^13.0.0",
"@rollup/plugin-replace": "^2.4.2",
"babel-eslint": "^10.1.0",
"babel-jest": "^26.6.3",
@@ -83,25 +83,25 @@
"cross-env": "^7.0.3",
"cz-conventional-changelog": "^3.1.0",
"documentation": "12.3.0",
"eslint": "^7.24.0",
"eslint": "^7.27.0",
"eslint-config-airbnb-base": "^14.2.1",
"eslint-plugin-import": "^2.22.1",
"eslint-plugin-import": "^2.23.4",
"flow-bin": "^0.133.0",
"flow-copy-source": "^2.0.8",
"husky": "^6.0.0",
"jest": "^26.6.3",
"lint-staged": "^10.5.4",
"lint-staged": "^11.0.0",
"npm-watch": "^0.9.0",
"prettier": "^2.2.1",
"prettier": "^2.3.0",
"pushstate-server": "^3.1.0",
"ramda": "^0.27.0",
"rollup": "^2.45.2",
"rollup": "^2.50.5",
"rollup-plugin-sourcemaps": "^0.6.3",
"rollup-plugin-terser": "^7.0.2",
"semantic-release": "^17.4.2",
"semantic-release": "^17.4.3",
"shx": "^0.3.3",
"tsgen": "1.3.0",
"typescript": "4.2.4",
"typescript": "4.3.2",
"validate-commit-msg": "^2.14.0"
},
"config": {
@@ -119,12 +119,6 @@
"type": "opencollective",
"url": "https://opencollective.com/polished"
},
"husky": {
"hooks": {
"post-commit": "validate-commit-msg",
"pre-commit": "lint-staged --debug"
}
},
"engines": {
"node": ">=10"
}
4 changes: 2 additions & 2 deletions src/color/parseToRgb.js
Original file line number Diff line number Diff line change
@@ -74,7 +74,7 @@ export default function parseToRgb(color: string): RgbColor | RgbaColor {
blue: parseInt(`${rgbMatched[3]}`, 10),
}
}
const rgbaMatched = rgbaRegex.exec(normalizedColor)
const rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50))
if (rgbaMatched) {
return {
red: parseInt(`${rgbaMatched[1]}`, 10),
@@ -99,7 +99,7 @@ export default function parseToRgb(color: string): RgbColor | RgbaColor {
blue: parseInt(`${hslRgbMatched[3]}`, 10),
}
}
const hslaMatched = hslaRegex.exec(normalizedColor)
const hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50))
if (hslaMatched) {
const hue = parseInt(`${hslaMatched[1]}`, 10)
const saturation = parseInt(`${hslaMatched[2]}`, 10) / 100
2 changes: 1 addition & 1 deletion src/mixins/fontFace.js
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ function generateFormatHint(format: string, formatHint: boolean): string {
}

function isDataURI(fontFilePath: string): boolean {
return !!fontFilePath.match(dataURIRegex)
return !!fontFilePath.replace(/\s+/g, ' ').match(dataURIRegex)
}

function generateFileReferences(
Loading