@jsenv/core 39.7.0 → 39.7.2

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.
@@ -140,20 +140,18 @@ This could be due to syntax errors or importing non-existent modules (see errors
140
140
  dispatchBeforePrune();
141
141
  delete urlHotMetas[urlToFetch];
142
142
  if (urlHotMeta.disposeCallback) {
143
- console.groupCollapsed(
143
+ console.log(
144
144
  `[jsenv] cleanup ${boundary} (no longer referenced by ${acceptedBy})`,
145
145
  );
146
- console.log(`call dispose callback`);
147
146
  await urlHotMeta.disposeCallback();
148
- console.groupEnd();
149
147
  }
150
148
  }
151
149
  continue;
152
150
  }
153
151
  if (acceptedBy === boundary) {
154
- console.groupCollapsed(`[jsenv] hot reloading ${boundary} (${cause})`);
152
+ console.log(`[jsenv] hot reloading ${boundary} (${cause})`);
155
153
  } else {
156
- console.groupCollapsed(
154
+ console.log(
157
155
  `[jsenv] hot reloading ${acceptedBy} usage in ${boundary} (${cause})`,
158
156
  );
159
157
  }
@@ -163,10 +161,8 @@ This could be due to syntax errors or importing non-existent modules (see errors
163
161
  continue;
164
162
  }
165
163
  if (urlHotMeta.disposeCallback) {
166
- console.log(`call dispose callback`);
167
164
  await urlHotMeta.disposeCallback();
168
165
  }
169
- console.log(`importing js module`);
170
166
  reloader.currentExecution = {
171
167
  type: "dynamic_import",
172
168
  url: urlToFetch,
@@ -175,8 +171,6 @@ This could be due to syntax errors or importing non-existent modules (see errors
175
171
  if (urlHotMeta.acceptCallback) {
176
172
  await urlHotMeta.acceptCallback(namespace);
177
173
  }
178
- console.log(`js module import done`);
179
- console.groupEnd();
180
174
  continue;
181
175
  }
182
176
  if (type === "html") {
@@ -210,7 +204,6 @@ This could be due to syntax errors or importing non-existent modules (see errors
210
204
  domNodesUsingUrl.reload(hot);
211
205
  });
212
206
  }
213
- console.groupEnd();
214
207
  continue;
215
208
  }
216
209
  console.warn(`unknown update type: "${type}"`);
@@ -20122,7 +20122,7 @@ const jsenvPluginAutoreloadServer = ({
20122
20122
  }
20123
20123
  if (
20124
20124
  urlInfo.data.hotDecline ||
20125
- urlInfo.firstReference?.type === "http_request"
20125
+ urlInfo.lastReference?.type === "http_request"
20126
20126
  ) {
20127
20127
  return {
20128
20128
  declined: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "39.7.0",
3
+ "version": "39.7.2",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -153,20 +153,21 @@ This could be due to syntax errors or importing non-existent modules (see errors
153
153
  dispatchBeforePrune();
154
154
  delete urlHotMetas[urlToFetch];
155
155
  if (urlHotMeta.disposeCallback) {
156
- console.groupCollapsed(
156
+ console.log(
157
157
  `[jsenv] cleanup ${boundary} (no longer referenced by ${acceptedBy})`,
158
158
  );
159
- console.log(`call dispose callback`);
159
+ if (debug) {
160
+ console.log(`call dispose callback`);
161
+ }
160
162
  await urlHotMeta.disposeCallback();
161
- console.groupEnd();
162
163
  }
163
164
  }
164
165
  continue;
165
166
  }
166
167
  if (acceptedBy === boundary) {
167
- console.groupCollapsed(`[jsenv] hot reloading ${boundary} (${cause})`);
168
+ console.log(`[jsenv] hot reloading ${boundary} (${cause})`);
168
169
  } else {
169
- console.groupCollapsed(
170
+ console.log(
170
171
  `[jsenv] hot reloading ${acceptedBy} usage in ${boundary} (${cause})`,
171
172
  );
172
173
  }
@@ -176,10 +177,14 @@ This could be due to syntax errors or importing non-existent modules (see errors
176
177
  continue;
177
178
  }
178
179
  if (urlHotMeta.disposeCallback) {
179
- console.log(`call dispose callback`);
180
+ if (debug) {
181
+ console.log(`call dispose callback`);
182
+ }
180
183
  await urlHotMeta.disposeCallback();
181
184
  }
182
- console.log(`importing js module`);
185
+ if (debug) {
186
+ console.log(`importing js module`);
187
+ }
183
188
  reloader.currentExecution = {
184
189
  type: "dynamic_import",
185
190
  url: urlToFetch,
@@ -188,8 +193,9 @@ This could be due to syntax errors or importing non-existent modules (see errors
188
193
  if (urlHotMeta.acceptCallback) {
189
194
  await urlHotMeta.acceptCallback(namespace);
190
195
  }
191
- console.log(`js module import done`);
192
- console.groupEnd();
196
+ if (debug) {
197
+ console.log(`js module import done`);
198
+ }
193
199
  continue;
194
200
  }
195
201
  if (type === "html") {
@@ -223,7 +229,6 @@ This could be due to syntax errors or importing non-existent modules (see errors
223
229
  domNodesUsingUrl.reload(hot);
224
230
  });
225
231
  }
226
- console.groupEnd();
227
232
  continue;
228
233
  }
229
234
  console.warn(`unknown update type: "${type}"`);
@@ -40,7 +40,7 @@ export const jsenvPluginAutoreloadServer = ({
40
40
  }
41
41
  if (
42
42
  urlInfo.data.hotDecline ||
43
- urlInfo.firstReference?.type === "http_request"
43
+ urlInfo.lastReference?.type === "http_request"
44
44
  ) {
45
45
  return {
46
46
  declined: true,