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

Commit

Permalink
Pulls Sinon type def as remote import
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesseanwright committed Nov 26, 2019
1 parent fc95746 commit 8a33c0a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Package.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name = "james@entropic.jamesswright.co.uk/reno"
description = "A thin routing library designed to sit on top of Deno's standard HTTP module"
version = "0.6.2"
version = "0.6.3"
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
textResponse,
jsonResponse,
streamResponse,
} from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.2/reno/mod.ts";
} from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.3/reno/mod.ts";

export const routes = createRouteMap([
["/home", () => textResponse("Hello world!")],
Expand Down Expand Up @@ -52,7 +52,7 @@ const router = createRouter(routes);
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, assertResponsesMatch } from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.2/reno/mod.ts";
import { jsonResponse, assertResponsesMatch } from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.3/reno/mod.ts";
import { createRonSwansonQuoteHandler } from './routes.ts';

const createFetchStub = (response: string[]) =>
Expand Down Expand Up @@ -85,7 +85,7 @@ test({
Deno emulates the middleware pattern, [found in Express](https://expressjs.com/en/guide/using-middleware.html), favouring [function piping](https://www.sitepoint.com/function-composition-in-javascript/#theimportanceofinvocationorder) to create reusable, higher-order route handlers:

```ts
import { createRouteMap, jsonResponse, pipe } from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.2/reno/mod.ts";
import { createRouteMap, jsonResponse, pipe } from "https://raw.githubusercontent.com/jamesseanwright/reno/v0.6.3/reno/mod.ts";

const withCaching = pipe(
(req, res) => {
Expand Down
3 changes: 1 addition & 2 deletions deps.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
// Recommended as per https://deno.land/std/manual.md#linking-to-third-party-code

// @deno-types="./types/sinon.d.ts"
import __jsSinon from "https://cdn.pika.dev/-/sinon/7.5.0/dist-es2017/sinon.min.js";
import Sinon from "./types/sinon.d.ts";
import Sinon from "https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/949922e0959ccea0cad7a6fa787b63b7d4e67d3f/types/sinon/index.d.ts";

export * from "https://deno.land/std@v0.23.0/testing/asserts.ts";
export * from "https://deno.land/std@v0.23.0/testing/mod.ts";
Expand Down
2 changes: 1 addition & 1 deletion tools/cut-release.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env sh

deno --allow-read --allow-write --allow-run tools/cut-release.ts
deno --allow-read --allow-write --allow-run tools/cut-release.ts
1 change: 0 additions & 1 deletion tools/install-types.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ echo "Installing type definitions..."

mkdir types
deno types > types/deno.d.ts
curl https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/949922e0959ccea0cad7a6fa787b63b7d4e67d3f/types/sinon/index.d.ts > types/sinon.d.ts

0 comments on commit 8a33c0a

Please sign in to comment.