Skip to content

Commit

Permalink
bump std
Browse files Browse the repository at this point in the history
  • Loading branch information
talentlessguy committed Jan 4, 2024
1 parent 3912bf2 commit 75c1db7
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 19 deletions.
27 changes: 17 additions & 10 deletions deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ export {
type RequestParams,
} from 'npm:[email protected]'
export {
Status,
STATUS_TEXT,
} from 'https://deno.land/[email protected]/http/status.ts'
type StatusCode,
} from 'https://deno.land/[email protected]/http/status.ts'
15 changes: 9 additions & 6 deletions mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import {
createHandler,
OperationContext,
RawRequest,
Status,
STATUS_TEXT,
type StatusCode,
} from './deps.ts'
import { accepts } from 'https://deno.land/std@0.205.0/http/negotiation.ts'
import { accepts } from 'https://deno.land/std@0.210.0/http/negotiation.ts'
import { GQLOptions } from './types.ts'

function toRequest<Req = Request, Ctx = unknown>(
Expand Down Expand Up @@ -67,10 +67,13 @@ export function GraphQLHTTP<
),
)

return new Response(body || STATUS_TEXT[init.status as Status], {
...init,
headers: new Headers({ ...init.headers, ...headers }),
})
return new Response(
body || STATUS_TEXT[init.status as StatusCode],
{
...init,
headers: new Headers({ ...init.headers, ...headers }),
},
)
} catch (e) {
console.error(
'Internal error occurred during request handling. ' +
Expand Down
2 changes: 1 addition & 1 deletion mod_test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { superdeno } from 'https://deno.land/x/[email protected]/mod.ts?target=deno'
import { describe, it } from 'https://deno.land/std@0.205.0/testing/bdd.ts'
import { describe, it } from 'https://deno.land/std@0.210.0/testing/bdd.ts'
import {
buildSchema,
GraphQLObjectType,
Expand Down

0 comments on commit 75c1db7

Please sign in to comment.