diff --git a/index.js b/index.js index d2570d8..1800057 100644 --- a/index.js +++ b/index.js @@ -67,7 +67,7 @@ var parser = function(string, matcher, matcher2, callback) { var transformRgbRgbAlpha = function(string) { return parser(string, RGBA_RGB_RE, RGBA_RGB_RE, function(matches){ - return color(matches[1]).alpha(matches[2]).rgbaString(); + return color(matches[1]).alpha(matches[2]).toString(); }); }; @@ -75,7 +75,7 @@ var transformRgbAlpha = function(string) { return parser(string, RGBA_RE, RGBA_RE, function(matches) { return color('#'+matches[1]) .alpha(parseAlpha(matches[2])) - .rgbaString(); + .toString(); }); }; @@ -94,7 +94,7 @@ var transformHexAlpha = function(string) { return color('#' + rgbHex) .alpha(alpha) - .rgbaString(); + .toString(); }); }; diff --git a/package.json b/package.json index b78646f..45f55f7 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "url": "https://github.com/avanes/postcss-color-alpha.git" }, "dependencies": { - "color": "^0.10.1", + "color": "^1.0.3", "postcss": "^5.0.8", "postcss-message-helpers": "^2.0.0" }, diff --git a/yarn.lock b/yarn.lock index 4b4eb31..10734b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -210,26 +210,29 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -color-convert@^0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-0.5.3.tgz#bdb6c69ce660fadffe0b0007cc447e1b9f7282bd" +color-convert@^1.8.2: + version "1.9.0" + resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" + dependencies: + color-name "^1.1.1" -color-name@^1.0.0: +color-name@^1.0.0, color-name@^1.1.1: version "1.1.2" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.2.tgz#5c8ab72b64bd2215d617ae9559ebb148475cf98d" -color-string@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991" +color-string@^1.4.0: + version "1.5.2" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.2.tgz#26e45814bc3c9a7cbd6751648a41434514a773a9" dependencies: color-name "^1.0.0" + simple-swizzle "^0.2.2" -color@^0.10.1: - version "0.10.1" - resolved "https://registry.yarnpkg.com/color/-/color-0.10.1.tgz#c04188df82a209ddebccecdacd3ec320f193739f" +color@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/color/-/color-1.0.3.tgz#e48e832d85f14ef694fb468811c2d5cfe729b55d" dependencies: - color-convert "^0.5.3" - color-string "^0.3.0" + color-convert "^1.8.2" + color-string "^1.4.0" combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" @@ -387,14 +390,10 @@ entities@~1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0" -escape-string-regexp@1.0.2: +escape-string-regexp@1.0.2, escape-string-regexp@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.2.tgz#4dbc2fe674e71949caf3fb2695ce7f2dc1d9a8d1" -escape-string-regexp@^1.0.2: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - exit@0.1.2, exit@0.1.x: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -883,6 +882,10 @@ is-absolute@^0.2.3: is-relative "^0.2.1" is-windows "^0.2.0" +is-arrayish@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.1.tgz#c2dfc386abaa0c3e33c48db3fe87059e69065efd" + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -1391,13 +1394,7 @@ object.omit@^2.0.0: for-own "^0.1.4" is-extendable "^0.1.1" -once@^1.3.0, once@^1.3.3: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - dependencies: - wrappy "1" - -once@~1.3.0: +once@^1.3.0, once@^1.3.3, once@~1.3.0: version "1.3.3" resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" dependencies: @@ -1715,6 +1712,12 @@ signal-exit@^3.0.0: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + dependencies: + is-arrayish "^0.3.1" + slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"