Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@
"bundlemon-markdown-output": "^2.0.1",
"bundlemon-utils": "^2.0.1",
"env-var": "^7.3.1",
"fastify": "^5.5.0",
"fastify": "^5.12.5",
"mongodb": "^6.18.0"
},
"devDependencies": {
"@types/sodium-native": "^2.3.9",
"dotenv": "^16.3.1",
"ts-json-schema-generator": "^1.3.0",
"typescript": "^5.1.6",
"vercel": "^31.4.0"
"vercel": "^62.1.0"
}
}
4 changes: 2 additions & 2 deletions apps/service/src/app.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fs from 'node:fs';
import path from 'node:path';
import { randomBytes } from 'node:crypto';
import fastify, { FastifyInstance } from 'fastify';
import fastify, { FastifyError, FastifyInstance } from 'fastify';
import pino from 'pino';
import fastifyStatic from '@fastify/static';
import cors, { FastifyCorsOptions } from '@fastify/cors';
Expand Down Expand Up @@ -138,7 +138,7 @@ async function init({ isServerless }: InitParams) {
} as SecureSessionPluginOptions);
app.register(routes);

app.setErrorHandler((error, req, res) => {
app.setErrorHandler((error: FastifyError, req, res) => {
// check if we have a validation error
if (error.validation) {
return res.status(400).send({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Compression, CommitRecord } from 'bundlemon-utils';
import { createTestApp } from '@tests/app';
import { createTestProjectWithApiKey } from '@tests/projectUtils';
import { generateRandomString } from '@tests/utils';
import { createCommitRecord } from '@/framework/mongo/commitRecords';
import { createCommitRecord } from '@tests/commitRecordUtils';
import { FastifyInstance } from 'fastify';

describe('get commit records', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { createTestApp } from '@tests/app';
import { Compression, BaseCommitRecordResponse } from 'bundlemon-utils';
import { createTestProjectWithApiKey } from '@tests/projectUtils';
import { generateRandomString } from '@tests/utils';
import { createCommitRecord } from '@/framework/mongo/commitRecords';
import { createCommitRecord } from '@tests/commitRecordUtils';
import { BaseRecordCompareTo } from '@/consts/commitRecords';
import { FastifyInstance } from 'fastify';

Expand Down
13 changes: 13 additions & 0 deletions apps/service/tests/commitRecordUtils.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { createCommitRecord as createCommitRecordInDB } from '@/framework/mongo/commitRecords';

/**
* Creates a commit record and waits until the next millisecond,
* so records created one after another always have a distinct `creationDate` (tests rely on the order).
*/
export const createCommitRecord: typeof createCommitRecordInDB = async (...args) => {
const record = await createCommitRecordInDB(...args);

await new Promise((resolve) => setTimeout(resolve, 2));

return record;
};
2 changes: 1 addition & 1 deletion apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"eslint-plugin-react": "^7.33.2",
"eslint-plugin-react-hooks": "^4.6.0",
"netlify-cli": "^21.6.0",
"vite": "^5.4.21",
"vite": "^8.3.2",
"vite-bundle-analyzer": "^0.17.0",
"vite-tsconfig-paths": "^4.3.2"
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"@typescript-eslint/eslint-plugin": "^6.4.0",
"@typescript-eslint/parser": "^6.4.0",
"@vitejs/plugin-react": "^4.3.4",
"esbuild": "^0.27.0",
"esbuild": "^0.27.1",
"eslint": "^8.47.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-import": "2.27.5",
Expand Down
2,752 changes: 2,005 additions & 747 deletions yarn.lock

Large diffs are not rendered by default.

Loading