Skip to content

Commit

Permalink
fix: Issue with workspaces when vitnode using npm
Browse files Browse the repository at this point in the history
  • Loading branch information
aXenDeveloper committed Dec 2, 2024
1 parent 663d4ac commit cd7e01e
Show file tree
Hide file tree
Showing 27 changed files with 354 additions and 494 deletions.
8 changes: 4 additions & 4 deletions apps/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
"db": "vitnode-backend db"
},
"dependencies": {
"@nestjs/common": "^10.4.11",
"@nestjs/core": "^10.4.11",
"@nestjs/platform-express": "^10.4.11",
"@nestjs/common": "^10.4.12",
"@nestjs/core": "^10.4.12",
"@nestjs/platform-express": "^10.4.12",
"@nestjs/schedule": "^4.1.1",
"@nestjs/throttler": "^6.2.1",
"@react-email/components": "^0.0.28",
Expand All @@ -35,7 +35,7 @@
"devDependencies": {
"@nestjs/cli": "^10.4.8",
"@nestjs/schematics": "^10.2.3",
"@swc/cli": "^0.5.1",
"@swc/cli": "^0.5.2",
"@types/express": "^5.0.0",
"@types/node": "^22.10.1",
"@types/react": "^18.3.12",
Expand Down
2 changes: 1 addition & 1 deletion apps/shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
},
"dependencies": {
"@nestjs/common": "^10.4.11",
"@nestjs/common": "^10.4.12",
"@nestjs/swagger": "^8.0.7"
},
"devDependencies": {
Expand Down
3 changes: 1 addition & 2 deletions packages/backend-ai-google/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
/.turbo
/node_modules
/eslint.config.mjs
/tsconfig.json
/.swcrc
/tsconfig.json
20 changes: 0 additions & 20 deletions packages/backend-ai-google/.swcrc

This file was deleted.

9 changes: 3 additions & 6 deletions packages/backend-ai-google/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"directory": "packages/backend-ai-google"
},
"scripts": {
"build:packages": "tsc && swc src -d dist --config-file .swcrc",
"dev:packages": "concurrently \"tsc -w --preserveWatchOutput\" \"swc src -d dist --config-file .swcrc -w\"",
"build:packages": "tsc",
"dev:packages": "tsc -w",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
Expand All @@ -26,11 +26,8 @@
"gemini"
],
"devDependencies": {
"@swc/cli": "^0.5.1",
"@swc/core": "^1.9.3",
"@types/node": "^22.10.1",
"ai": "^4.0.8",
"concurrently": "^9.1.0",
"ai": "^4.0.10",
"eslint-config-typescript-vitnode": "workspace:*",
"typescript": "^5.7.2"
},
Expand Down
6 changes: 1 addition & 5 deletions packages/backend-ai-google/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"target": "ESNext",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./",
"emitDeclarationOnly": true,
"paths": {
"@/*": ["./src/*"]
}
"rootDir": "./"
},
"include": ["src/**/*", "scripts/**/*"]
}
3 changes: 1 addition & 2 deletions packages/backend-ai-open-ai/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
/.turbo
/node_modules
/eslint.config.mjs
/tsconfig.json
/.swcrc
/tsconfig.json
20 changes: 0 additions & 20 deletions packages/backend-ai-open-ai/.swcrc

This file was deleted.

9 changes: 3 additions & 6 deletions packages/backend-ai-open-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"directory": "packages/backend-ai-open-ai"
},
"scripts": {
"build:packages": "tsc && swc src -d dist --config-file .swcrc",
"dev:packages": "concurrently \"tsc -w --preserveWatchOutput\" \"swc src -d dist --config-file .swcrc -w\"",
"build:packages": "tsc",
"dev:packages": "tsc -w",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
Expand All @@ -26,11 +26,8 @@
"chatgpt"
],
"devDependencies": {
"@swc/cli": "^0.5.1",
"@swc/core": "^1.9.3",
"@types/node": "^22.10.1",
"ai": "^4.0.8",
"concurrently": "^9.1.0",
"ai": "^4.0.10",
"eslint-config-typescript-vitnode": "workspace:*",
"typescript": "^5.7.2"
},
Expand Down
6 changes: 1 addition & 5 deletions packages/backend-ai-open-ai/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"target": "ESNext",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./",
"emitDeclarationOnly": true,
"paths": {
"@/*": ["./src/*"]
}
"rootDir": "./"
},
"include": ["src/**/*", "scripts/**/*"]
}
3 changes: 1 addition & 2 deletions packages/backend-email-resend/.npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@
/.turbo
/node_modules
/eslint.config.mjs
/tsconfig.json
/.swcrc
/tsconfig.json
20 changes: 0 additions & 20 deletions packages/backend-email-resend/.swcrc

This file was deleted.

7 changes: 2 additions & 5 deletions packages/backend-email-resend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"directory": "packages/backend-email-resend"
},
"scripts": {
"build:packages": "tsc && swc src -d dist --config-file .swcrc",
"dev:packages": "concurrently \"tsc -w --preserveWatchOutput\" \"swc src -d dist --config-file .swcrc -w\"",
"build:packages": "tsc",
"dev:packages": "tsc -w",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
Expand All @@ -23,10 +23,7 @@
"resend"
],
"devDependencies": {
"@swc/cli": "^0.5.1",
"@swc/core": "^1.9.3",
"@types/node": "^22.10.1",
"concurrently": "^9.1.0",
"eslint-config-typescript-vitnode": "workspace:*",
"typescript": "^5.7.2"
},
Expand Down
6 changes: 1 addition & 5 deletions packages/backend-email-resend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"target": "ESNext",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./",
"emitDeclarationOnly": true,
"paths": {
"@/*": ["./src/*"]
}
"rootDir": "./"
},
"include": ["src/**/*", "scripts/**/*"]
}
5 changes: 5 additions & 0 deletions packages/backend-email-smtp/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/src
/.turbo
/node_modules
/eslint.config.mjs
/tsconfig.json
20 changes: 0 additions & 20 deletions packages/backend-email-smtp/.swcrc

This file was deleted.

7 changes: 2 additions & 5 deletions packages/backend-email-smtp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
"directory": "packages/backend-email-smtp"
},
"scripts": {
"build:packages": "tsc && swc src -d dist --config-file .swcrc",
"dev:packages": "concurrently \"tsc -w --preserveWatchOutput\" \"swc src -d dist --config-file .swcrc -w\"",
"build:packages": "tsc",
"dev:packages": "tsc -w",
"lint": "eslint .",
"lint:fix": "eslint . --fix"
},
Expand All @@ -24,11 +24,8 @@
"smtp"
],
"devDependencies": {
"@swc/cli": "^0.5.1",
"@swc/core": "^1.9.3",
"@types/node": "^22.10.1",
"@types/nodemailer": "^6.4.17",
"concurrently": "^9.1.0",
"eslint-config-typescript-vitnode": "workspace:*",
"typescript": "^5.7.2"
},
Expand Down
6 changes: 1 addition & 5 deletions packages/backend-email-smtp/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@
"target": "ESNext",
"module": "commonjs",
"outDir": "./dist",
"rootDir": "./",
"emitDeclarationOnly": true,
"paths": {
"@/*": ["./src/*"]
}
"rootDir": "./"
},
"include": ["src/**/*", "scripts/**/*"]
}
8 changes: 4 additions & 4 deletions packages/backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@
"codegen"
],
"devDependencies": {
"@nestjs/common": "^10.4.11",
"@nestjs/platform-express": "^10.4.11",
"@nestjs/common": "^10.4.12",
"@nestjs/platform-express": "^10.4.12",
"@nestjs/schedule": "^4.1.1",
"@react-email/components": "^0.0.28",
"@swc/cli": "^0.5.1",
"@swc/cli": "^0.5.2",
"@swc/core": "^1.9.3",
"@types/cookie-parser": "^1.4.8",
"@types/express": "^5.0.0",
Expand All @@ -82,7 +82,7 @@
},
"dependencies": {
"@nestjs/config": "^3.3.0",
"@nestjs/core": "^10.4.11",
"@nestjs/core": "^10.4.12",
"@nestjs/jwt": "^10.2.0",
"@nestjs/serve-static": "^4.0.2",
"@nestjs/swagger": "^8.0.7",
Expand Down
4 changes: 3 additions & 1 deletion packages/backend/scripts/setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { createClientDatabase, DATABASE_ENVS } from '@/utils/database/client';
#!/usr/bin/env node
/* eslint-disable no-console */

import { createClientDatabase, DATABASE_ENVS } from '@/utils/database/client';
import { existsSync } from 'fs';
import { join } from 'path';

Expand Down
1 change: 1 addition & 0 deletions packages/backend/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ export default defineConfig({
entry: ['scripts/setup.ts'],
outDir: 'dist/scripts',
clean: false,
minify: true,
});
14 changes: 7 additions & 7 deletions packages/create-vitnode-app/helpers/create-packages-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const createPackagesJSON = ({
autoprefixer: '^10.4.20',
'eslint-config-typescript-vitnode': `^${pkg.version}`,
postcss: '^8.4.49',
shared: 'workspace:*',
shared: packageManager.startsWith('npm') ? '*' : 'workspace:*',
tailwindcss: '^3.4.15',
typescript: '^5.7.2',
'vitnode-shared': `^${pkg.version}`,
Expand All @@ -141,9 +141,9 @@ export const createPackagesJSON = ({
db: 'vitnode-backend db',
},
dependencies: {
'@nestjs/common': '^10.4.11',
'@nestjs/core': '^10.4.11',
'@nestjs/platform-express': '^10.4.11',
'@nestjs/common': '^10.4.12',
'@nestjs/core': '^10.4.12',
'@nestjs/platform-express': '^10.4.12',
'@nestjs/schedule': '^4.1.1',
'@nestjs/throttler': '^6.2.1',
'@react-email/components': '^0.0.28',
Expand All @@ -159,13 +159,13 @@ export const createPackagesJSON = ({
devDependencies: {
'@nestjs/cli': '^10.4.8',
'@nestjs/schematics': '^10.2.3',
'@swc/cli': '^0.5.1',
'@swc/cli': '^0.5.2',
'@types/express': '^5.0.0',
'@types/node': '^22.10.1',
'@types/react': '^18.3.12',
'cross-env': '^7.0.3',
'eslint-config-typescript-vitnode': `^${pkg.version}`,
shared: 'workspace:*',
shared: packageManager.startsWith('npm') ? '*' : 'workspace:*',
typescript: '^5.7.2',
'vitnode-shared': `^${pkg.version}`,
},
Expand Down Expand Up @@ -194,7 +194,7 @@ export const createPackagesJSON = ({
},
},
dependencies: {
'@nestjs/common': '^10.4.11',
'@nestjs/common': '^10.4.12',
'@nestjs/swagger': '^8.0.7',
},
devDependencies: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,9 @@ yarn-error.log*
!/apps/backend/uploads/private/index.html
!/apps/backend/uploads/temp/index.html

## Configuration
/apps/backend/src/plugins/core/utils/*

## Frontend
/apps/frontend/next-env.d.ts
/apps/frontend/.source/
Loading

0 comments on commit cd7e01e

Please sign in to comment.