File tree Expand file tree Collapse file tree 6 files changed +71
-60
lines changed
Expand file tree Collapse file tree 6 files changed +71
-60
lines changed Original file line number Diff line number Diff line change 1+ # [ 1.1.0-beta.1] ( https://github.com/httpland/compression-middleware/compare/1.0.0...1.1.0-beta.1 ) (2023-04-02)
2+
3+
4+ ### Features
5+
6+ * ** deps:** update deps version ([ c8a343d] ( https://github.com/httpland/compression-middleware/commit/c8a343d90e74c9b205336a8d3874ffba01cc3a5c ) )
7+
18# 1.0.0 (2023-03-19)
29
310
Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ export {
33 assertEquals ,
44 assertFalse ,
55 assertThrows ,
6- } from "https://deno.land/std@0.180 .0/testing/asserts.ts" ;
7- export { describe , it } from "https://deno.land/std@0.180 .0/testing/bdd.ts" ;
6+ } from "https://deno.land/std@0.181 .0/testing/asserts.ts" ;
7+ export { describe , it } from "https://deno.land/std@0.181 .0/testing/bdd.ts" ;
88export {
99 assertSpyCalls ,
1010 spy ,
11- } from "https://deno.land/std@0.180 .0/testing/mock.ts" ;
12- export { equalsResponse } from "https://deno.land/x/http_utils@1.0.0-beta.13 /response.ts" ;
11+ } from "https://deno.land/std@0.181 .0/testing/mock.ts" ;
12+ export { equalsResponse } from "https://deno.land/x/http_utils@1.0.0/response.ts" ;
Original file line number Diff line number Diff line change @@ -42,23 +42,34 @@ export const makeOptions = (version: string): BuildOptions => ({
4242 publishConfig : {
4343 access : "public" ,
4444 } ,
45+ dependencies : {
46+ "@types/compressible" : "2.0.0" ,
47+ "@types/node" : "^18" ,
48+ } ,
4549 } ,
4650 mappings : {
47- "https://esm.sh/compressible@2.0.18" : {
51+ "https://esm.sh/compressible@2.0.18?pin=v111 " : {
4852 name : "compressible" ,
4953 version : "2.0.18" ,
5054 } ,
5155 "https://deno.land/x/http_middleware@1.0.0/mod.ts" : {
5256 name : "@httpland/http-middleware" ,
5357 version : "1.0.0" ,
5458 } ,
55- "https://deno.land/x/http_utils@1.0.0-beta.13/header.ts" : {
56- name : "@httpland/http-utils" ,
57- version : "1.0.0-beta.13" ,
59+ "https://deno.land/x/isx@1.1.1/is_null.ts" : {
60+ name : "@miyauci/isx" ,
61+ version : "1.1.1" ,
62+ subPath : "is_null" ,
63+ } ,
64+ "https://deno.land/x/isx@1.1.1/is_iterable.ts" : {
65+ name : "@miyauci/isx" ,
66+ version : "1.1.1" ,
67+ subPath : "is_iterable" ,
5868 } ,
59- "https://deno.land/x/isx@1.0.0-beta.24/mod.ts" : {
60- name : "isxx" ,
61- version : "1.0.0-beta.24" ,
69+ "https://deno.land/x/http_utils@1.0.0/header.ts" : {
70+ name : "@httpland/http-utils" ,
71+ version : "1.0.0" ,
72+ subPath : "header.js" ,
6273 } ,
6374 } ,
6475 packageManager : "pnpm" ,
Original file line number Diff line number Diff line change @@ -9,12 +9,10 @@ export {
99 CachingHeader ,
1010 ContentNegotiationHeader ,
1111 RepresentationHeader ,
12- } from "https://deno.land/x/http_utils@1.0.0-beta.13/header.ts" ;
13- export { acceptsEncodings } from "https://deno.land/std@0.180.0/http/negotiation.ts" ;
14- export { parseMediaType } from "https://deno.land/std@0.180.0/media_types/mod.ts" ;
15- export {
16- isIterable ,
17- isNull ,
18- } from "https://deno.land/x/isx@1.0.0-beta.24/mod.ts" ;
19- export { default as compressible } from "https://esm.sh/compressible@2.0.18" ;
12+ } from "https://deno.land/x/http_utils@1.0.0/header.ts" ;
13+ export { acceptsEncodings } from "https://deno.land/std@0.181.0/http/negotiation.ts" ;
14+ export { parseMediaType } from "https://deno.land/std@0.181.0/media_types/mod.ts" ;
15+ export { isNull } from "https://deno.land/x/isx@1.1.1/is_null.ts" ;
16+ export { isIterable } from "https://deno.land/x/isx@1.1.1/is_iterable.ts" ;
17+ export { default as compressible } from "https://esm.sh/compressible@2.0.18?pin=v111" ;
2018export { vary } from "https://deno.land/x/vary@1.0.0/mod.ts" ;
Original file line number Diff line number Diff line change 33
44import { RepresentationHeader } from "./deps.ts" ;
55
6+ // TODO(miayuci): add strict parsing.
7+
68const ReNoTransform = / (?: ^ | , ) \s * ?n o - t r a n s f o r m \s * ?(?: , | $ ) / ;
79
810export function isNoTransform ( input : string ) : boolean {
911 return ReNoTransform . test ( input ) ;
1012}
1113
14+ /** Return new `Response` if the response include `Content-Length` header and readable. */
1215export async function reCalcContentLength (
1316 response : Response ,
1417) : Promise < Response > {
You can’t perform that action at this time.
0 commit comments