prettier 2.1.1 → 2.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin-prettier.js CHANGED
@@ -58,7 +58,7 @@ var pleaseUpgradeNode = function pleaseUpgradeNode(pkg, opts) {
58
58
  };
59
59
 
60
60
  var name = "prettier";
61
- var version = "2.1.1";
61
+ var version = "2.1.2";
62
62
  var description = "Prettier is an opinionated code formatter";
63
63
  var bin = "./bin/prettier.js";
64
64
  var repository = "prettier/prettier";
@@ -138,7 +138,7 @@ var dependencies = {
138
138
  "unicode-regex": "3.0.0",
139
139
  unified: "9.2.0",
140
140
  vnopts: "1.0.2",
141
- "yaml-unist-parser": "1.3.0"
141
+ "yaml-unist-parser": "1.3.1"
142
142
  };
143
143
  var devDependencies = {
144
144
  "@babel/core": "7.11.4",
@@ -173,7 +173,7 @@ var devDependencies = {
173
173
  "jest-snapshot-serializer-raw": "1.1.0",
174
174
  "jest-watch-typeahead": "0.6.0",
175
175
  "npm-run-all": "4.1.5",
176
- prettier: "2.1.0",
176
+ prettier: "2.1.1",
177
177
  rimraf: "3.0.2",
178
178
  rollup: "2.26.5",
179
179
  "rollup-plugin-node-globals": "1.4.0",
package/doc.js CHANGED
@@ -1120,7 +1120,7 @@
1120
1120
  }, value));
1121
1121
 
1122
1122
  var name = "prettier";
1123
- var version$1 = "2.1.1";
1123
+ var version$1 = "2.1.2";
1124
1124
  var description = "Prettier is an opinionated code formatter";
1125
1125
  var bin = "./bin/prettier.js";
1126
1126
  var repository = "prettier/prettier";
@@ -1200,7 +1200,7 @@
1200
1200
  "unicode-regex": "3.0.0",
1201
1201
  unified: "9.2.0",
1202
1202
  vnopts: "1.0.2",
1203
- "yaml-unist-parser": "1.3.0"
1203
+ "yaml-unist-parser": "1.3.1"
1204
1204
  };
1205
1205
  var devDependencies = {
1206
1206
  "@babel/core": "7.11.4",
@@ -1235,7 +1235,7 @@
1235
1235
  "jest-snapshot-serializer-raw": "1.1.0",
1236
1236
  "jest-watch-typeahead": "0.6.0",
1237
1237
  "npm-run-all": "4.1.5",
1238
- prettier: "2.1.0",
1238
+ prettier: "2.1.1",
1239
1239
  rimraf: "3.0.2",
1240
1240
  rollup: "2.26.5",
1241
1241
  "rollup-plugin-node-globals": "1.4.0",
@@ -3347,6 +3347,11 @@
3347
3347
  printDocToString
3348
3348
  };
3349
3349
 
3350
+ const {
3351
+ literalline: literalline$1,
3352
+ concat: concat$2
3353
+ } = docBuilders; // Using a unique object to compare by reference.
3354
+
3350
3355
  const traverseDocOnExitStackMarker = {};
3351
3356
 
3352
3357
  function traverseDoc(doc, onEnter, onExit, shouldTraverseConditionalGroups) {
@@ -3623,6 +3628,10 @@
3623
3628
  });
3624
3629
  }
3625
3630
 
3631
+ function replaceNewlinesWithLiterallines(doc) {
3632
+ return mapDoc(doc, currentDoc => typeof currentDoc === "string" && currentDoc.includes("\n") ? concat$2(currentDoc.split(/(\n)/g).map((v, i) => i % 2 === 0 ? v : literalline$1)) : currentDoc);
3633
+ }
3634
+
3626
3635
  var docUtils = {
3627
3636
  isEmpty,
3628
3637
  willBreak,
@@ -3634,7 +3643,8 @@
3634
3643
  removeLines,
3635
3644
  stripTrailingHardline,
3636
3645
  normalizeParts,
3637
- normalizeDoc
3646
+ normalizeDoc,
3647
+ replaceNewlinesWithLiterallines
3638
3648
  };
3639
3649
 
3640
3650
  function flattenDoc(doc) {