@jsenv/core 39.9.2 → 39.9.4

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.
@@ -86,7 +86,7 @@ This could be due to syntax errors or importing non-existent modules (see errors
86
86
  },
87
87
  );
88
88
  };
89
- reloader.changes.value.forEach((reloadMessage) => {
89
+ for (const reloadMessage of reloader.changes.value) {
90
90
  if (reloadMessage.type === "hot") {
91
91
  const promise = addToHotQueue(() => {
92
92
  return applyHotReload(reloadMessage);
@@ -95,7 +95,7 @@ This could be due to syntax errors or importing non-existent modules (see errors
95
95
  } else {
96
96
  setReloadMessagePromise(reloadMessage, Promise.resolve());
97
97
  }
98
- });
98
+ }
99
99
  },
100
100
  };
101
101
 
@@ -85,6 +85,7 @@ const createImportMetaHot = (importMetaUrl) => {
85
85
  });
86
86
  },
87
87
  invalidate: () => {
88
+ window.location.reload(true);
88
89
  addUrlMeta(url, {
89
90
  invalidated: true,
90
91
  });
@@ -17690,10 +17690,12 @@ const jsenvPluginInlineContentFetcher = () => {
17690
17690
  const fsRootRelativeUrl = requestResource.slice("/@fs/".length);
17691
17691
  requestedUrl = `file:///${fsRootRelativeUrl}`;
17692
17692
  } else {
17693
- requestedUrl = new URL(
17693
+ const requestedUrlObject = new URL(
17694
17694
  requestResource.slice(1),
17695
17695
  urlInfo.context.rootDirectoryUrl,
17696
- ).href;
17696
+ );
17697
+ requestedUrlObject.searchParams.delete("hot");
17698
+ requestedUrl = requestedUrlObject.href;
17697
17699
  }
17698
17700
  isDirectRequestToFile = requestedUrl === urlInfo.url;
17699
17701
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "39.9.2",
3
+ "version": "39.9.4",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -99,7 +99,7 @@ This could be due to syntax errors or importing non-existent modules (see errors
99
99
  },
100
100
  );
101
101
  };
102
- reloader.changes.value.forEach((reloadMessage) => {
102
+ for (const reloadMessage of reloader.changes.value) {
103
103
  if (reloadMessage.type === "hot") {
104
104
  const promise = addToHotQueue(() => {
105
105
  return applyHotReload(reloadMessage);
@@ -108,7 +108,7 @@ This could be due to syntax errors or importing non-existent modules (see errors
108
108
  } else {
109
109
  setReloadMessagePromise(reloadMessage, Promise.resolve());
110
110
  }
111
- });
111
+ }
112
112
  },
113
113
  };
114
114
 
@@ -91,6 +91,7 @@ export const createImportMetaHot = (importMetaUrl) => {
91
91
  });
92
92
  },
93
93
  invalidate: () => {
94
+ window.location.reload(true);
94
95
  addUrlMeta(url, {
95
96
  invalidated: true,
96
97
  });
@@ -49,10 +49,12 @@ const jsenvPluginInlineContentFetcher = () => {
49
49
  const fsRootRelativeUrl = requestResource.slice("/@fs/".length);
50
50
  requestedUrl = `file:///${fsRootRelativeUrl}`;
51
51
  } else {
52
- requestedUrl = new URL(
52
+ const requestedUrlObject = new URL(
53
53
  requestResource.slice(1),
54
54
  urlInfo.context.rootDirectoryUrl,
55
- ).href;
55
+ );
56
+ requestedUrlObject.searchParams.delete("hot");
57
+ requestedUrl = requestedUrlObject.href;
56
58
  }
57
59
  isDirectRequestToFile = requestedUrl === urlInfo.url;
58
60
  }