@jsenv/core 27.5.1 → 27.6.0

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.
@@ -158,6 +158,7 @@ const reloader = {
158
158
  isAutoreloadEnabled,
159
159
  setAutoreloadPreference,
160
160
  status: "idle",
161
+ currentExecution: null,
161
162
  onstatuschange: () => {},
162
163
  setStatus: status => {
163
164
  reloader.status = status;
@@ -195,6 +196,7 @@ const reloader = {
195
196
  const setReloadMessagePromise = (reloadMessage, promise) => {
196
197
  promise.then(() => {
197
198
  onApplied(reloadMessage);
199
+ reloader.currentExecution = null;
198
200
  }, e => {
199
201
  reloader.setStatus("failed");
200
202
 
@@ -206,6 +208,7 @@ const reloader = {
206
208
 
207
209
  console.error(`[jsenv] Hot reload failed after ${reloadMessage.reason}.
208
210
  This could be due to syntax errors or importing non-existent modules (see errors in console)`);
211
+ reloader.currentExecution = null;
209
212
  });
210
213
  };
211
214
 
@@ -299,6 +302,10 @@ const applyHotReload = async ({
299
302
  }
300
303
 
301
304
  console.log(`importing js module`);
305
+ reloader.currentExecution = {
306
+ type: "dynamic_import",
307
+ url: urlToFetch
308
+ };
302
309
  const namespace = await reloadJsImport(urlToFetch);
303
310
 
304
311
  if (urlHotMeta.acceptCallback) {