webpipe-js 2.0.46 → 2.0.48

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/dist/index.cjs CHANGED
@@ -1602,11 +1602,10 @@ function printVariable(variable) {
1602
1602
  return variableLine;
1603
1603
  }
1604
1604
  function printGraphQLSchema(schema) {
1605
- const schemaLine = `graphql schema = \`${schema.sdl}\``;
1606
- if (schema.inlineComment) {
1607
- return `${schemaLine} ${printComment(schema.inlineComment)}`;
1608
- }
1609
- return schemaLine;
1605
+ const firstLine = schema.inlineComment ? `graphqlSchema = \` ${printComment(schema.inlineComment)}` : "graphqlSchema = `";
1606
+ return `${firstLine}
1607
+ ${schema.sdl}
1608
+ \``;
1610
1609
  }
1611
1610
  function printQueryResolver(query) {
1612
1611
  const lines = [];
@@ -1799,7 +1798,6 @@ function prettyPrint(program) {
1799
1798
  const shouldAddBlankLine = () => {
1800
1799
  if (!nextItem) return false;
1801
1800
  if (entry.type === "comment") {
1802
- if (nextItem.type === "comment") return false;
1803
1801
  return nextItem.lineNumber - entry.lineNumber > 1;
1804
1802
  }
1805
1803
  if (entry.type === "variable") {
package/dist/index.mjs CHANGED
@@ -1549,11 +1549,10 @@ function printVariable(variable) {
1549
1549
  return variableLine;
1550
1550
  }
1551
1551
  function printGraphQLSchema(schema) {
1552
- const schemaLine = `graphql schema = \`${schema.sdl}\``;
1553
- if (schema.inlineComment) {
1554
- return `${schemaLine} ${printComment(schema.inlineComment)}`;
1555
- }
1556
- return schemaLine;
1552
+ const firstLine = schema.inlineComment ? `graphqlSchema = \` ${printComment(schema.inlineComment)}` : "graphqlSchema = `";
1553
+ return `${firstLine}
1554
+ ${schema.sdl}
1555
+ \``;
1557
1556
  }
1558
1557
  function printQueryResolver(query) {
1559
1558
  const lines = [];
@@ -1746,7 +1745,6 @@ function prettyPrint(program) {
1746
1745
  const shouldAddBlankLine = () => {
1747
1746
  if (!nextItem) return false;
1748
1747
  if (entry.type === "comment") {
1749
- if (nextItem.type === "comment") return false;
1750
1748
  return nextItem.lineNumber - entry.lineNumber > 1;
1751
1749
  }
1752
1750
  if (entry.type === "variable") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpipe-js",
3
- "version": "2.0.46",
3
+ "version": "2.0.48",
4
4
  "description": "Web Pipe parser",
5
5
  "license": "ISC",
6
6
  "author": "William Cotton",