Repository: ChristianMurphy/postcss-combine-duplicated-selectors (js)

Issue:
Node#moveTo was deprecated. Use Container#append.
Using 2.3.0.

Pull request description:
Fix postcss deprecation warning about `moveTo`.
Fixes #93 

/CC @ChristianMurphy 

Patch:
diff --git a/src/index.js b/src/index.js
index ea301ac..dc115ff 100644
--- a/src/index.js
+++ b/src/index.js
@@ -99,7 +99,7 @@ module.exports = postcss.plugin(name, (options) => {
         const destination = map.get(selector);
         // move declarations to original rule
         while (rule.nodes.length > 0) {
-          rule.nodes[0].moveTo(destination);
+          destination.append(rule.nodes[0]);
         }
         // remove duplicated rule
         rule.remove();


Test patch:
diff --git a/test/duplicated-css.js b/test/duplicated-css.js
index cf29ce3..43cae87 100644
--- a/test/duplicated-css.js
+++ b/test/duplicated-css.js
@@ -210,7 +210,7 @@ test(
   'selectors with multiple properties',
   css,
   '.a {color: black; height: 10px} .a {background-color: red; width: 20px}',
-  '.a {color: black; height: 10px; background-color: red; width: 20px}'
+  '.a {color: black; height: 10px;background-color: red; width: 20px}'
 );
 
 test(
diff --git a/test/duplicated-properties.js b/test/duplicated-properties.js
index 2c8e11c..b55e812 100644
--- a/test/duplicated-properties.js
+++ b/test/duplicated-properties.js
@@ -17,7 +17,7 @@ test(
   'remove duplicated properties when combine selectors',
   removeDuplicates,
   '.a {height: 10px; color: black;} .a {color: blue; width: 20px;}',
-  '.a {height: 10px; color: blue; width: 20px;}'
+  '.a {height: 10px;color: blue; width: 20px;}'
 );
 
 test(
@@ -37,7 +37,7 @@ test(
   'maintain duplicated properties when combine selectors',
   keepDuplicates,
   '.a {height: 10px; color: black;} .a {color: blue; width: 20px;}',
-  '.a {height: 10px; color: black; color: blue; width: 20px;}'
+  '.a {height: 10px; color: black;color: blue; width: 20px;}'
 );
 
 test(