Skip to content

Commit 8b78f4e

Browse files
committedAug 30, 2024··
simplify package.json
Signed-off-by: Kirill Mokevnin <[email protected]>
1 parent 42c4072 commit 8b78f4e

File tree

4 files changed

+143
-1455
lines changed

4 files changed

+143
-1455
lines changed
 

‎drizzle.config.js

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// @ts-check
2-
31
/** @type { import("drizzle-kit").Config } */
42
export default {
53
dialect: 'sqlite',

‎package-lock.json

+138-1,335
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+2-115
Original file line numberDiff line numberDiff line change
@@ -11,142 +11,29 @@
1111
"@fastify/autoload": "^5.10.0",
1212
"@fastify/jwt": "^8.0.1",
1313
"@fastify/sensible": "^5.6.0",
14-
"@fastify/swagger": "^8.15.0",
1514
"@fastify/type-provider-typebox": "^4.1.0",
1615
"@geut/openapi-box": "^5.0.6",
1716
"@typespec/compiler": "^0.59.1",
1817
"@vinejs/vine": "^2.1.0",
19-
"abort-controller": "^3.0.0",
20-
"abstract-logging": "^2.0.1",
21-
"ajv": "^8.17.1",
22-
"ajv-formats": "^3.0.1",
23-
"ansi-styles": "^6.2.1",
24-
"anymatch": "^3.1.3",
25-
"atomic-sleep": "^1.0.0",
26-
"avvio": "^8.4.0",
27-
"balanced-match": "^3.0.1",
28-
"base64-js": "^1.5.1",
2918
"better-sqlite3": "^11.2.1",
30-
"binary-extensions": "^3.0.0",
31-
"brace-expansion": "^4.0.0",
32-
"braces": "^3.0.3",
33-
"buffer": "^6.0.3",
34-
"chalk": "^5.3.0",
35-
"chokidar": "^3.6.0",
36-
"close-with-grace": "^2.1.0",
37-
"color-convert": "^2.0.1",
38-
"color-name": "^2.0.0",
39-
"colorette": "^2.0.20",
40-
"commist": "^3.2.0",
41-
"cookie": "^0.6.0",
42-
"dateformat": "^5.0.3",
43-
"dotenv": "^16.4.5",
4419
"drizzle-orm": "^0.33.0",
45-
"end-of-stream": "^1.4.4",
46-
"event-target-shim": "^6.0.2",
47-
"events": "^3.3.0",
48-
"fast-content-type-parse": "^2.0.0",
49-
"fast-copy": "^3.0.2",
50-
"fast-decode-uri-component": "^1.0.1",
51-
"fast-deep-equal": "^3.1.3",
52-
"fast-json-stringify": "^6.0.0",
53-
"fast-querystring": "^1.1.2",
54-
"fast-redact": "^3.5.0",
55-
"fast-safe-stringify": "^2.1.1",
56-
"fast-uri": "^3.0.1",
5720
"fastify": "^4.28.1",
5821
"fastify-cli": "^6.3.0",
5922
"fastify-plugin": "^4.5.1",
60-
"fastq": "^1.17.1",
61-
"fill-range": "^7.1.1",
62-
"find-my-way": "^8.2.0",
63-
"find-up": "^7.0.0",
64-
"forwarded": "^0.2.0",
65-
"fs.realpath": "^1.0.0",
66-
"generify": "^4.2.0",
67-
"glob": "^11.0.0",
68-
"glob-parent": "^6.0.2",
69-
"has-flag": "^5.0.1",
70-
"help-me": "^5.0.0",
71-
"ieee754": "^1.2.1",
72-
"inflight": "^1.0.6",
73-
"inherits": "^2.0.4",
74-
"ipaddr.js": "^2.2.0",
75-
"is-binary-path": "^3.0.0",
76-
"is-docker": "^3.0.0",
77-
"is-extglob": "^2.1.1",
78-
"is-glob": "^4.0.3",
79-
"is-number": "^7.0.0",
80-
"isbinaryfile": "^5.0.2",
81-
"joycon": "^3.1.1",
82-
"json-schema-ref-resolver": "^1.0.1",
83-
"json-schema-to-ts": "^3.1.0",
84-
"json-schema-traverse": "^1.0.0",
85-
"light-my-request": "^5.13.0",
86-
"locate-path": "^7.2.0",
8723
"lodash": "^4.17.21",
88-
"makeerror": "^1.0.12",
89-
"minimatch": "^10.0.1",
90-
"minimist": "^1.2.8",
91-
"normalize-path": "^3.0.0",
92-
"npm-check-updates": "^17.1.0",
93-
"on-exit-leak-free": "^2.1.2",
94-
"once": "^1.4.0",
95-
"p-limit": "^6.1.0",
96-
"p-locate": "^6.0.0",
97-
"p-try": "^3.0.0",
98-
"path-exists": "^5.0.0",
99-
"picomatch": "^4.0.2",
100-
"pino": "^9.3.2",
101-
"pino-abstract-transport": "^1.2.0",
102-
"pino-pretty": "^11.2.2",
103-
"pino-std-serializers": "^7.0.0",
104-
"pkg-up": "^5.0.0",
105-
"process": "^0.11.10",
106-
"process-warning": "^4.0.0",
107-
"proxy-addr": "^2.0.7",
108-
"pump": "^3.0.0",
109-
"quick-format-unescaped": "^4.0.4",
110-
"readable-stream": "^4.5.2",
111-
"readdirp": "^4.0.1",
112-
"real-require": "^0.2.0",
113-
"require-from-string": "^2.0.2",
114-
"resolve-from": "^5.0.0",
115-
"ret": "^0.5.0",
116-
"reusify": "^1.0.4",
117-
"rfdc": "^1.4.1",
118-
"safe-buffer": "^5.2.1",
119-
"safe-regex2": "^4.0.0",
120-
"safe-stable-stringify": "^2.5.0",
121-
"secure-json-parse": "^2.7.0",
122-
"semver": "^7.6.3",
123-
"set-cookie-parser": "^2.7.0",
124-
"sonic-boom": "^4.0.1",
125-
"split2": "^4.2.0",
126-
"string_decoder": "^1.3.0",
127-
"strip-json-comments": "^5.0.1",
128-
"supports-color": "^9.4.0",
129-
"thread-stream": "^3.1.0",
130-
"tmpl": "^1.0.5",
131-
"to-regex-range": "^5.0.1",
132-
"toad-cache": "^3.7.0",
133-
"util-deprecate": "^1.0.2",
134-
"walker": "^1.0.8",
135-
"wrappy": "^1.0.2",
136-
"yargs-parser": "^21.1.1"
24+
"npm-check-updates": "^17.1.0"
13725
},
13826
"devDependencies": {
13927
"@eslint/js": "^9.9.1",
14028
"@faker-js/faker": "^8.4.1",
141-
"@stylistic/eslint-plugin": "^2.6.4",
29+
"@stylistic/eslint-plugin": "^2.7.1",
14230
"@types/better-sqlite3": "^7.6.11",
14331
"@types/lodash": "^4.17.7",
14432
"@typespec/compiler": "latest",
14533
"@typespec/http": "latest",
14634
"@typespec/json-schema": "latest",
14735
"@typespec/openapi3": "latest",
14836
"@typespec/rest": "latest",
149-
"c8": "^10.1.2",
15037
"drizzle-kit": "^0.24.2",
15138
"eslint": "^9.9.1",
15239
"globals": "^15.9.0"

‎routes/api/users.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,13 @@ export default async function (fastify) {
7777
schema: schema['/users/{id}'].PATCH.args.properties,
7878
},
7979
async (request) => {
80-
const user = await db.update(schemas.users)
80+
const [user] = await db.update(schemas.users)
8181
.set(request.body)
8282
.where(eq(schemas.users.id, request.params.id))
8383
.returning()
8484
fastify.assert(user, 404)
8585

86-
return { id: request.params.id }
86+
return user
8787
},
8888
)
8989

@@ -94,7 +94,7 @@ export default async function (fastify) {
9494
schema: schema['/users/{id}'].DELETE.args.properties,
9595
},
9696
async (request, reply) => {
97-
const user = await db.delete(schemas.users)
97+
const [user] = await db.delete(schemas.users)
9898
.where(eq(schemas.users.id, request.params.id))
9999
.returning()
100100
fastify.assert(user, 404)

0 commit comments

Comments
 (0)
Please sign in to comment.