Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Commit

Permalink
Bumps Deno to 1.7.2 and std to 0.86.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesseanwright committed Feb 9, 2021
1 parent 8d8e5bf commit 9cdbe6f
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion .deno_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.6.1
1.7.2
2 changes: 1 addition & 1 deletion Package.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = "reno"
description = "A thin routing library designed to sit on top of Deno's standard HTTP module"
version = "1.3.9"
version = "1.3.10"
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

[![Build status](https://github.com/reno-router/reno/workflows/CI/badge.svg)](https://github.com/reno-router/reno/actions)

[![Deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/[email protected].9/reno/mod.ts)
[![Deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/[email protected].10/reno/mod.ts)

Reno is a thin routing library designed to sit on top of [Deno](https://deno.land/)'s [standard HTTP module](https://github.com/denoland/deno/tree/master/std/http).

Expand All @@ -18,7 +18,7 @@ Reno is a thin routing library designed to sit on top of [Deno](https://deno.lan
## Overview

```tsx
import { listenAndServe } from "https://deno.land/std@0.81.0/http/server.ts";
import { listenAndServe } from "https://deno.land/std@0.86.0/http/server.ts";

import {
createRouter,
Expand All @@ -28,7 +28,7 @@ import {
jsonResponse,
streamResponse,
NotFoundError,
} from "https://deno.land/x/[email protected].9/reno/mod.ts";
} from "https://deno.land/x/[email protected].10/reno/mod.ts";

function createErrorResponse(status: number, { message }: Error) {
return textResponse(message, {}, status);
Expand Down Expand Up @@ -84,7 +84,7 @@ await listenAndServe(
This, along with request handlers being [pure functions](https://en.wikipedia.org/wiki/Pure_function), makes unit testing Reno services a breeze:

```ts
import { jsonResponse, assertResponsesAreEqual } from "https://deno.land/x/[email protected].9/reno/mod.ts";
import { jsonResponse, assertResponsesAreEqual } from "https://deno.land/x/[email protected].10/reno/mod.ts";
import { createRonSwansonQuoteHandler } from "./routes.ts";

const createFetchStub = (response: string[]) =>
Expand Down Expand Up @@ -168,7 +168,7 @@ import {
RouteHandler,
textResponse,
createRouteMap
} from "https://deno.land/x/[email protected].9/reno/mod.ts";
} from "https://deno.land/x/[email protected].10/reno/mod.ts";

import isValidAPIKey from "./api_keys.ts";

Expand Down Expand Up @@ -206,7 +206,7 @@ export const routes = createRouteMap([
Additionally, Reno provides a `pipe` utility for creating a higher-order route handler that invokes a sequence of functions against both the original request _and_ the computed response:

```ts
import { createRouteMap, jsonResponse, pipe } from "https://deno.land/x/[email protected].9/reno/mod.ts";
import { createRouteMap, jsonResponse, pipe } from "https://deno.land/x/[email protected].10/reno/mod.ts";

const withCaching = pipe(
(req, res) => {
Expand Down Expand Up @@ -255,11 +255,11 @@ Deno.test("/ should return the expected response", async () => {

## Example Apps

As well as the [example app found in this repo](https://github.com/reno-router/reno/tree/v1.3.9/example), which is targetted by the end-to-end test suite, there is a [standalone repository for a blog microservice](https://github.com/reno-router/blog-microservice) built with Deno, Reno, PostgreSQL, and Docker.
As well as the [example app found in this repo](https://github.com/reno-router/reno/tree/v1.3.10/example), which is targetted by the end-to-end test suite, there is a [standalone repository for a blog microservice](https://github.com/reno-router/blog-microservice) built with Deno, Reno, PostgreSQL, and Docker.

## API Documentation

Consult [Reno's entry on the Deno Doc website](https://doc.deno.land/https/deno.land/x/[email protected].9/reno/mod.ts) for comprehensive documentation on Reno's API.
Consult [Reno's entry on the Deno Doc website](https://doc.deno.land/https/deno.land/x/[email protected].10/reno/mod.ts) for comprehensive documentation on Reno's API.

## Local Development

Expand Down
2 changes: 1 addition & 1 deletion README.template.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Reno is a thin routing library designed to sit on top of [Deno](https://deno.lan
## Overview

```tsx
import { listenAndServe } from "https://deno.land/std@0.81.0/http/server.ts";
import { listenAndServe } from "https://deno.land/std@0.86.0/http/server.ts";

import {
createRouter,
Expand Down
6 changes: 3 additions & 3 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Recommended as per https://deno.land/std/manual.md#linking-to-third-party-code

export * from "https://deno.land/std@0.81.0/testing/asserts.ts";
export * from "https://deno.land/std@0.81.0/io/mod.ts";
export type { Response, ServerRequest } from "https://deno.land/std@0.81.0/http/server.ts";
export * from "https://deno.land/std@0.86.0/testing/asserts.ts";
export * from "https://deno.land/std@0.86.0/io/mod.ts";
export type { Response, ServerRequest } from "https://deno.land/std@0.86.0/http/server.ts";

import __jsTestDouble from "https://dev.jspm.io/[email protected]";
import * as TestDouble from "https://raw.githubusercontent.com/testdouble/testdouble.js/ecd90efe4649b287c33831a7b94a8a5eb96b8ed0/index.d.ts";
Expand Down
2 changes: 1 addition & 1 deletion example/api/routes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { StringReader } from "https://deno.land/std@0.81.0/io/readers.ts";
import { StringReader } from "https://deno.land/std@0.86.0/io/readers.ts";

import colossalData from "./colossal.ts";

Expand Down
2 changes: 1 addition & 1 deletion example/app.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ServerRequest } from "https://deno.land/std@0.81.0/http/server.ts";
import { ServerRequest } from "https://deno.land/std@0.86.0/http/server.ts";

import { createRouter, NotFoundError, textResponse } from "../reno/mod.ts";
import { routes } from "./routes.ts";
Expand Down
2 changes: 1 addition & 1 deletion example/server.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
listenAndServe,
ServerRequest,
} from "https://deno.land/std@0.81.0/http/server.ts";
} from "https://deno.land/std@0.86.0/http/server.ts";

import app from "./app.ts";

Expand Down
2 changes: 1 addition & 1 deletion reno/cookies.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setCookie } from "https://deno.land/std@0.81.0/http/cookie.ts";
import { setCookie } from "https://deno.land/std@0.86.0/http/cookie.ts";
import { AugmentedResponse } from "./router.ts";

/* Currently, setCookie will overwrite
Expand Down
4 changes: 2 additions & 2 deletions reno/cookies_test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { createCookieWriter } from "./cookies.ts";
import { testdouble } from "../deps.ts";
import { Cookie } from "https://deno.land/std@0.81.0/http/cookie.ts";
import { Response } from "https://deno.land/std@0.81.0/http/server.ts";
import { Cookie } from "https://deno.land/std@0.86.0/http/cookie.ts";
import { Response } from "https://deno.land/std@0.86.0/http/server.ts";

type CookieSetter = (res: Response, cookie: Cookie) => void;

Expand Down
6 changes: 3 additions & 3 deletions reno/router.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
Response,
ServerRequest,
} from "https://deno.land/std@0.81.0/http/server.ts";
} from "https://deno.land/std@0.86.0/http/server.ts";

import { writeCookies } from "./cookies.ts";
import parsePath from "./pathparser.ts";
Expand All @@ -16,7 +16,7 @@ import parsePath from "./pathparser.ts";
export type AugmentedRequest =
& Pick<
ServerRequest,
Exclude<keyof ServerRequest, "respond">
Exclude<keyof ServerRequest, "respond" | "done">
>
& {
queryParams: URLSearchParams;
Expand Down Expand Up @@ -166,7 +166,7 @@ export function routerCreator(
* import {
* ServerRequest,
* listenAndServe,
* } from "https://deno.land/std@0.81.0/http/server.ts";
* } from "https://deno.land/std@0.86.0/http/server.ts";
* import { createRouter } from "https://deno.land/x/reno@<VERSION>/reno/mod.ts";
* import { routes } from "./routes.ts";
Expand Down
2 changes: 1 addition & 1 deletion scripts/e2e.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh

$HOME/.deno/bin/deno test --allow-net e2e_tests
$HOME/.deno/bin/deno test --allow-net --location https://host/ e2e_tests
10 changes: 5 additions & 5 deletions test_utils.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { BufReader } from "https://deno.land/std@0.81.0/io/bufio.ts";
import { BufReader } from "https://deno.land/std@0.86.0/io/bufio.ts";
import {
ServerRequest,
} from "https://deno.land/std@0.81.0/http/server.ts";
import { StringReader } from "https://deno.land/std@0.81.0/io/readers.ts";
import { readRequest } from "https://deno.land/std@0.81.0/http/_io.ts";
} from "https://deno.land/std@0.86.0/http/server.ts";
import { StringReader } from "https://deno.land/std@0.86.0/io/readers.ts";
import { readRequest } from "https://deno.land/std@0.86.0/http/_io.ts";
import { createAugmentedRequest as createAugmentedRouterRequest } from "./reno/router.ts";

function createStubAddr() {
Expand All @@ -19,7 +19,7 @@ function createStubConn() {
localAddr: createStubAddr(),
remoteAddr: createStubAddr(),
rid: 1,
closeWrite: () => undefined,
closeWrite: () => Promise.resolve(undefined),
close: () => undefined,
read: (p: Uint8Array) => Promise.resolve(p.length),
write: (p: Uint8Array) => Promise.resolve(p.length),
Expand Down
2 changes: 1 addition & 1 deletion tools/generate_readme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env deno

import { parse as parseTOML } from "https://deno.land/std@0.81.0/encoding/toml.ts";
import { parse as parseTOML } from "https://deno.land/std@0.86.0/encoding/toml.ts";

interface Metadata {
name: string;
Expand Down

0 comments on commit 9cdbe6f

Please sign in to comment.