solid-js 1.8.9 → 1.8.10

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "solid-js",
3
3
  "description": "A declarative JavaScript library for building user interfaces.",
4
- "version": "1.8.9",
4
+ "version": "1.8.10",
5
5
  "author": "Ryan Carniato",
6
6
  "license": "MIT",
7
7
  "homepage": "https://solidjs.com",
package/web/dist/dev.cjs CHANGED
@@ -335,7 +335,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
335
335
  let isCE, isProp, isChildProp, propAlias, forceProp;
336
336
  if (prop === "style") return style(node, value, prev);
337
337
  if (prop === "classList") return classList(node, value, prev);
338
- if (value === prev && (prop !== "value" || prop !== "checked")) return prev;
338
+ if (value === prev && prop !== "value" && prop !== "checked") return prev;
339
339
  if (prop === "ref") {
340
340
  if (!skipRef) value(node);
341
341
  } else if (prop.slice(0, 3) === "on:") {
package/web/dist/dev.js CHANGED
@@ -791,7 +791,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
791
791
  let isCE, isProp, isChildProp, propAlias, forceProp;
792
792
  if (prop === "style") return style(node, value, prev);
793
793
  if (prop === "classList") return classList(node, value, prev);
794
- if (value === prev && (prop !== "value" || prop !== "checked")) return prev;
794
+ if (value === prev && prop !== "value" && prop !== "checked") return prev;
795
795
  if (prop === "ref") {
796
796
  if (!skipRef) value(node);
797
797
  } else if (prop.slice(0, 3) === "on:") {
@@ -113,23 +113,22 @@ function renderToStream(code, options = {}) {
113
113
  timer = setTimeout(writeTasks);
114
114
  }
115
115
  };
116
- const checkEnd = () => {
117
- if (!registry.size && !completed) {
118
- writeTasks();
119
- onCompleteAll && onCompleteAll({
120
- write(v) {
121
- !completed && buffer.write(v);
122
- }
123
- });
124
- writable && writable.end();
125
- completed = true;
126
- setTimeout(dispose);
127
- }
116
+ const onDone = () => {
117
+ writeTasks();
118
+ doShell();
119
+ onCompleteAll && onCompleteAll({
120
+ write(v) {
121
+ !completed && buffer.write(v);
122
+ }
123
+ });
124
+ writable && writable.end();
125
+ completed = true;
126
+ if (firstFlushed) dispose();
128
127
  };
129
128
  const serializer = createSerializer({
130
129
  scopeId: options.renderId,
131
130
  onData: pushTask,
132
- onDone: checkEnd,
131
+ onDone,
133
132
  onError: options.onError
134
133
  });
135
134
  const flushEnd = () => {
@@ -152,6 +151,7 @@ function renderToStream(code, options = {}) {
152
151
  let tasks = "";
153
152
  let firstFlushed = false;
154
153
  let completed = false;
154
+ let shellCompleted = false;
155
155
  let scriptFlushed = false;
156
156
  let timer = null;
157
157
  let buffer = {
@@ -237,6 +237,7 @@ function renderToStream(code, options = {}) {
237
237
  return resolveSSRNode(escape(code()));
238
238
  });
239
239
  function doShell() {
240
+ if (shellCompleted) return;
240
241
  solidJs.sharedConfig.context = context;
241
242
  context.noHydrate = true;
242
243
  html = injectAssets(context.assets, html);
@@ -248,11 +249,12 @@ function renderToStream(code, options = {}) {
248
249
  !completed && buffer.write(v);
249
250
  }
250
251
  });
252
+ shellCompleted = true;
251
253
  }
252
254
  return {
253
255
  then(fn) {
254
256
  function complete() {
255
- doShell();
257
+ dispose();
256
258
  fn(tmp);
257
259
  }
258
260
  if (onCompleteAll) {
@@ -262,7 +264,7 @@ function renderToStream(code, options = {}) {
262
264
  complete();
263
265
  };
264
266
  } else onCompleteAll = complete;
265
- if (!registry.size) queue(flushEnd);
267
+ queue(flushEnd);
266
268
  },
267
269
  pipe(w) {
268
270
  allSettled(blockingPromises).then(() => {
@@ -271,7 +273,10 @@ function renderToStream(code, options = {}) {
271
273
  buffer = writable = w;
272
274
  buffer.write(tmp);
273
275
  firstFlushed = true;
274
- if (completed) writable.end();else queue(flushEnd);
276
+ if (completed) {
277
+ dispose();
278
+ writable.end();
279
+ } else flushEnd();
275
280
  });
276
281
  });
277
282
  },
@@ -297,7 +302,10 @@ function renderToStream(code, options = {}) {
297
302
  };
298
303
  buffer.write(tmp);
299
304
  firstFlushed = true;
300
- if (completed) writable.end();else queue(flushEnd);
305
+ if (completed) {
306
+ dispose();
307
+ writable.end();
308
+ } else flushEnd();
301
309
  });
302
310
  return p;
303
311
  });
@@ -158,24 +158,23 @@ function renderToStream(code, options = {}) {
158
158
  timer = setTimeout(writeTasks);
159
159
  }
160
160
  };
161
- const checkEnd = () => {
162
- if (!registry.size && !completed) {
163
- writeTasks();
164
- onCompleteAll &&
165
- onCompleteAll({
166
- write(v) {
167
- !completed && buffer.write(v);
168
- }
169
- });
170
- writable && writable.end();
171
- completed = true;
172
- setTimeout(dispose);
173
- }
161
+ const onDone = () => {
162
+ writeTasks();
163
+ doShell();
164
+ onCompleteAll &&
165
+ onCompleteAll({
166
+ write(v) {
167
+ !completed && buffer.write(v);
168
+ }
169
+ });
170
+ writable && writable.end();
171
+ completed = true;
172
+ if (firstFlushed) dispose();
174
173
  };
175
174
  const serializer = createSerializer({
176
175
  scopeId: options.renderId,
177
176
  onData: pushTask,
178
- onDone: checkEnd,
177
+ onDone,
179
178
  onError: options.onError
180
179
  });
181
180
  const flushEnd = () => {
@@ -198,6 +197,7 @@ function renderToStream(code, options = {}) {
198
197
  let tasks = "";
199
198
  let firstFlushed = false;
200
199
  let completed = false;
200
+ let shellCompleted = false;
201
201
  let scriptFlushed = false;
202
202
  let timer = null;
203
203
  let buffer = {
@@ -286,6 +286,7 @@ function renderToStream(code, options = {}) {
286
286
  return resolveSSRNode(escape(code()));
287
287
  });
288
288
  function doShell() {
289
+ if (shellCompleted) return;
289
290
  sharedConfig.context = context;
290
291
  context.noHydrate = true;
291
292
  html = injectAssets(context.assets, html);
@@ -298,11 +299,12 @@ function renderToStream(code, options = {}) {
298
299
  !completed && buffer.write(v);
299
300
  }
300
301
  });
302
+ shellCompleted = true;
301
303
  }
302
304
  return {
303
305
  then(fn) {
304
306
  function complete() {
305
- doShell();
307
+ dispose();
306
308
  fn(tmp);
307
309
  }
308
310
  if (onCompleteAll) {
@@ -312,7 +314,7 @@ function renderToStream(code, options = {}) {
312
314
  complete();
313
315
  };
314
316
  } else onCompleteAll = complete;
315
- if (!registry.size) queue(flushEnd);
317
+ queue(flushEnd);
316
318
  },
317
319
  pipe(w) {
318
320
  allSettled(blockingPromises).then(() => {
@@ -321,8 +323,10 @@ function renderToStream(code, options = {}) {
321
323
  buffer = writable = w;
322
324
  buffer.write(tmp);
323
325
  firstFlushed = true;
324
- if (completed) writable.end();
325
- else queue(flushEnd);
326
+ if (completed) {
327
+ dispose();
328
+ writable.end();
329
+ } else flushEnd();
326
330
  });
327
331
  });
328
332
  },
@@ -348,8 +352,10 @@ function renderToStream(code, options = {}) {
348
352
  };
349
353
  buffer.write(tmp);
350
354
  firstFlushed = true;
351
- if (completed) writable.end();
352
- else queue(flushEnd);
355
+ if (completed) {
356
+ dispose();
357
+ writable.end();
358
+ } else flushEnd();
353
359
  });
354
360
  return p;
355
361
  });
package/web/dist/web.cjs CHANGED
@@ -333,7 +333,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
333
333
  let isCE, isProp, isChildProp, propAlias, forceProp;
334
334
  if (prop === "style") return style(node, value, prev);
335
335
  if (prop === "classList") return classList(node, value, prev);
336
- if (value === prev && (prop !== "value" || prop !== "checked")) return prev;
336
+ if (value === prev && prop !== "value" && prop !== "checked") return prev;
337
337
  if (prop === "ref") {
338
338
  if (!skipRef) value(node);
339
339
  } else if (prop.slice(0, 3) === "on:") {
package/web/dist/web.js CHANGED
@@ -784,7 +784,7 @@ function assignProp(node, prop, value, prev, isSVG, skipRef) {
784
784
  let isCE, isProp, isChildProp, propAlias, forceProp;
785
785
  if (prop === "style") return style(node, value, prev);
786
786
  if (prop === "classList") return classList(node, value, prev);
787
- if (value === prev && (prop !== "value" || prop !== "checked")) return prev;
787
+ if (value === prev && prop !== "value" && prop !== "checked") return prev;
788
788
  if (prop === "ref") {
789
789
  if (!skipRef) value(node);
790
790
  } else if (prop.slice(0, 3) === "on:") {