webpipe-js 2.0.52 → 2.0.56

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
@@ -127,27 +127,21 @@ var Parser = class {
127
127
  const originalPos = this.pos;
128
128
  this.pos++;
129
129
  const restOfLine = this.consumeWhile((ch) => ch !== "\n");
130
- const end = this.pos;
131
130
  return {
132
131
  type: "standalone",
133
132
  text: restOfLine,
134
133
  style: "#",
135
- lineNumber: this.getLineNumber(start),
136
- start,
137
- end
134
+ lineNumber: this.getLineNumber(start)
138
135
  };
139
136
  }
140
137
  if (this.text.startsWith("//", this.pos)) {
141
138
  this.pos += 2;
142
139
  const text = this.consumeWhile((ch) => ch !== "\n");
143
- const end = this.pos;
144
140
  return {
145
141
  type: "standalone",
146
142
  text,
147
143
  style: "//",
148
- lineNumber: this.getLineNumber(start),
149
- start,
150
- end
144
+ lineNumber: this.getLineNumber(start)
151
145
  };
152
146
  }
153
147
  return null;
@@ -1620,9 +1614,7 @@ function printPipeline(pipeline) {
1620
1614
  items.push({ type: "step", item: step, position: step.start });
1621
1615
  });
1622
1616
  pipeline.pipeline.comments.forEach((comment) => {
1623
- if (comment.start !== void 0) {
1624
- items.push({ type: "comment", item: comment, position: comment.start });
1625
- }
1617
+ items.push({ type: "comment", item: comment, position: comment.lineNumber || 0 });
1626
1618
  });
1627
1619
  items.sort((a, b) => a.position - b.position);
1628
1620
  items.forEach((entry) => {
@@ -2034,9 +2026,7 @@ function formatPipelineRef(ref) {
2034
2026
  items.push({ type: "step", item: step, position: step.start });
2035
2027
  });
2036
2028
  ref.pipeline.comments.forEach((comment) => {
2037
- if (comment.start !== void 0) {
2038
- items.push({ type: "comment", item: comment, position: comment.start });
2039
- }
2029
+ items.push({ type: "comment", item: comment, position: comment.lineNumber || 0 });
2040
2030
  });
2041
2031
  items.sort((a, b) => a.position - b.position);
2042
2032
  items.forEach((entry) => {
package/dist/index.d.cts CHANGED
@@ -16,8 +16,6 @@ interface Comment {
16
16
  text: string;
17
17
  style: '#' | '//';
18
18
  lineNumber?: number;
19
- start?: number;
20
- end?: number;
21
19
  }
22
20
  interface Config {
23
21
  name: string;
package/dist/index.d.ts CHANGED
@@ -16,8 +16,6 @@ interface Comment {
16
16
  text: string;
17
17
  style: '#' | '//';
18
18
  lineNumber?: number;
19
- start?: number;
20
- end?: number;
21
19
  }
22
20
  interface Config {
23
21
  name: string;
package/dist/index.mjs CHANGED
@@ -74,27 +74,21 @@ var Parser = class {
74
74
  const originalPos = this.pos;
75
75
  this.pos++;
76
76
  const restOfLine = this.consumeWhile((ch) => ch !== "\n");
77
- const end = this.pos;
78
77
  return {
79
78
  type: "standalone",
80
79
  text: restOfLine,
81
80
  style: "#",
82
- lineNumber: this.getLineNumber(start),
83
- start,
84
- end
81
+ lineNumber: this.getLineNumber(start)
85
82
  };
86
83
  }
87
84
  if (this.text.startsWith("//", this.pos)) {
88
85
  this.pos += 2;
89
86
  const text = this.consumeWhile((ch) => ch !== "\n");
90
- const end = this.pos;
91
87
  return {
92
88
  type: "standalone",
93
89
  text,
94
90
  style: "//",
95
- lineNumber: this.getLineNumber(start),
96
- start,
97
- end
91
+ lineNumber: this.getLineNumber(start)
98
92
  };
99
93
  }
100
94
  return null;
@@ -1567,9 +1561,7 @@ function printPipeline(pipeline) {
1567
1561
  items.push({ type: "step", item: step, position: step.start });
1568
1562
  });
1569
1563
  pipeline.pipeline.comments.forEach((comment) => {
1570
- if (comment.start !== void 0) {
1571
- items.push({ type: "comment", item: comment, position: comment.start });
1572
- }
1564
+ items.push({ type: "comment", item: comment, position: comment.lineNumber || 0 });
1573
1565
  });
1574
1566
  items.sort((a, b) => a.position - b.position);
1575
1567
  items.forEach((entry) => {
@@ -1981,9 +1973,7 @@ function formatPipelineRef(ref) {
1981
1973
  items.push({ type: "step", item: step, position: step.start });
1982
1974
  });
1983
1975
  ref.pipeline.comments.forEach((comment) => {
1984
- if (comment.start !== void 0) {
1985
- items.push({ type: "comment", item: comment, position: comment.start });
1986
- }
1976
+ items.push({ type: "comment", item: comment, position: comment.lineNumber || 0 });
1987
1977
  });
1988
1978
  items.sort((a, b) => a.position - b.position);
1989
1979
  items.forEach((entry) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpipe-js",
3
- "version": "2.0.52",
3
+ "version": "2.0.56",
4
4
  "description": "Web Pipe parser",
5
5
  "license": "ISC",
6
6
  "author": "William Cotton",