@graphql-tools/utils 10.8.5 → 10.8.6

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/cjs/comments.js CHANGED
@@ -127,7 +127,7 @@ function wrap(start, maybeString, end) {
127
127
  * a single-line, adding a leading blank line would strip that whitespace.
128
128
  */
129
129
  function printBlockString(value, isDescription = false) {
130
- const escaped = value.replace(/"""/g, '\\"""');
130
+ const escaped = value.replace(/\\/g, '\\\\').replace(/"""/g, '\\"""');
131
131
  return (value[0] === ' ' || value[0] === '\t') && value.indexOf('\n') === -1
132
132
  ? `"""${escaped.replace(/"$/, '"\n')}"""`
133
133
  : `"""\n${isDescription ? escaped : indent(escaped)}\n"""`;
package/esm/comments.js CHANGED
@@ -115,7 +115,7 @@ function wrap(start, maybeString, end) {
115
115
  * a single-line, adding a leading blank line would strip that whitespace.
116
116
  */
117
117
  function printBlockString(value, isDescription = false) {
118
- const escaped = value.replace(/"""/g, '\\"""');
118
+ const escaped = value.replace(/\\/g, '\\\\').replace(/"""/g, '\\"""');
119
119
  return (value[0] === ' ' || value[0] === '\t') && value.indexOf('\n') === -1
120
120
  ? `"""${escaped.replace(/"$/, '"\n')}"""`
121
121
  : `"""\n${isDescription ? escaped : indent(escaped)}\n"""`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-tools/utils",
3
- "version": "10.8.5",
3
+ "version": "10.8.6",
4
4
  "description": "Common package containing utils and types for GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {