@graphql-tools/url-loader 7.9.23 → 7.9.24

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.
Files changed (3) hide show
  1. package/index.js +5 -5
  2. package/index.mjs +5 -5
  3. package/package.json +6 -6
package/index.js CHANGED
@@ -155,7 +155,7 @@ async function* handleReadableStream(stream) {
155
155
  let lineStart = 0; // index where the current line starts
156
156
  while (position < bufLength) {
157
157
  if (discardTrailingNewline) {
158
- if (buffer[position] === 10 /* NewLine */) {
158
+ if (buffer[position] === 10 /* ControlChars.NewLine */) {
159
159
  lineStart = ++position; // skip to next char
160
160
  }
161
161
  discardTrailingNewline = false;
@@ -164,18 +164,18 @@ async function* handleReadableStream(stream) {
164
164
  let lineEnd = -1; // index of the \r or \n char
165
165
  for (; position < bufLength && lineEnd === -1; ++position) {
166
166
  switch (buffer[position]) {
167
- case 58 /* Colon */: {
167
+ case 58 /* ControlChars.Colon */: {
168
168
  if (fieldLength === -1) {
169
169
  // first colon in line
170
170
  fieldLength = position - lineStart;
171
171
  }
172
172
  break;
173
173
  }
174
- case 13 /* CarriageReturn */: {
174
+ case 13 /* ControlChars.CarriageReturn */: {
175
175
  discardTrailingNewline = true;
176
176
  break;
177
177
  }
178
- case 10 /* NewLine */: {
178
+ case 10 /* ControlChars.NewLine */: {
179
179
  lineEnd = position;
180
180
  break;
181
181
  }
@@ -206,7 +206,7 @@ async function* handleReadableStream(stream) {
206
206
  // line is of format "<field>:<value>" or "<field>: <value>"
207
207
  // https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation
208
208
  const field = decoder.decode(line.subarray(0, fieldLength));
209
- const valueOffset = fieldLength + (line[fieldLength + 1] === 32 /* Space */ ? 2 : 1);
209
+ const valueOffset = fieldLength + (line[fieldLength + 1] === 32 /* ControlChars.Space */ ? 2 : 1);
210
210
  const value = decoder.decode(line.subarray(valueOffset));
211
211
  switch (field) {
212
212
  case 'data':
package/index.mjs CHANGED
@@ -130,7 +130,7 @@ async function* handleReadableStream(stream) {
130
130
  let lineStart = 0; // index where the current line starts
131
131
  while (position < bufLength) {
132
132
  if (discardTrailingNewline) {
133
- if (buffer[position] === 10 /* NewLine */) {
133
+ if (buffer[position] === 10 /* ControlChars.NewLine */) {
134
134
  lineStart = ++position; // skip to next char
135
135
  }
136
136
  discardTrailingNewline = false;
@@ -139,18 +139,18 @@ async function* handleReadableStream(stream) {
139
139
  let lineEnd = -1; // index of the \r or \n char
140
140
  for (; position < bufLength && lineEnd === -1; ++position) {
141
141
  switch (buffer[position]) {
142
- case 58 /* Colon */: {
142
+ case 58 /* ControlChars.Colon */: {
143
143
  if (fieldLength === -1) {
144
144
  // first colon in line
145
145
  fieldLength = position - lineStart;
146
146
  }
147
147
  break;
148
148
  }
149
- case 13 /* CarriageReturn */: {
149
+ case 13 /* ControlChars.CarriageReturn */: {
150
150
  discardTrailingNewline = true;
151
151
  break;
152
152
  }
153
- case 10 /* NewLine */: {
153
+ case 10 /* ControlChars.NewLine */: {
154
154
  lineEnd = position;
155
155
  break;
156
156
  }
@@ -181,7 +181,7 @@ async function* handleReadableStream(stream) {
181
181
  // line is of format "<field>:<value>" or "<field>: <value>"
182
182
  // https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation
183
183
  const field = decoder.decode(line.subarray(0, fieldLength));
184
- const valueOffset = fieldLength + (line[fieldLength + 1] === 32 /* Space */ ? 2 : 1);
184
+ const valueOffset = fieldLength + (line[fieldLength + 1] === 32 /* ControlChars.Space */ ? 2 : 1);
185
185
  const value = decoder.decode(line.subarray(valueOffset));
186
186
  switch (field) {
187
187
  case 'data':
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@graphql-tools/url-loader",
3
- "version": "7.9.23",
3
+ "version": "7.9.24",
4
4
  "description": "A set of utils for faster development of GraphQL tools",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
7
7
  "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0"
8
8
  },
9
9
  "dependencies": {
10
- "@graphql-tools/delegate": "8.7.10",
11
- "@graphql-tools/utils": "8.6.12",
12
- "@graphql-tools/wrap": "8.4.19",
10
+ "@graphql-tools/delegate": "8.7.11",
11
+ "@graphql-tools/utils": "8.6.13",
12
+ "@graphql-tools/wrap": "8.4.20",
13
13
  "@n1ru4l/graphql-live-query": "^0.9.0",
14
14
  "@types/ws": "^8.0.0",
15
15
  "cross-undici-fetch": "^0.4.0",
@@ -18,8 +18,8 @@
18
18
  "graphql-ws": "^5.4.1",
19
19
  "isomorphic-ws": "^4.0.1",
20
20
  "meros": "^1.1.4",
21
- "sync-fetch": "^0.3.1",
22
- "tslib": "^2.3.0",
21
+ "sync-fetch": "^0.4.0",
22
+ "tslib": "^2.4.0",
23
23
  "value-or-promise": "^1.0.11",
24
24
  "ws": "^8.3.0"
25
25
  },