Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
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
3 changes: 3 additions & 0 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"@types/bcryptjs": "^2.4.6",
"@types/bun": "^1.2.10",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/multer": "^1.4.12",
"@types/node": "^20.17.10",
"@types/passport": "^1.0.17",
Expand All @@ -79,8 +80,10 @@
"@types/passport-local": "^1.0.38",
"@types/passport-oauth2": "^1.4.17",
"@types/supertest": "^2.0.16",
"jest": "^29.7.0",
"source-map-support": "^0.5.21",
"supertest": "^6.3.4",
"ts-jest": "^29.1.2",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tsc-watch": "^6.2.1",
Expand Down
5 changes: 2 additions & 3 deletions apps/backend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,12 @@
}
},
"include": [
"src/**/*.ts"
"src/**/*.ts",
"src/**/*.d.ts"
],
"exclude": [
"node_modules",
"dist",
"**/*.spec.ts",
"**/*.test.ts",
"e2e/**/*",
"test/**/*"
]
Expand Down
1 change: 1 addition & 0 deletions apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@hookform/resolvers": "^3.3.4",
"@mdx-js/loader": "^3.0.1",
"@mdx-js/react": "^3.0.1",
"@nbw/database": "workspace:*",
"@next/mdx": "^14.2.6",
"@next/third-parties": "^14.2.5",
"@radix-ui/react-dialog": "^1.0.5",
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/app/(content)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { FeaturedSongsDtoType, SongPreviewDtoType } from '@nbw/database';
import type { FeaturedSongsDtoType, SongPreviewDtoType } from '@nbw/database';
import { Metadata } from 'next';

import axiosInstance from '@web/lib/axios';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { zodResolver } from '@hookform/resolvers/zod';
import type { UploadSongDtoType } from '@nbw/database';
import { parseSongFromBuffer } from '@nbw/song';
import type { SongFileType } from '@nbw/song/src/types';
import type { SongFileType } from '@nbw/song';
import { useRouter } from 'next/navigation';
import { createContext, useCallback, useEffect, useState } from 'react';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { zodResolver } from '@hookform/resolvers/zod';
import { BG_COLORS, THUMBNAIL_CONSTANTS } from '@nbw/config';
import { parseSongFromBuffer } from '@nbw/song';
import { SongFileType } from '@nbw/song/src/types';
import type { SongFileType } from '@nbw/song';
import { createContext, useContext, useEffect, useState } from 'react';
import {
FieldErrors,
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"esnext"
],
"module": "esnext",
"moduleResolution": "node",
"moduleResolution": "bundler",
"jsx": "preserve",
"downlevelIteration": true,
"allowJs": true,
Expand Down
83 changes: 24 additions & 59 deletions bun.lock

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions packages/database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
"exports": {
".": {
"import": "./dist/index.js",
"types": "./dist/index.d.ts",
"development": "./src/index.ts"
"types": "./dist/index.d.ts"
},
"./types": {
"import": "./dist/song/dto/types.js",
"types": "./dist/song/dto/types.d.ts"
}
},
"scripts": {
Expand Down
3 changes: 2 additions & 1 deletion packages/database/tsconfig.build.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"outDir": "dist",
"allowImportingTsExtensions": false,
"verbatimModuleSyntax": false,
"moduleResolution": "node"
"moduleResolution": "node",
"module": "ESNext"
},
"include": [
"src/**/*"
Expand Down
1 change: 1 addition & 0 deletions packages/song/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
},
"devDependencies": {
"@types/bun": "latest",
"@types/unidecode": "^1.0.0",
"typescript": "^5"
},
"dependencies": {
Expand Down
11 changes: 5 additions & 6 deletions scripts/build.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { spawn } from 'bun';
import { $ } from 'bun';

// This is a list of how the packages can be built in order
// the sub array is for packages that can be built in parallel
const packages: (string | string[])[] = [
['@nbw/config', '@nbw/sounds', '@nbw/database'],
'@nbw/database', // Build database first to ensure types are available
['@nbw/config', '@nbw/sounds'],
'@nbw/song',
'@nbw/thumbnail',
];
Expand All @@ -12,13 +13,11 @@ async function buildPackages() {
for (const p of packages) {
if (Array.isArray(p)) {
// Build packages in parallel
const promises = p.map((pkg) =>
spawn(['bun', 'run', '--filter', pkg, 'build']),
);
const promises = p.map((pkg) => $`bun run --filter ${pkg} build`);
await Promise.all(promises);
} else {
// Build single package
await spawn(['bun', 'run', '--filter', p, 'build']);
await $`bun run --filter ${p} build`;
}
}
}
Expand Down
10 changes: 9 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"module": "nodenext",
// Root project specific overrides
"strictNullChecks": true,
"noImplicitAny": true,
"strictBindCallApply": true,
"strictPropertyInitialization": false
}
},
"exclude": [
"node_modules",
"**/dist/**/*",
"**/dist/**/*",
"**/*.js",
"**/*.mjs",
]
}
Loading