Skip to content

Commit

Permalink
feat: 0.21.3
Browse files Browse the repository at this point in the history
  • Loading branch information
asos-craigmorten committed Aug 24, 2020
1 parent 584c5c6 commit 8ba3b17
Show file tree
Hide file tree
Showing 19 changed files with 2,355 additions and 76 deletions.
12 changes: 6 additions & 6 deletions .github/API/application.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Adapted from the [ExpressJS API Docs](https://expressjs.com/en/4x/api.html).
The `app` object conventionally denotes the Opine application. Create it by calling the top-level `opine()` function exported by the Opine module:

```ts
import opine from "https://deno.land/x/[email protected].2/mod.ts";
import opine from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand Down Expand Up @@ -59,7 +59,7 @@ The `app.mountpath` property contains one or more path patterns on which a sub-a
> A sub-app is an instance of `opine` that may be used for handling the request to a route.
```ts
import opine from "https://deno.land/x/[email protected].2/mod.ts";
import opine from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine(); // the main app
const admin = opine(); // the sub app
Expand Down Expand Up @@ -447,7 +447,7 @@ app.get("/", function (req, res) {
Binds and listens for connections on the specified address. This method is nearly identical to Deno's [http.listenAndServe()](https://doc.deno.land/https/deno.land/std/http/server.ts#listenAndServe). An optional callback can be provided which will be executed after the server starts listening for requests - this is provided for legacy reasons to aid in transitions from Express on Node.

```ts
import opine from "https://deno.land/x/[email protected].2/mod.ts";
import opine from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand Down Expand Up @@ -477,7 +477,7 @@ Binds and listens for connections on the specified numerical port. If no port is
This method is supported for legacy reasons to aid in transitions from Express on Node.

```ts
import opine from "https://deno.land/x/[email protected].2/mod.ts";
import opine from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();
const PORT = 3000;
Expand All @@ -490,7 +490,7 @@ app.listen(PORT, () => console.log(`Server started on port ${PORT}`));
Binds and listens for connections using the specified [http.HTTPOptions](https://doc.deno.land/https/deno.land/std/http/server.ts#HTTPOptions). This method is nearly identical to Deno's [http.listenAndServe()](https://doc.deno.land/https/deno.land/std/http/server.ts#listenAndServe). An optional callback can be provided which will be executed after the server starts listening for requests - this is provided for legacy reasons to aid in transitions from Express on Node.

```ts
import opine from "https://deno.land/x/[email protected].2/mod.ts";
import opine from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand All @@ -502,7 +502,7 @@ app.listen({ port: 3000 });
Binds and listens for connections using the specified [http.HTTPSOptions](https://doc.deno.land/https/deno.land/std/http/server.ts#HTTPSOptions). This method is nearly identical to Deno's [http.listenAndServeTLS()](https://doc.deno.land/https/deno.land/std/http/server.ts#listenAndServeTLS). An optional callback can be provided which will be executed after the server starts listening for requests - this is provided for legacy reasons to aid in transitions from Express on Node.

```ts
import opine from "https://deno.land/x/[email protected].2/mod.ts";
import opine from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand Down
8 changes: 4 additions & 4 deletions .github/API/middlewares.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A new `parsedBody` object containing the parsed data is populated on the `reques
> As `req.parsedBody`'s shape is based on user-controlled input, all properties and values in this object are untrusted and should be validated before trusting. For example, `req.parsedBody.foo.toString()` may fail in multiple ways, for example `foo` may not be there or may not be a string, and `toString` may not be a function and instead a string or other user-input.
```ts
import { opine, json } from "https://deno.land/x/[email protected].2/mod.ts";
import { opine, json } from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand Down Expand Up @@ -46,7 +46,7 @@ A new `parsedBody` `Buffer` containing the parsed data is populated on the `requ
> As `req.parsedBody`'s shape is based on user-controlled input, all properties and values in this object are untrusted and should be validated before trusting. For example, `req.parsedBody.toString()` may fail in multiple ways, for example stacking multiple parsers `req.parsedBody` may be from a different parser. Testing that `req.parsedBody` is a `Buffer` before calling buffer methods is recommended.
```ts
import { opine, raw } from "https://deno.land/x/[email protected].2/mod.ts";
import { opine, raw } from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand Down Expand Up @@ -142,7 +142,7 @@ A new `parsedBody` string containing the parsed data is populated on the `reques
> As `req.parsedBody`'s shape is based on user-controlled input, all properties and values in this object are untrusted and should be validated before trusting. For example, `req.parsedBody.trim()` may fail in multiple ways, for example stacking multiple parsers `req.parsedBody` may be from a different parser. Testing that `req.parsedBody` is a string before calling string methods is recommended.
```ts
import { opine, text } from "https://deno.land/x/[email protected].2/mod.ts";
import { opine, text } from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand Down Expand Up @@ -173,7 +173,7 @@ A new `parsedBody` object containing the parsed data is populated on the `reques
> As `req.parsedBody`'s shape is based on user-controlled input, all properties and values in this object are untrusted and should be validated before trusting. For example, `req.parsedBody.foo.toString()` may fail in multiple ways, for example `foo` may not be there or may not be a string, and `toString` may not be a function and instead a string or other user-input.
```ts
import { opine, urlencoded } from "https://deno.land/x/[email protected].2/mod.ts";
import { opine, urlencoded } from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand Down
4 changes: 2 additions & 2 deletions .github/API/opine.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ Adapted from the [ExpressJS API Docs](https://expressjs.com/en/4x/api.html).
Creates an Opine application. The `opine()` function is a top-level function exported by the Opine module:

```ts
import opine from "https://deno.land/x/[email protected].2/mod.ts";
import opine from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();
```

The `opine()` function is also exported as a named export:

```ts
import { opine } from "https://deno.land/x/[email protected].2/mod.ts";
import { opine } from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();
```
4 changes: 2 additions & 2 deletions .github/API/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ import {
opine,
json,
urlencoded,
} from "https://deno.land/x/[email protected].2/mod.ts";
} from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand All @@ -100,7 +100,7 @@ app.post("/profile", function (req, res, next) {
The following example shows how to implement your own simple body-parsing middleware to transform `req.parsedBody` into a raw string:
```ts
import opine from "https://deno.land/x/[email protected].2/mod.ts";
import opine from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand Down
4 changes: 2 additions & 2 deletions .github/API/router.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A router behaves like middleware itself, so you can use it as an argument to [ap
Opine has a top-level named function export `Router()` that creates a new `router` object.

```ts
import { Router } from "https://deno.land/x/[email protected].2/mod.ts";
import { Router } from "https://deno.land/x/[email protected].3/mod.ts";

const router = Router(options);
```
Expand Down Expand Up @@ -210,7 +210,7 @@ This method is similar to [app.use()](./application#appusepath-callback--callbac
Middleware is like a plumbing pipe: requests start at the first middleware function defined and work their way "down" the middleware stack processing for each path they match.

```ts
import opine, { Router } from "https://deno.land/x/[email protected].2/mod.ts";
import opine, { Router } from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();
const router = Router();
Expand Down
6 changes: 6 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ChangeLog

## [0.21.3] - 24-08-2020

- chore: upgrade supported Deno and std module versions to `1.3.1` and `0.66.0`.
- chore: upgrade superdeno for Deno 1.3.1 bugfix.
- test: null responses are now exposed as null in superdeno (not empty strings).

## [0.21.2] - 18-08-2020

- [#58] Broken redirect directory listener (#60)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v2
- uses: denolib/setup-deno@v2
with:
deno-version: 1.3.0
deno-version: 1.3.1
- run: |
mkdir -p artifacts
cat > artifacts/message.md <<EOF
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- run: make deps
- uses: denolib/setup-deno@v2
with:
deno-version: 1.3.0
deno-version: 1.3.1
- run: make typedoc
- run: make ci
- uses: stefanzweifel/git-auto-commit-action@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-egg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v2
- uses: denolib/setup-deno@v2
with:
deno-version: 1.3.0
deno-version: 1.3.1
- run: deno install -A -f --unstable -n eggs https://x.nest.land/[email protected]/mod.ts
- run: |
export PATH="/home/runner/.deno/bin:$PATH"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
deno-version: [1.3.0]
deno-version: [1.3.1]

runs-on: ${{ matrix.os }}

Expand All @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
os: [windows-latest]
deno-version: [1.3.0]
deno-version: [1.3.1]

runs-on: ${{ matrix.os }}

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Fast, minimalist web framework for <a href="https://deno.land/">Deno</a> ported
## Getting Started

```ts
import { opine } from "https://deno.land/x/[email protected].2/mod.ts";
import { opine } from "https://deno.land/x/[email protected].3/mod.ts";

const app = opine();

Expand All @@ -54,13 +54,13 @@ Before importing, [download and install Deno](https://deno.land/#installation).
You can then import Opine straight into your project:

```ts
import { opine } from "https://deno.land/x/[email protected].2/mod.ts";
import { opine } from "https://deno.land/x/[email protected].3/mod.ts";
```

Opine is also available on [nest.land](https://nest.land/package/opine), a package registry for Deno on the Blockchain.

```ts
import { opine } from "https://x.nest.land/[email protected].2/mod.ts";
import { opine } from "https://x.nest.land/[email protected].3/mod.ts";
```

## Features
Expand Down
16 changes: 8 additions & 8 deletions deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ export {
Server,
ServerRequest,
Response,
} from "https://deno.land/std@0.65.0/http/server.ts";
} from "https://deno.land/std@0.66.0/http/server.ts";
export {
Status,
STATUS_TEXT,
} from "https://deno.land/std@0.65.0/http/http_status.ts";
} from "https://deno.land/std@0.66.0/http/http_status.ts";
export {
setCookie,
Cookie,
deleteCookie,
} from "https://deno.land/std@0.65.0/http/cookie.ts";
} from "https://deno.land/std@0.66.0/http/cookie.ts";
export {
extname,
fromFileUrl,
basename,
join,
dirname,
resolve,
} from "https://deno.land/std@0.65.0/path/mod.ts";
export { setImmediate } from "https://deno.land/std@0.65.0/node/timers.ts";
export { Sha1 } from "https://deno.land/std@0.65.0/hash/sha1.ts";
export { encoder } from "https://deno.land/std@0.65.0/encoding/utf8.ts";
} from "https://deno.land/std@0.66.0/path/mod.ts";
export { setImmediate } from "https://deno.land/std@0.66.0/node/timers.ts";
export { Sha1 } from "https://deno.land/std@0.66.0/hash/sha1.ts";
export { encoder } from "https://deno.land/std@0.66.0/encoding/utf8.ts";
export {
Evt as EventEmitter,
to as getEvent,
Expand All @@ -35,7 +35,7 @@ export {
contentType,
charset,
lookup,
} from "https://deno.land/x/[email protected].3/mod.ts";
} from "https://deno.land/x/[email protected].5/mod.ts";
export { createError } from "https://deno.land/x/[email protected]/mod.ts";
export { Accepts } from "https://deno.land/x/[email protected]/mod.ts";
export {
Expand Down
2,274 changes: 2,273 additions & 1 deletion docs/assets/js/main.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ <h2>Table of Contents</h2>
<a href="#getting-started" id="getting-started" style="color: inherit; text-decoration: none;">
<h2>Getting Started</h2>
</a>
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/[email protected].2/mod.ts&quot;</span>;
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/[email protected].3/mod.ts&quot;</span>;

<span class="hljs-keyword">const</span> app = opine();

Expand All @@ -113,9 +113,9 @@ <h2>Installation</h2>
<p>This is a <a href="https://deno.land/">Deno</a> module available to import direct from this repo and via the <a href="https://deno.land/x">Deno Registry</a>.</p>
<p>Before importing, <a href="https://deno.land/#installation">download and install Deno</a>.</p>
<p>You can then import Opine straight into your project:</p>
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/[email protected].2/mod.ts&quot;</span>;</code></pre>
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://deno.land/x/[email protected].3/mod.ts&quot;</span>;</code></pre>
<p>Opine is also available on <a href="https://nest.land/package/opine">nest.land</a>, a package registry for Deno on the Blockchain.</p>
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://x.nest.land/[email protected].2/mod.ts&quot;</span>;</code></pre>
<pre><code class="language-ts"><span class="hljs-keyword">import</span> { opine } <span class="hljs-keyword">from</span> <span class="hljs-string">&quot;https://x.nest.land/[email protected].3/mod.ts&quot;</span>;</code></pre>
<a href="#features" id="features" style="color: inherit; text-decoration: none;">
<h2>Features</h2>
</a>
Expand Down
2 changes: 1 addition & 1 deletion egg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "opine",
"description": "Fast, minimalist web framework for Deno ported from ExpressJS.",
"version": "0.21.2",
"version": "0.21.3",
"repository": "https://github.com/asos-craigmorten/opine",
"stable": true,
"files": [
Expand Down
Loading

0 comments on commit 8ba3b17

Please sign in to comment.