Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deno 2.7.9
61 changes: 61 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## General instructions

This guideline includes instructions on how to work with the tech stack employed
by this repo. If there's any diversion between this guideline and the public
tech stack documentation, then the public documentation prevails. Here are the
URLs to the public doc:

- Deno CLI: https://docs.deno.com/runtime/reference/cli/
- oak server framework: https://jsr.io/@oak/oak/doc
- asdf tool version management: https://asdf-vm.com/guide/getting-started.html

## Setup commands

- to install the latest deno runtime & cli version: `asdf install deno latest`
- to enforce a specific deno version for this project: change the value in the
file `.tool-versions` (as per asdf spec)
- to check for outdated dependencies: `deno outdated`
- to install latest dependencies: `deno update --latest`

## Code style

The IDE should have `deno fmt` configured as an on-file-saved auto-formatter.
Otherwise, make sure to always run `deno fmt` before commiting.

## Changelog

This project employs a CHANGELOG following 'keepachangelog.com' convention.
Dependency upgrades are recorded in the CHANGELOG under the 'Changed' section
(for every release note).

## Testing

Deno tasks available to run different types of tests:

- documentation syntax test: `deno task check-doc`
- unit test: `deno task test`
- end-to-end test: `deno task e2e-test`

## Library Publishing

This project is already set up with a CI/CD pipeline (GitHub Action) supporting
library publishing.

Follow the order below to publish a new `oak-routing-ctrl` library version:

- Ensure that all tests must pass (unit tests, end-to-end tests)
- Verify that you're on the release branch following the format `release/x.x.x`
with `x.x.x` being the release version (semver standard)
- the release version must match the most recent value found in `CHANGELOG.md`
- if unsure which release version to use, you must ask the user
- if the release branch is not yet created, create & switch to it
- Commit current code & create a release PR on GitHub
- the release commit always has this format:
`vx.x.x - see CHANGELOG for details`
- Once the PR is approved & merged to `master`, switch to `master`
- Run `deno publish --dry-run` to ensure everything is appropriate, e.g. the
value of the field `version` in `deno.jsonc` and the git tag, and the
corresponding release note in CHANGELOG.md, all must be consistent with one
another
- Create a new git tag on `master` branch following the format `vx.x.x`. This
will trigger the library publishing GitHub workflow
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
## [1.0.0] - 2026-03-30

### Fixed

- when client sends a request with `application/json` content-type header, but
the request body is empty, the handler no longer crashes (it 'sees' the
request body as an empty object instead)

### Changed

- upgraded dependencies: `npm:@asteasolutions/zod-to-openapi@^8.5.0`,
`jsr:@oak/oak@^17.2.0`, `jsr:@std/assert@^1.0.19`, `jsr:@std/io@^0.225.3`,
`jsr:@std/path@^1.1.4`, `jsr:@std/testing@^1.0.17`, `npm:zod@^4.3.6`,
`https://deno.land/x/superoak@5.0.0/mod.ts`

## [0.16.1] - 2025-11-27

### Added
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -480,11 +480,22 @@ https://jsr.io/@dklab/oak-routing-ctrl/doc

### Tests

#### Unit tests

```bash
deno test -A --coverage=cov_profile
deno coverage cov_profile
```

#### end-to-end tests

```bash
# manually cd into the e2e test directory & run the test
cd e2e_tests
deno test --allow-import --allow-env=DEBUG --allow-net=0.0.0.0,127.0.0.1
# or alternatively, simply run `deno task e2e-test` from the project root
```

[![test coverage](https://codecov.io/gh/Thesephi/oak-routing-ctrl/graphs/tree.svg?token=BA3M9P6410)](https://codecov.io/github/Thesephi/oak-routing-ctrl)

## FAQs
Expand Down
20 changes: 11 additions & 9 deletions deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dklab/oak-routing-ctrl",
"version": "0.16.1",
"version": "1.0.0",
"exports": {
".": "./mod.ts",
"./mod": "./mod.ts"
Expand All @@ -9,6 +9,7 @@
"exclude": [
"./test_utils",
"**/*_test.ts",
"./e2e_tests",
"./CONTRIBUTING.md",
"./GOVERNANCE.md"
]
Expand All @@ -17,17 +18,18 @@
"pretty": "deno lint --ignore=docs && deno check . && deno fmt",
"test": "deno test -RE -I=jspm.dev,jsr.io,deno.land -N=0.0.0.0,127.0.0.1",
"check-doc": "deno check -I=jspm.dev,jsr.io,deno.land --doc .",
"doc": "deno doc --html mod.ts"
"doc": "deno doc --html mod.ts",
"e2e-test": "cd e2e_tests && deno test --allow-import --allow-env=DEBUG --allow-net=0.0.0.0,127.0.0.1"
},
"imports": {
"@asteasolutions/zod-to-openapi": "npm:@asteasolutions/zod-to-openapi@^8.1.0",
"@asteasolutions/zod-to-openapi": "npm:@asteasolutions/zod-to-openapi@^8.5.0",
"@oak/oak": "jsr:@oak/oak@^17.2.0",
"@std/assert": "jsr:@std/assert@^1.0.16",
"@std/io": "jsr:@std/io@^0.225.2",
"@std/path": "jsr:@std/path@^1.1.3",
"@std/testing": "jsr:@std/testing@^1.0.16",
"zod": "npm:zod@^4.1.13",
"superoak": "https://deno.land/x/superoak@4.8.1/mod.ts"
"@std/assert": "jsr:@std/assert@^1.0.19",
"@std/io": "jsr:@std/io@^0.225.3",
"@std/path": "jsr:@std/path@^1.1.4",
"@std/testing": "jsr:@std/testing@^1.0.17",
"zod": "npm:zod@^4.3.6",
"superoak": "https://deno.land/x/superoak@5.0.0/mod.ts"
},
"fmt": {
"useTabs": false,
Expand Down
Loading
Loading