Skip to content

Commit

Permalink
[NO-ISSUE] master -> main (#9)
Browse files Browse the repository at this point in the history
* feat: master -> main
  • Loading branch information
asos-craigmorten authored Jun 16, 2020
1 parent 40cda3b commit 4a35279
Show file tree
Hide file tree
Showing 85 changed files with 627 additions and 623 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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/mod.ts";

const app = opine();

Expand Down Expand Up @@ -57,7 +57,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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/mod.ts";

const app = opine(); // the main app
const admin = opine(); // the sub app
Expand Down Expand Up @@ -429,7 +429,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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/mod.ts";

const app = opine();

Expand Down Expand Up @@ -459,7 +459,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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/mod.ts";

const app = opine();
const PORT = 3000;
Expand All @@ -472,7 +472,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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/mod.ts";

const app = opine();

Expand All @@ -484,7 +484,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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/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/opine@master/mod.ts";
import { opine, json } from "https://deno.land/x/opine@main/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/opine@master/mod.ts";
import { opine, raw } from "https://deno.land/x/opine@main/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/opine@master/mod.ts";
import { opine, text } from "https://deno.land/x/opine@main/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/opine@master/mod.ts";
import { opine, urlencoded } from "https://deno.land/x/opine@main/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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/mod.ts";

const app = opine();
```

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

```ts
import { opine } from "https://deno.land/x/opine@master/mod.ts";
import { opine } from "https://deno.land/x/opine@main/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/opine@master/mod.ts";
} from "https://deno.land/x/opine@main/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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/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/opine@master/mod.ts";
import { Router } from "https://deno.land/x/opine@main/mod.ts";

const router = Router(options);
```
Expand Down Expand Up @@ -149,7 +149,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/opine@master/mod.ts";
import opine, { Router } from "https://deno.land/x/opine@main/mod.ts";

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

## [0.10.0] - 16-06-2020

- feat: move to "main" branch

## [0.9.0] - 16-06-2020

- fix: lockfile dependencies.
Expand Down
6 changes: 3 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ Be sure to check for existing issues before raising your own!

### Branching

On this project we follow mainline development (or trunk based development), and our default branch is `master`.
On this project we follow mainline development (or trunk based development), and our default branch is `main`.

Therefore you need to branch from `master` and merge into `master`.
Therefore you need to branch from `main` and merge into `main`.

We use the following convention for branch names `feat/issue-#-short-description`, where the the `#` should be replaced with the GitHub issue number, and the short description should provide an idea of what the branch is for.

Expand Down Expand Up @@ -93,7 +93,7 @@ make test

## Opening a PR

Once you're confident your branch is ready to review, open a PR against `master` on this repo.
Once you're confident your branch is ready to review, open a PR against `main` on this repo.

Please make sure you fill the PR template correctly.

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]

jobs:
benchmark:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test

on:
push:
branches: [master]
branches: [main]
pull_request:
branches: [master]
branches: [main]

jobs:
build:
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Fast, minimalist web framework for [Deno](https://deno.land/) ported from [Expre
![](https://img.shields.io/github/stars/asos-craigmorten/opine) ![](https://img.shields.io/github/forks/asos-craigmorten/opine) ![](https://img.shields.io/github/license/asos-craigmorten/opine) [![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/asos-craigmorten/opine/graphs/commit-activity) [![HitCount](http://hits.dwyl.com/asos-craigmorten/opine.svg)](http://hits.dwyl.com/asos-craigmorten/opine)

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

const app = opine();

Expand All @@ -26,7 +26,7 @@ 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/opine@master/mod.ts";
import opine from "https://deno.land/x/opine@main/mod.ts";
```

If you want to use a specific version of Opine, just modify the import url to contain the version:
Expand All @@ -52,13 +52,13 @@ And more to come as we achieve feature parity with [ExpressJS](https://github.co

## Docs

- [Opine Docs](https://github.com/asos-craigmorten/opine/blob/master/.github/API/api.md) - usually the best place when getting started ✨
- [Opine Docs](https://github.com/asos-craigmorten/opine/blob/main/.github/API/api.md) - usually the best place when getting started ✨
- [Opine Type Docs](https://asos-craigmorten.github.io/opine/)
- [Opine Deno Docs](https://doc.deno.land/https/deno.land/x/opine/mod.ts)
- [ExpressJS API Docs](https://expressjs.com/en/4x/api.html)
- [License](https://github.com/asos-craigmorten/opine/blob/master/LICENSE.md)
- [ExpressJS License](https://github.com/asos-craigmorten/opine/blob/master/EXPRESS_LICENSE.md)
- [Changelog](https://github.com/asos-craigmorten/opine/blob/master/.github/CHANGELOG.md)
- [License](https://github.com/asos-craigmorten/opine/blob/main/LICENSE.md)
- [ExpressJS License](https://github.com/asos-craigmorten/opine/blob/main/EXPRESS_LICENSE.md)
- [Changelog](https://github.com/asos-craigmorten/opine/blob/main/.github/CHANGELOG.md)

## Philosophy

Expand All @@ -75,7 +75,7 @@ To run the [examples](./examples), you have two choices:
1. Run the example using Deno directly from GitHub, for example:

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

1. Clone the Opine repo locally:
Expand All @@ -95,7 +95,7 @@ All the [examples](./examples) contain example commands in their READMEs to help

## Contributing

[Contributing guide](https://github.com/asos-craigmorten/opine/blob/master/.github/CONTRIBUTING.md)
[Contributing guide](https://github.com/asos-craigmorten/opine/blob/main/.github/CONTRIBUTING.md)

---

Expand Down
Loading

0 comments on commit 4a35279

Please sign in to comment.