Skip to content

Commit f7fd7f3

Browse files
authored
Release/0.12.2 (#38)
* v0.12.2 - see CHANGELOG for details * updated GitHub actions
1 parent bb1d0db commit f7fd7f3

File tree

8 files changed

+47
-19
lines changed

8 files changed

+47
-19
lines changed

.github/workflows/pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
- uses: actions/checkout@v4
1919

2020
- name: Setup Deno
21-
uses: denoland/setup-deno@v1
21+
uses: denoland/setup-deno@v2
2222
with:
23-
deno-version: v1.x
23+
deno-version: v2.x
2424

2525
- name: Verify formatting
2626
run: deno fmt --check
@@ -34,6 +34,6 @@ jobs:
3434
deno coverage cov_profile --lcov --output=cov_profile.lcov
3535
3636
- name: Upload coverage reports to Codecov
37-
uses: codecov/codecov-action@v4.0.1
37+
uses: codecov/codecov-action@v5
3838
with:
3939
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
- uses: actions/checkout@v4
1717

1818
- name: Setup Deno
19-
uses: denoland/setup-deno@v1
19+
uses: denoland/setup-deno@v2
2020
with:
21-
deno-version: v1.x
21+
deno-version: v2.x
2222

2323
- name: Verify formatting
2424
run: deno fmt --check

.github/workflows/runtime-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121
strategy:
2222
matrix:
23-
node-version: ["18.x", "20.x"]
23+
node-version: ["18.x", "20.x", "22.x"]
2424
steps:
2525
- name: Use Node.js ${{ matrix.node-version }}
2626
uses: actions/setup-node@v4
@@ -38,7 +38,7 @@ jobs:
3838
runs-on: ubuntu-latest
3939
strategy:
4040
matrix:
41-
node-version: ["18.x", "20.x"]
41+
node-version: ["18.x", "20.x", "22.x"]
4242
steps:
4343
- name: Use Node.js ${{ matrix.node-version }}
4444
uses: actions/setup-node@v4
@@ -57,9 +57,9 @@ jobs:
5757
steps:
5858
- uses: actions/setup-node@v4 # needed to call the scaffolding `npm create` command
5959
- name: Setup Deno
60-
uses: denoland/setup-deno@v1 # needed to perform the actual tests
60+
uses: denoland/setup-deno@v2 # needed to perform the actual tests
6161
with:
62-
deno-version: v1.x
62+
deno-version: v2.x
6363
- name: Scaffold App
6464
run: npm create oak-deno@latest -- -y
6565
- name: Perform Tests

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
## [0.12.2] - 2024-12-06
2+
3+
### Added
4+
5+
- `OakOpenApiSpec` and `useOak` are explicitly exported for consumption
6+
7+
### Changed
8+
9+
- README content update
10+
11+
### Fixed
12+
13+
- underscore character is now supported in OAS path param name
14+
115
## [0.12.1] - 2024-11-05
216

317
### Changed

README.md

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ Prerequisite:
5050

5151
### Example: Retrieving path parameters
5252

53-
```bash
54-
deno add @oak/oak @dklab/oak-routing-ctrl
55-
```
56-
5753
```ts
5854
// main.ts
5955

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

202198
### Node.js
203199

200+
If you're on Node.js 22 (or above), please consult this example boilerplate:
201+
https://replit.com/@0x97FB9/auto-swagger-node-alpha
202+
203+
If you're on Node.js 21 (or below), then the example workflow below may apply to
204+
you.
205+
206+
<details>
207+
<summary>View Example for Node.js 21 and below</summary>
208+
209+
_
210+
211+
You can start with a boilerplate
212+
204213
```bash
205214
npm create oak-nodejs-esbuild@latest
206215
```
207216

208-
<details>
209-
<summary>View Example</summary>
217+
_
218+
219+
Or you can start from scratch
220+
221+
<small>friendly note: if something doesn't work as advertised in this section,
222+
please file an issue, thanks!</small>
210223

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

214227
# note that `npx jsr i {package}` also works, but
215-
# installing directly from the `@jsr` scope may result
228+
# installing directly from the `@jsr` scope might result
216229
# in better dependency resolutions
217230
```
218231

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dklab/oak-routing-ctrl",
3-
"version": "0.12.1",
3+
"version": "0.12.2",
44
"exports": {
55
".": "./mod.ts",
66
"./mod": "./mod.ts"

mod.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
export { useOakServer } from "./src/useOakServer.ts";
2+
export { useOakServer as useOak } from "./src/useOakServer.ts";
23
export { useOas } from "./src/useOas.ts";
34
export { Controller } from "./src/Controller.ts";
45
export {
@@ -13,4 +14,4 @@ export { Delete } from "./src/Delete.ts";
1314
export { Options } from "./src/Options.ts";
1415
export { Head } from "./src/Head.ts";
1516

16-
export { z, type zInfer } from "./deps.ts";
17+
export { type OakOpenApiSpec, z, type zInfer } from "./deps.ts";

src/oasStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const getRouteId = (
1717
*/
1818
const getOasCompatPath = (path: string) =>
1919
path.replace(
20-
/\/:([a-zA-Z0-9]*)/g,
20+
/\/:([a-zA-Z0-9_]*)/g,
2121
"/{$1}",
2222
);
2323

0 commit comments

Comments
 (0)