single-file-core 1.5.0 → 1.5.1

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 (2) hide show
  1. package/core/util.js +6 -2
  2. package/package.json +1 -1
package/core/util.js CHANGED
@@ -71,7 +71,11 @@ const URL = globalThis.URL;
71
71
  const DOMParser = globalThis.DOMParser;
72
72
  const Blob = globalThis.Blob;
73
73
  const FileReader = globalThis.FileReader;
74
- const fetch = (url, options) => globalThis.fetch(url, options);
74
+ const fetch = (url, options) => {
75
+ options.cache = "force-cache";
76
+ options.referrerPolicy = "strict-origin-when-cross-origin";
77
+ return globalThis.fetch(url, options);
78
+ };
75
79
  const TextDecoder = globalThis.TextDecoder;
76
80
  const URLSearchParams = globalThis.URLSearchParams;
77
81
 
@@ -87,7 +91,7 @@ function getInstance(utilOptions) {
87
91
  getDoctypeString,
88
92
  getFilenameExtension(resourceURL, replacedCharacters, replacementCharacter) {
89
93
  let matchExtension;
90
- try {
94
+ try {
91
95
  matchExtension = new URL(resourceURL).pathname.match(/(\.[^\\/.]*)$/);
92
96
  } catch (error) {
93
97
  // ignored
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.5.0",
3
+ "version": "1.5.1",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",