Skip to content

Commit 085548a

Browse files
committed
fix: patch error
1 parent 580a71f commit 085548a

17 files changed

Lines changed: 383 additions & 359 deletions

.github/workflows/node.js.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
version: 10
1111
- uses: actions/setup-node@v4
1212
with:
13-
node-version: '22.x'
14-
cache: 'pnpm'
13+
node-version: "22.x"
14+
cache: "pnpm"
1515
- run: pnpm install
1616
- run: pnpm run typecheck
1717
- run: pnpm test

.github/workflows/npm-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
version: 10
1616
- uses: actions/setup-node@v4
1717
with:
18-
node-version: '22.x'
19-
registry-url: 'https://registry.npmjs.org'
18+
node-version: "22.x"
19+
registry-url: "https://registry.npmjs.org"
2020
- run: pnpm install
2121
- run: pnpm publish --provenance --access public
2222
env:

.oxfmtrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"semi": false,
3+
"singleQuote": true,
4+
}

.prettier.config.js

Lines changed: 0 additions & 5 deletions
This file was deleted.

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,15 @@ Create a `db.json` or `db.json5` file
4141
```json5
4242
{
4343
posts: [
44-
{ id: '1', title: 'a title', views: 100 },
45-
{ id: '2', title: 'another title', views: 200 },
44+
{ id: "1", title: "a title", views: 100 },
45+
{ id: "2", title: "another title", views: 200 },
4646
],
4747
comments: [
48-
{ id: '1', text: 'a comment about post 1', postId: '1' },
49-
{ id: '2', text: 'another comment about post 1', postId: '1' },
48+
{ id: "1", text: "a comment about post 1", postId: "1" },
49+
{ id: "2", text: "another comment about post 1", postId: "1" },
5050
],
5151
profile: {
52-
name: 'typicode',
52+
name: "typicode",
5353
},
5454
}
5555
```
@@ -81,30 +81,30 @@ Run `json-server --help` for a list of options
8181

8282
### Gold
8383

84-
||
85-
| :---: |
86-
| <a href="https://mockend.com/" target="_blank"><img src="https://jsonplaceholder.typicode.com/mockend.svg" height="100px"></a> |
84+
| |
85+
| :--------------------------------------------------------------------------------------------------------------------------------------------------------: |
86+
| <a href="https://mockend.com/" target="_blank"><img src="https://jsonplaceholder.typicode.com/mockend.svg" height="100px"></a> |
8787
| <a href="https://zuplo.link/json-server-gh"><img src="https://github.com/user-attachments/assets/adfee31f-a8b6-4684-9a9b-af4f03ac5b75" height="100px"></a> |
88-
| <a href="https://www.mintlify.com/"><img src="https://github.com/user-attachments/assets/bcc8cc48-b2d9-4577-8939-1eb4196b7cc5" height="100px"></a> |
88+
| <a href="https://www.mintlify.com/"><img src="https://github.com/user-attachments/assets/bcc8cc48-b2d9-4577-8939-1eb4196b7cc5" height="100px"></a> |
8989

9090
### Silver
9191

92-
||
93-
| :---: |
92+
| |
93+
| :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
9494
| <a href="https://requestly.com?utm_source=githubsponsor&utm_medium=jsonserver&utm_campaign=jsonserver"><img src="https://github.com/user-attachments/assets/f7e7b3cf-97e2-46b8-81c8-cb3992662a1c" style="height:70px; width:auto;"></a> |
9595

9696
### Bronze
9797

98-
|||
99-
| :---: | :---: |
98+
| | |
99+
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
100100
| <a href="https://www.storyblok.com/" target="_blank"><img src="https://github.com/typicode/json-server/assets/5502029/c6b10674-4ada-4616-91b8-59d30046b45a" height="35px"></a> | <a href="https://betterstack.com/" target="_blank"><img src="https://github.com/typicode/json-server/assets/5502029/44679f8f-9671-470d-b77e-26d90b90cbdc" height="35px"></a> |
101101

102102
[Become a sponsor and have your company logo here](https://github.com/users/typicode/sponsorship)
103103

104104
## Sponsorware
105105

106106
> [!NOTE]
107-
> This project uses the [Fair Source License](https://fair.io/). Only organizations with 3+ users are kindly asked to contribute a small amount through sponsorship [sponsor](https://github.com/sponsors/typicode) for usage. __This license helps keep the project sustainable and healthy, benefiting everyone.__
107+
> This project uses the [Fair Source License](https://fair.io/). Only organizations with 3+ users are kindly asked to contribute a small amount through sponsorship [sponsor](https://github.com/sponsors/typicode) for usage. **This license helps keep the project sustainable and healthy, benefiting everyone.**
108108
>
109109
> For more information, FAQs, and the rationale behind this, visit [https://fair.io/](https://fair.io/).
110110

fixtures/db.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
"profile": {
1111
"name": "typicode"
1212
}
13-
}
13+
}

fixtures/db.json5

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
{
22
posts: [
33
{
4-
id: '1',
5-
title: 'a title',
4+
id: "1",
5+
title: "a title",
66
},
77
{
8-
id: '2',
9-
title: 'another title',
8+
id: "2",
9+
title: "another title",
1010
},
1111
],
1212
comments: [
1313
{
14-
id: '1',
15-
text: 'a comment about post 1',
16-
postId: '1',
14+
id: "1",
15+
text: "a comment about post 1",
16+
postId: "1",
1717
},
1818
{
19-
id: '2',
20-
text: 'another comment about post 1',
21-
postId: '1',
19+
id: "2",
20+
text: "another comment about post 1",
21+
postId: "1",
2222
},
2323
],
2424
profile: {
25-
name: 'typicode',
25+
name: "typicode",
2626
},
27-
}
27+
}

package.json

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,32 @@
22
"name": "json-server",
33
"version": "1.0.0-beta.3",
44
"description": "",
5-
"type": "module",
5+
"keywords": [],
6+
"license": "SEE LICENSE IN ./LICENSE",
7+
"author": "typicode <typicode@gmail.com>",
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/typicode/json-server.git"
11+
},
612
"bin": {
713
"json-server": "lib/bin.js"
814
},
915
"files": [
1016
"lib",
1117
"views"
1218
],
13-
"engines": {
14-
"node": ">=22.12.0"
15-
},
19+
"type": "module",
1620
"scripts": {
1721
"dev": "node --watch --experimental-strip-types src/bin.ts fixtures/db.json",
1822
"build": "rm -rf lib && tsc",
1923
"prepublishOnly": "rm -rf lib && tsc",
2024
"typecheck": "tsc --noEmit",
2125
"test": "node --experimental-strip-types --test src/*.test.ts",
2226
"lint": "oxlint src",
27+
"fmt": "oxfmt",
28+
"fmt:check": "oxfmt --check",
2329
"prepare": "husky"
2430
},
25-
"keywords": [],
26-
"author": "typicode <typicode@gmail.com>",
27-
"license": "SEE LICENSE IN ./LICENSE",
28-
"repository": {
29-
"type": "git",
30-
"url": "git+https://github.com/typicode/json-server.git"
31-
},
32-
"devDependencies": {
33-
"@types/node": "^25.0.8",
34-
"concurrently": "^9.2.1",
35-
"get-port": "^7.1.0",
36-
"husky": "^9.1.7",
37-
"oxlint": "^1.39.0",
38-
"tempy": "^3.1.0",
39-
"type-fest": "^5.4.0",
40-
"typescript": "^5.9.3"
41-
},
4231
"dependencies": {
4332
"@tinyhttp/app": "^3.0.1",
4433
"@tinyhttp/cors": "^2.0.1",
@@ -53,5 +42,19 @@
5342
"milliparsec": "^5.1.0",
5443
"sirv": "^3.0.2",
5544
"sort-on": "^7.0.0"
45+
},
46+
"devDependencies": {
47+
"@types/node": "^25.0.8",
48+
"concurrently": "^9.2.1",
49+
"get-port": "^7.1.0",
50+
"husky": "^9.1.7",
51+
"oxfmt": "^0.24.0",
52+
"oxlint": "^1.39.0",
53+
"tempy": "^3.1.0",
54+
"type-fest": "^5.4.0",
55+
"typescript": "^5.9.3"
56+
},
57+
"engines": {
58+
"node": ">=22.12.0"
5659
}
5760
}

pnpm-lock.yaml

Lines changed: 95 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/test.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<!-- Testing automatic serving of files from the 'public/' directory -->
1+
<!-- Testing automatic serving of files from the 'public/' directory -->

0 commit comments

Comments
 (0)