Skip to content

Commit

Permalink
bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
v1rtl committed Jan 30, 2023
1 parent 40fc7f7 commit b2d2fd6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
coverage*
2 changes: 1 addition & 1 deletion example.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { compression } from './mod.ts'
import { Server } from 'https://deno.land/std@0.170.0/http/server.ts'
import { Server } from 'https://deno.land/std@0.175.0/http/server.ts'

const s = new Server({
handler: async (req) => {
Expand Down
15 changes: 7 additions & 8 deletions mod.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { readAll } from 'https://deno.land/std@0.170.0/streams/read_all.ts'
import { readAll } from 'https://deno.land/std@0.175.0/streams/read_all.ts'
import { compress as brotli } from 'https://deno.land/x/[email protected]/mod.ts'
import { Foras, gzip, deflate } from 'https://deno.land/x/[email protected].3/src/deno/mod.ts'
import { Foras } from 'https://deno.land/x/[email protected].6/src/deno/mod.ts'
import { Accepts } from 'https://deno.land/x/[email protected]/mod.ts'

await Foras.initSyncBundledOnce()
await Foras.initBundledOnce()

const funcs = {
br: brotli,
gzip: (body: Uint8Array) => gzip(body, undefined),
deflate: (body: Uint8Array) => deflate(body, undefined)
gzip: (body: Uint8Array) => Foras.gzip(body, undefined),
deflate: (body: Uint8Array) => Foras.deflate(body, undefined)
}

/**
Expand Down Expand Up @@ -49,7 +49,7 @@ export type CompressionOptions = {
* @example
* ```ts
import { compression } from 'https://deno.land/x/http_compression/mod.ts'
import { Server } from 'https://deno.land/std@0.170.0/http/server.ts'
import { Server } from 'https://deno.land/std@0.175.0/http/server.ts'
new Server({
handler: async (req) => {
Expand Down Expand Up @@ -96,8 +96,7 @@ export const compression =
return new Response(compressed, {
headers: new Headers({
'Content-Encoding': preferredAlgo
}),
status: 200
})
})
} else {
if (Array.isArray(encodings)) {
Expand Down

0 comments on commit b2d2fd6

Please sign in to comment.