Skip to content

Commit

Permalink
Release/0.12.2 (#38)
Browse files Browse the repository at this point in the history
* v0.12.2 - see CHANGELOG for details

* updated GitHub actions
  • Loading branch information
Thesephi authored Dec 6, 2024
1 parent bb1d0db commit f7fd7f3
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 19 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Verify formatting
run: deno fmt --check
Expand All @@ -34,6 +34,6 @@ jobs:
deno coverage cov_profile --lcov --output=cov_profile.lcov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ jobs:
- uses: actions/checkout@v4

- name: Setup Deno
uses: denoland/setup-deno@v1
uses: denoland/setup-deno@v2
with:
deno-version: v1.x
deno-version: v2.x

- name: Verify formatting
run: deno fmt --check
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/runtime-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["18.x", "20.x"]
node-version: ["18.x", "20.x", "22.x"]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand All @@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ["18.x", "20.x"]
node-version: ["18.x", "20.x", "22.x"]
steps:
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
Expand All @@ -57,9 +57,9 @@ jobs:
steps:
- uses: actions/setup-node@v4 # needed to call the scaffolding `npm create` command
- name: Setup Deno
uses: denoland/setup-deno@v1 # needed to perform the actual tests
uses: denoland/setup-deno@v2 # needed to perform the actual tests
with:
deno-version: v1.x
deno-version: v2.x
- name: Scaffold App
run: npm create oak-deno@latest -- -y
- name: Perform Tests
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
## [0.12.2] - 2024-12-06

### Added

- `OakOpenApiSpec` and `useOak` are explicitly exported for consumption

### Changed

- README content update

### Fixed

- underscore character is now supported in OAS path param name

## [0.12.1] - 2024-11-05

### Changed
Expand Down
27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ Prerequisite:

### Example: Retrieving path parameters

```bash
deno add @oak/oak @dklab/oak-routing-ctrl
```

```ts
// main.ts

Expand Down Expand Up @@ -201,18 +197,35 @@ curl -H"x-foo: lorem" localhost:1993/foo/bar

### Node.js

If you're on Node.js 22 (or above), please consult this example boilerplate:
https://replit.com/@0x97FB9/auto-swagger-node-alpha

If you're on Node.js 21 (or below), then the example workflow below may apply to
you.

<details>
<summary>View Example for Node.js 21 and below</summary>

_

You can start with a boilerplate

```bash
npm create oak-nodejs-esbuild@latest
```

<details>
<summary>View Example</summary>
_

Or you can start from scratch

<small>friendly note: if something doesn't work as advertised in this section,
please file an issue, thanks!</small>

```bash
npm i @jsr/oak__oak @jsr/dklab__oak-routing-ctrl

# note that `npx jsr i {package}` also works, but
# installing directly from the `@jsr` scope may result
# installing directly from the `@jsr` scope might result
# in better dependency resolutions
```

Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dklab/oak-routing-ctrl",
"version": "0.12.1",
"version": "0.12.2",
"exports": {
".": "./mod.ts",
"./mod": "./mod.ts"
Expand Down
3 changes: 2 additions & 1 deletion mod.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export { useOakServer } from "./src/useOakServer.ts";
export { useOakServer as useOak } from "./src/useOakServer.ts";
export { useOas } from "./src/useOas.ts";
export { Controller } from "./src/Controller.ts";
export {
Expand All @@ -13,4 +14,4 @@ export { Delete } from "./src/Delete.ts";
export { Options } from "./src/Options.ts";
export { Head } from "./src/Head.ts";

export { z, type zInfer } from "./deps.ts";
export { type OakOpenApiSpec, z, type zInfer } from "./deps.ts";
2 changes: 1 addition & 1 deletion src/oasStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const getRouteId = (
*/
const getOasCompatPath = (path: string) =>
path.replace(
/\/:([a-zA-Z0-9]*)/g,
/\/:([a-zA-Z0-9_]*)/g,
"/{$1}",
);

Expand Down

0 comments on commit f7fd7f3

Please sign in to comment.