Skip to content

Commit

Permalink
[NO-ISSUE] fix for v1.0.2 (#2)
Browse files Browse the repository at this point in the history
* feat: fix for v1.0.1 and v1.0.2
* feat: drop support for Deno v1.0.1
* chore: small gh-pages update
* feat: make mention of versions in the README
* feat: boyscout further readme instructions on installing Opine versions and running examples
* feat: tighten permissions in example instructions and add READMEs
  • Loading branch information
asos-craigmorten committed May 25, 2020
1 parent c21f8d6 commit 54ceed5
Show file tree
Hide file tree
Showing 63 changed files with 654 additions and 497 deletions.
8 changes: 8 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ChangeLog

## [0.3.0] - 25-05-2020

### Updated

- `evt@1.6.8` -> `evt@1.7.9` to pull in bug fixes for Deno `>=1.0.2`.
- Moved from `DENO_SUPPORTED_VERSION` to `DENO_SUPPORTED_VERSIONS`
- Added support for `v1.0.2` to CI workflow (`v1.0.1` not supported due to breaking error in Deno).

## [0.2.0] - 23-05-2020

### Added
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
deno-version: [1.0.0]
deno-version: [1.0.0, 1.0.2]

steps:
- uses: actions/checkout@v2
Expand Down
56 changes: 42 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,35 @@ This is a [Deno](https://deno.land/) module available to import direct from this

Before importing, [download and install Deno](https://deno.land/#installation).

> Please refer to the [version file](./version.ts) for a list of Deno versions supported by Opine.
>
> Once Deno is installed, you can easily switch between Deno versions using the `upgrade` command:
>
> ```bash
> # Upgrade to latest version:
> deno upgrade
>
> # Upgrade to a specific version, replace `<version>` with the version you want (e.g. `1.0.0`):
> deno upgrade --version <version>
> ```
You can then import Opine straight into your project:
```ts
import opine from "https://deno.land/x/opine@master/mod.ts";
```
> **Note:** Opine currently only supports Deno v1.0.0 due to some breaking typescript changes introduced in Deno v1.0.1 ([#5704](https://github.com/denoland/deno/issues/5704)). Fixes will be implemented soon, but in the meantime you can set the version of Deno (once installed) using the `upgrade` command:
>
> ```bash
> deno upgrade --version 1.0.0
> ```
If you want to use a specific version of Opine, just modify the import url to contain the version:

```ts
import opine from "https://deno.land/x/opine@0.3.0/mod.ts";
```

Or if you want to use a specific commit of Opine, just modify the import url to contain the commit hash:

```ts
import opine from "https://deno.land/x/opine@c21f8d6/mod.ts";
```

## Features

Expand Down Expand Up @@ -62,18 +80,28 @@ As time passes, Opine's goals may naturally diverge from [ExpressJS](https://git

## Examples

To view the examples, clone the Opine repo:
To run the [examples](./examples), you have two choices:

```bash
git clone git://github.com/asos-craigmorten/opine.git --depth 1
cd opine
```
1. Run the example using Deno directly from GitHub, for example:

Then run whichever example you want:
```bash
deno run --allow-net --allow-read https://raw.githubusercontent.com/asos-craigmorten/opine/master/examples/hello-world/index.ts
```

```bash
deno --allow-net --allow-read ./example/hello-world/index.ts
```
1. Clone the Opine repo locally:

```bash
git clone git://github.com/asos-craigmorten/opine.git --depth 1
cd opine
```

Then run the example you want:

```bash
deno --allow-net --allow-read ./example/hello-world/index.ts
```

All the [examples](./examples) contain example commands in their READMEs to help get you started for either of the above methods.

## Contributing

Expand Down
2 changes: 1 addition & 1 deletion deps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export { encoder } from "https://deno.land/std@0.52.0/encoding/utf8.ts";
export {
Evt as EventEmitter,
to as getEvent,
} from "https://deno.land/x/evt@v1.6.8/mod.ts";
} from "https://deno.land/x/evt@1.7.9/mod.ts";
export {
contentType,
charset,
Expand Down
2 changes: 2 additions & 0 deletions docs/_config.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
future: true
encoding: "UTF-8"
include:
- "_*_.html"
- "_*_.*.html"
50 changes: 25 additions & 25 deletions docs/classes/_response_.response.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h3>app</h3>
<div class="tsd-signature tsd-kind-icon">app<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_types_.application.html" class="tsd-signature-type">Application</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L32">response.ts:32</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L32">response.ts:32</a></li>
</ul>
</aside>
</section>
Expand All @@ -148,7 +148,7 @@ <h3>body</h3>
<div class="tsd-signature tsd-kind-icon">body<span class="tsd-signature-symbol">:</span> <a href="../modules/_types_.html#denoresponsebody" class="tsd-signature-type">DenoResponseBody</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L31">response.ts:31</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L31">response.ts:31</a></li>
</ul>
</aside>
</section>
Expand All @@ -158,7 +158,7 @@ <h3>headers</h3>
<div class="tsd-signature tsd-kind-icon">headers<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Headers</span><span class="tsd-signature-symbol"> = new Headers()</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L30">response.ts:30</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L30">response.ts:30</a></li>
</ul>
</aside>
</section>
Expand All @@ -168,7 +168,7 @@ <h3>locals</h3>
<div class="tsd-signature tsd-kind-icon">locals<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L34">response.ts:34</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L34">response.ts:34</a></li>
</ul>
</aside>
</section>
Expand All @@ -178,7 +178,7 @@ <h3>req</h3>
<div class="tsd-signature tsd-kind-icon">req<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_types_.request.html" class="tsd-signature-type">Request</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L33">response.ts:33</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L33">response.ts:33</a></li>
</ul>
</aside>
</section>
Expand All @@ -188,7 +188,7 @@ <h3>status</h3>
<div class="tsd-signature tsd-kind-icon">status<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Status</span><span class="tsd-signature-symbol"> = 200</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L29">response.ts:29</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L29">response.ts:29</a></li>
</ul>
</aside>
</section>
Expand All @@ -205,7 +205,7 @@ <h3>append</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L49">response.ts:49</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L49">response.ts:49</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -240,7 +240,7 @@ <h3>attachment</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L62">response.ts:62</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L62">response.ts:62</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -269,7 +269,7 @@ <h3>clear<wbr>Cookie</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L101">response.ts:101</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L101">response.ts:101</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -298,7 +298,7 @@ <h3>cookie</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L84">response.ts:84</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L84">response.ts:84</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -330,7 +330,7 @@ <h3>download</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L124">response.ts:124</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L124">response.ts:124</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -366,7 +366,7 @@ <h3>end</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L149">response.ts:149</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L149">response.ts:149</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -394,7 +394,7 @@ <h3>etag</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L166">response.ts:166</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L166">response.ts:166</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -427,7 +427,7 @@ <h3>get</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L189">response.ts:189</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L189">response.ts:189</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -456,7 +456,7 @@ <h3>json</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L205">response.ts:205</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L205">response.ts:205</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -488,7 +488,7 @@ <h3>jsonp</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L231">response.ts:231</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L231">response.ts:231</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -520,7 +520,7 @@ <h3>links</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L281">response.ts:281</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L281">response.ts:281</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -554,7 +554,7 @@ <h3>location</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L311">response.ts:311</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L311">response.ts:311</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -589,7 +589,7 @@ <h3>send</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L334">response.ts:334</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L334">response.ts:334</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -621,7 +621,7 @@ <h3>send<wbr>File</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L401">response.ts:401</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L401">response.ts:401</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -650,7 +650,7 @@ <h3>send<wbr>Status</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L442">response.ts:442</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L442">response.ts:442</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -684,7 +684,7 @@ <h3>set</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L464">response.ts:464</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L464">response.ts:464</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -719,7 +719,7 @@ <h3>set<wbr>Status</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L486">response.ts:486</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L486">response.ts:486</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -750,7 +750,7 @@ <h3>type</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L507">response.ts:507</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L507">response.ts:507</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down Expand Up @@ -785,7 +785,7 @@ <h3>unset</h3>
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/de26da5/src/response.ts#L520">response.ts:520</a></li>
<li>Defined in <a href="https://github.com/asos-craigmorten/opine/blob/19196ab/src/response.ts#L520">response.ts:520</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ <h1></h1>
<h1>opine</h1>
</a>
<p>Fast, minimalist web framework for <a href="https://deno.land/">Deno</a> ported from <a href="https://github.com/expressjs/express">ExpressJS</a>.</p>
<p><a href="https://doc.deno.land/https/deno.land/x/opine/mod.ts"><img src="https://doc.deno.land/badge.svg" alt="deno doc"></a></p>
<p><img src="https://github.com/asos-craigmorten/opine/workflows/Test/badge.svg" alt="Test"> <a href="https://doc.deno.land/https/deno.land/x/opine/mod.ts"><img src="https://doc.deno.land/badge.svg" alt="deno doc"></a></p>
<pre><code class="language-ts"><span class="hljs-keyword">import</span> opine <span class="hljs-keyword">from</span> <span class="hljs-string">"https://deno.land/x/opine@master/mod.ts"</span>;

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

0 comments on commit 54ceed5

Please sign in to comment.