Skip to content

Commit ae5d7b8

Browse files
committed
fix: replace markdown-toc with remark-toc
`markdown-toc` appears somewhat abandoned, with a PR I raised to upgrade `remarkable` going unlooked at ~6 months. (ref: jonschlinkert/markdown-toc#199) replace it with `remark` / `remark-toc` to clear CVE warnings.
1 parent 84759e1 commit ae5d7b8

File tree

8 files changed

+933
-420
lines changed

8 files changed

+933
-420
lines changed

CONTRIBUTING.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ PR with a detailed description is fine too.
1313

1414
<!-- toc -->
1515

16-
- [Setup](#setup)
17-
- [Workflow](#workflow)
18-
- [Typescript Conventions](#typescript-conventions)
19-
- [Linting / Formatting](#linting--formatting)
20-
- [Testing](#testing)
21-
- [Publishing](#publishing)
16+
* [Setup](#setup)
17+
* [Workflow](#workflow)
18+
* [Typescript Conventions](#typescript-conventions)
19+
* [Linting / Formatting](#linting--formatting)
20+
* [Testing](#testing)
21+
* [Publishing](#publishing)
2222

2323
<!-- tocstop -->
2424

@@ -27,7 +27,7 @@ PR with a detailed description is fine too.
2727
1. Install a node version manager that respects `.nvmrc` files, such as
2828
[fnm](https://github.com/Schniz/fnm)
2929
2. Enable [corepack](https://nodejs.org/api/corepack.html) using `corepack
30-
enable`
30+
enable`
3131
3. Install `devDependencies` using `pnpm`
3232

3333
## Workflow
@@ -93,8 +93,8 @@ pnpm integration:generate && pnpm integration:validate
9393

9494
We have two types of testing in play:
9595

96-
- Unit tests using `jest`
97-
- Integration tests
96+
* Unit tests using `jest`
97+
* Integration tests
9898

9999
The unit testing is currently a bit on the "light" side - the project started
100100
as a fun experiment on a weekend and there is still some back filling to do.
@@ -104,11 +104,11 @@ There is also a heavy reliance on integration tests, where we use the openapi
104104
specifications for large API surfaces to run the code generation and check that
105105
the result builds, currently this includes:
106106

107-
- Github API
108-
- Stripe API
109-
- Okta API (partial)
110-
- Petstore API (from Swagger)
111-
- A Todo List API (written for this repo, showcases definitions split across
107+
* Github API
108+
* Stripe API
109+
* Okta API (partial)
110+
* Petstore API (from Swagger)
111+
* A Todo List API (written for this repo, showcases definitions split across
112112
multiple files)
113113

114114
At this stage we don't actually execute the code generated for these API's, but

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ With typescript templates for [koa](https://openapi-code-generator.nahkies.co.nz
1313

1414
The [fetch](https://openapi-code-generator.nahkies.co.nz/guides/client-templates/typescript-fetch) and [axios](https://openapi-code-generator.nahkies.co.nz/guides/client-templates/typescript-axios) templates work great in conjunction with [react-query](https://tanstack.com/query/latest)
1515

16-
> [!TIP]
16+
> \[!TIP]
1717
> Try out our [interactive playground here](https://openapi-code-generator.nahkies.co.nz/playground)
1818
1919
<!-- toc -->
2020

21-
- [Documentation](#documentation)
22-
- [Project Structure](#project-structure)
23-
- [Contributing](#contributing)
24-
- [License](#license)
21+
* [Documentation](#documentation)
22+
* [Project Structure](#project-structure)
23+
* [Contributing](#contributing)
24+
* [License](#license)
2525

2626
<!-- tocstop -->
2727

@@ -37,11 +37,11 @@ You can contribute to it in [./packages/documentation](./packages/documentation)
3737

3838
The repository is structured as a mono repo of several npm packages that work together under [./packages](./packages):
3939

40-
- [openapi-code-generator](./packages/openapi-code-generator)
41-
- [typescript-axios-runtime](./packages/typescript-axios-runtime)
42-
- [typescript-express-runtime](./packages/typescript-express-runtime)
43-
- [typescript-fetch-runtime](./packages/typescript-fetch-runtime)
44-
- [typescript-koa-runtime](./packages/typescript-koa-runtime)
40+
* [openapi-code-generator](./packages/openapi-code-generator)
41+
* [typescript-axios-runtime](./packages/typescript-axios-runtime)
42+
* [typescript-express-runtime](./packages/typescript-express-runtime)
43+
* [typescript-fetch-runtime](./packages/typescript-fetch-runtime)
44+
* [typescript-koa-runtime](./packages/typescript-koa-runtime)
4545

4646
The `openapi-code-generator` package is the main package, whilst the others are supporting packages used at runtime by
4747
the code output by some of the templates.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
},
1919
"scripts": {
2020
"clean": "pnpm -r clean",
21-
"docs:generate": "./scripts/generate-docs.sh",
21+
"docs:generate": "node ./scripts/generate-toc.mjs",
2222
"refresh": "./scripts/refresh-data.sh",
2323
"lint": "biome lint --fix .",
2424
"format": "biome check --write .",
@@ -58,8 +58,9 @@
5858
"json5": "^2.2.3",
5959
"lerna": "^8.2.3",
6060
"lint-staged": "^16.2.4",
61-
"markdown-toc": "^1.2.0",
6261
"prettier": "^3.6.2",
62+
"remark": "^15.0.1",
63+
"remark-toc": "^9.0.0",
6364
"typescript": "^5.9.3"
6465
},
6566
"workspaces": [

packages/documentation/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
# @nahkies/openapi-code-generator - documentation website
2+
23
The documentation website is built using [NextJS](https://nextjs.org/) / [Nextra](https://nextra.site/).
34

45
It's hosted at https://openapi-code-generator.nahkies.co.nz/ using GitHub pages.
56

67
<!-- toc -->
78

8-
- [Local development](#local-development)
9-
- [Testing production builds](#testing-production-builds)
9+
* [Local development](#local-development)
10+
* [Testing production builds](#testing-production-builds)
1011

1112
<!-- tocstop -->
1213

@@ -18,12 +19,13 @@ Run the development server with the `dev` script:
1819
pnpm dev
1920
```
2021

21-
Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
22+
Open <http://localhost:3000> with your browser to see the result.
2223

2324
### Testing production builds
2425

2526
Additional Requirements:
26-
- Docker
27+
28+
* Docker
2729

2830
You can test a production build locally by using the included script. It'll run
2931
a production build, and then serve it on port `8080` using the official `nginx` docker image

packages/openapi-code-generator/README.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
[![CI/CD](https://github.com/mnahkies/openapi-code-generator/actions/workflows/ci.yml/badge.svg)](https://github.com/mnahkies/openapi-code-generator/actions?query=branch%3Amain+event%3Apush)
44
[![npm](https://img.shields.io/npm/dm/%40nahkies%2Fopenapi-code-generator.svg)](https://www.npmjs.com/package/@nahkies/openapi-code-generator)
55

6-
76
`@nahkies/openapi-code-generator` is a CLI tool that aims to generate high quality typescript client SDK's,
87
and API server scaffolding (routing, validation, serialization) from OpenAPI 3 specifications.
98

@@ -12,10 +11,10 @@ and [TypeSpec](https://typespec.io/) are supported as input specifications.
1211

1312
<!-- toc -->
1413

15-
- [Documentation](#documentation)
16-
- [Changelog](#changelog)
17-
- [Stability](#stability)
18-
- [More information / contributing](#more-information--contributing)
14+
* [Documentation](#documentation)
15+
* [Changelog](#changelog)
16+
* [Stability](#stability)
17+
* [More information / contributing](#more-information--contributing)
1918

2019
<!-- tocstop -->
2120

0 commit comments

Comments
 (0)