@jsenv/core 29.1.12 → 29.1.13

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/dist/main.js CHANGED
@@ -7060,7 +7060,7 @@ const fetchFileSystem = async (filesystemUrl, {
7060
7060
 
7061
7061
  rootDirectoryUrl = rootDirectoryUrlString;
7062
7062
  } // here you might be tempted to add || cacheControl === 'no-cache'
7063
- // but no-cache means resource can be cache but must be revalidated (yeah naming is strange)
7063
+ // but no-cache means resource can be cached but must be revalidated (yeah naming is strange)
7064
7064
  // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Cacheability
7065
7065
 
7066
7066
 
@@ -25759,10 +25759,11 @@ const createFileService = ({
25759
25759
  response = {
25760
25760
  url: reference.url,
25761
25761
  status: 200,
25762
- headers: {
25763
- "cache-control": `private,max-age=0,must-revalidate`,
25764
- // it's safe to use "_" separator because etag is encoded with base64 (see https://stackoverflow.com/a/13195197)
25765
- "eTag": `${urlInfoTargetedByCache.originalContentEtag}_${urlInfoTargetedByCache.contentEtag}`,
25762
+ headers: { ...(urlInfo.headers["cache-control"] === "no-store" ? {} : {
25763
+ "cache-control": `private,max-age=0,must-revalidate`,
25764
+ // it's safe to use "_" separator because etag is encoded with base64 (see https://stackoverflow.com/a/13195197)
25765
+ "eTag": `${urlInfoTargetedByCache.originalContentEtag}_${urlInfoTargetedByCache.contentEtag}`
25766
+ }),
25766
25767
  ...urlInfo.headers,
25767
25768
  "content-type": urlInfo.contentType,
25768
25769
  "content-length": Buffer.byteLength(urlInfo.content)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "29.1.12",
3
+ "version": "29.1.13",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -100,7 +100,7 @@
100
100
  "@babel/eslint-parser": "7.19.1",
101
101
  "@babel/plugin-syntax-import-assertions": "7.18.6",
102
102
  "@jsenv/assert": "2.7.0",
103
- "@jsenv/eslint-config": "16.2.1",
103
+ "@jsenv/eslint-config": "16.2.3",
104
104
  "@jsenv/file-size-impact": "13.0.1",
105
105
  "@jsenv/https-local": "3.0.1",
106
106
  "@jsenv/package-workspace": "0.5.0",
@@ -334,9 +334,13 @@ export const createFileService = ({
334
334
  url: reference.url,
335
335
  status: 200,
336
336
  headers: {
337
- "cache-control": `private,max-age=0,must-revalidate`,
338
- // it's safe to use "_" separator because etag is encoded with base64 (see https://stackoverflow.com/a/13195197)
339
- "eTag": `${urlInfoTargetedByCache.originalContentEtag}_${urlInfoTargetedByCache.contentEtag}`,
337
+ ...(urlInfo.headers["cache-control"] === "no-store"
338
+ ? {}
339
+ : {
340
+ "cache-control": `private,max-age=0,must-revalidate`,
341
+ // it's safe to use "_" separator because etag is encoded with base64 (see https://stackoverflow.com/a/13195197)
342
+ "eTag": `${urlInfoTargetedByCache.originalContentEtag}_${urlInfoTargetedByCache.contentEtag}`,
343
+ }),
340
344
  ...urlInfo.headers,
341
345
  "content-type": urlInfo.contentType,
342
346
  "content-length": Buffer.byteLength(urlInfo.content),