@jsenv/core 39.11.1 → 39.11.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.
@@ -8399,6 +8399,10 @@ const getMtimeResponse = async ({ headers, fileStat }) => {
8399
8399
  };
8400
8400
 
8401
8401
  const getCompressedResponse = async ({ fileUrl, headers }) => {
8402
+ const contentType = CONTENT_TYPE.fromUrlExtension(fileUrl);
8403
+ if (CONTENT_TYPE.isBinary(contentType)) {
8404
+ return null;
8405
+ }
8402
8406
  const acceptedCompressionFormat = pickContentEncoding(
8403
8407
  { headers },
8404
8408
  Object.keys(availableCompressionFormats),
@@ -8416,7 +8420,7 @@ const getCompressedResponse = async ({ fileUrl, headers }) => {
8416
8420
  return {
8417
8421
  status: 200,
8418
8422
  headers: {
8419
- "content-type": CONTENT_TYPE.fromUrlExtension(fileUrl),
8423
+ "content-type": contentType,
8420
8424
  "content-encoding": acceptedCompressionFormat,
8421
8425
  "vary": "accept-encoding",
8422
8426
  },
@@ -24609,7 +24613,7 @@ const createBuildFilesService = ({ buildDirectoryUrl, buildMainFilePath }) => {
24609
24613
  ? `private,max-age=${SECONDS_IN_30_DAYS},immutable`
24610
24614
  : "private,max-age=0,must-revalidate",
24611
24615
  etagEnabled: true,
24612
- compressionEnabled: !request.pathname.endsWith(".mp4"),
24616
+ compressionEnabled: true,
24613
24617
  rootDirectoryUrl: buildDirectoryUrl,
24614
24618
  canReadDirectory: true,
24615
24619
  ENOENTFallback: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/core",
3
- "version": "39.11.1",
3
+ "version": "39.11.2",
4
4
  "description": "Tool to develop, test and build js projects",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -81,7 +81,7 @@
81
81
  "@jsenv/plugin-supervisor": "1.6.3",
82
82
  "@jsenv/plugin-transpilation": "1.4.92",
83
83
  "@jsenv/runtime-compat": "1.3.1",
84
- "@jsenv/server": "15.4.0",
84
+ "@jsenv/server": "15.4.1",
85
85
  "@jsenv/sourcemap": "1.2.30",
86
86
  "@jsenv/url-meta": "8.5.2",
87
87
  "@jsenv/urls": "2.6.0",
@@ -176,7 +176,7 @@ const createBuildFilesService = ({ buildDirectoryUrl, buildMainFilePath }) => {
176
176
  ? `private,max-age=${SECONDS_IN_30_DAYS},immutable`
177
177
  : "private,max-age=0,must-revalidate",
178
178
  etagEnabled: true,
179
- compressionEnabled: !request.pathname.endsWith(".mp4"),
179
+ compressionEnabled: true,
180
180
  rootDirectoryUrl: buildDirectoryUrl,
181
181
  canReadDirectory: true,
182
182
  ENOENTFallback: () => {