From ed8fd8405ce2967c8d3b297a95b2bfa102b4f2b4 Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Wed, 20 Dec 2023 08:09:02 -0800 Subject: [PATCH] chore(sirv): bump `mrmime` version (#156) * Upgrade dependencies * Update packages/sirv/package.json --------- Co-authored-by: Luke Edwards --- package.json | 8 ++++---- packages/sirv/package.json | 4 ++-- tests/sirv.js | 10 +++++----- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 7a45398..a0fb882 100644 --- a/package.json +++ b/package.json @@ -11,11 +11,11 @@ }, "devDependencies": { "bump": "1.0.0-next.1", - "bundt": "1.0.1", + "bundt": "1.1.5", "esm": "3.2.25", - "httpie": "2.0.0-next.7", - "mrmime": "1.0.0", - "selfsigned": "1.10.7", + "httpie": "2.0.0-next.13", + "mrmime": "2.0.0", + "selfsigned": "2.4.1", "uvu": "0.5.2" } } diff --git a/packages/sirv/package.json b/packages/sirv/package.json index 8e0da3d..a7d4bd8 100644 --- a/packages/sirv/package.json +++ b/packages/sirv/package.json @@ -20,8 +20,8 @@ "node": ">= 10" }, "dependencies": { - "@polka/url": "^1.0.0-next.20", - "mrmime": "^1.0.0", + "@polka/url": "^1.0.0-next.24", + "mrmime": "^2.0.0", "totalist": "^3.0.0" } } \ No newline at end of file diff --git a/tests/sirv.js b/tests/sirv.js index 3e94e67..8235497 100644 --- a/tests/sirv.js +++ b/tests/sirv.js @@ -623,7 +623,7 @@ dev('should not rely on initial Cache fill', async () => { // matches() helper will work but assert here let res = await server.send('GET', '/foo.bar.js'); - assert.is(res.headers['content-type'], 'application/javascript'); + assert.is(res.headers['content-type'], 'text/javascript'); assert.is(res.headers['content-length'], '11'); assert.is(res.data, 'hello there'); assert.is(res.statusCode, 200); @@ -746,7 +746,7 @@ brotli('should require "Accept-Encoding" match to do anything', async () => { // the `matches` helper assumes wrong mime type let res = await server.send('GET', '/data.js', { headers }); - assert.is(res.headers['content-type'], 'application/javascript'); + assert.is(res.headers['content-type'], 'text/javascript'); assert.is(res.headers['content-encoding'], 'br'); assert.is(res.data, 'brotli js file\n'); assert.is(res.statusCode, 200); @@ -785,7 +785,7 @@ brotli('should be preferred when "Accept-Encoding" allows both', async () => { assert.is(res1.statusCode, 200); let res2 = await server.send('GET', '/data.js', { headers }); - assert.is(res2.headers['content-type'], 'application/javascript'); + assert.is(res2.headers['content-type'], 'text/javascript'); assert.is(res2.headers['content-encoding'], 'br'); assert.is(res2.data, 'brotli js file\n'); assert.is(res2.statusCode, 200); @@ -811,7 +811,7 @@ gzip('should require "Accept-Encoding" match to do anything', async () => { // the `matches` helper assumes wrong mime type let res = await server.send('GET', '/data.js', { headers }); - assert.is(res.headers['content-type'], 'application/javascript'); + assert.is(res.headers['content-type'], 'text/javascript'); assert.is(res.headers['content-encoding'], 'gzip'); assert.is(res.data, 'gzip js file\n'); assert.is(res.statusCode, 200); @@ -850,7 +850,7 @@ gzip('should defer to brotli when "Accept-Encoding" allows both', async () => { assert.is(res1.statusCode, 200); let res2 = await server.send('GET', '/data.js', { headers }); - assert.is(res2.headers['content-type'], 'application/javascript'); + assert.is(res2.headers['content-type'], 'text/javascript'); assert.is(res2.headers['content-encoding'], 'br'); assert.is(res2.data, 'brotli js file\n'); assert.is(res2.statusCode, 200);