From 87bc81c682cf9e7e6d620ac70bed77a1304b6a10 Mon Sep 17 00:00:00 2001 From: Maciek Sitkowski <58401630+sitek94@users.noreply.github.com> Date: Sun, 26 Nov 2023 22:58:40 +0100 Subject: [PATCH] fix build scripts; update gh workflow (#3) * revert setup-node action to v3 because of slow post action step see issue: https://github.com/actions/setup-node/issues/878 * fix build commands --- .github/workflows/ci.yml | 10 +++++----- .gitignore | 1 + apps/nestjs/tsconfig.json | 16 ++++++++++++++-- libs/tsconfig/base.json | 9 +++++---- libs/tsconfig/nest.json | 22 ---------------------- package.json | 2 ++ 6 files changed, 27 insertions(+), 33 deletions(-) delete mode 100644 libs/tsconfig/nest.json diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 999374a..0d6fc9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: version: 8 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v3 with: node-version: 20 cache: pnpm @@ -75,7 +75,7 @@ jobs: version: 8 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v3 with: node-version: 20 cache: pnpm @@ -100,7 +100,7 @@ jobs: version: 8 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v3 with: node-version: 20 cache: pnpm @@ -125,7 +125,7 @@ jobs: version: 8 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v3 with: node-version: 20 cache: pnpm @@ -150,7 +150,7 @@ jobs: version: 8 - name: Set up Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v3 with: node-version: 20 cache: pnpm diff --git a/.gitignore b/.gitignore index 8492f17..dcd851a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ dist build public/build .next +**/*.tsbuildinfo ## Monorepo .turbo diff --git a/apps/nestjs/tsconfig.json b/apps/nestjs/tsconfig.json index 3f3e327..181ba1e 100644 --- a/apps/nestjs/tsconfig.json +++ b/apps/nestjs/tsconfig.json @@ -1,8 +1,20 @@ { - "extends": "@repo/tsconfig/nest.json", "include": ["**/*.ts", "jest.config.js"], - "exclude": ["node_modules", "build"], "compilerOptions": { + "module": "commonjs", + "declaration": true, + "removeComments": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "allowSyntheticDefaultImports": true, + "sourceMap": true, + "outDir": "./build", + "incremental": true, + "strictNullChecks": false, + "noImplicitAny": false, + "strictBindCallApply": false, + "noFallthroughCasesInSwitch": false, + "resolveJsonModule": true, "baseUrl": "./", "paths": { "~/*": ["./src/*"] diff --git a/libs/tsconfig/base.json b/libs/tsconfig/base.json index 39ef7ed..bb9ed97 100644 --- a/libs/tsconfig/base.json +++ b/libs/tsconfig/base.json @@ -2,13 +2,15 @@ "$schema": "https://json.schemastore.org/tsconfig", "display": "Default", "compilerOptions": { + "outDir": "./build", + "target": "esnext", + "module": "esnext", + "allowJs": true, "composite": false, "declaration": true, "declarationMap": true, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, - "allowImportingTsExtensions": true, - "noEmit": true, "inlineSources": false, "isolatedModules": true, "moduleResolution": "node", @@ -16,8 +18,7 @@ "noUnusedParameters": false, "preserveWatchOutput": true, "skipLibCheck": true, - "strict": true, - "strictNullChecks": true + "strict": true }, "exclude": ["node_modules"] } diff --git a/libs/tsconfig/nest.json b/libs/tsconfig/nest.json deleted file mode 100644 index 3c4a735..0000000 --- a/libs/tsconfig/nest.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "./base.json", - "$schema": "https://json.schemastore.org/tsconfig", - "display": "NestJS", - "compilerOptions": { - "module": "commonjs", - "declaration": true, - "removeComments": true, - "emitDecoratorMetadata": true, - "experimentalDecorators": true, - "allowSyntheticDefaultImports": true, - "sourceMap": true, - "outDir": "./build", - "incremental": true, - "strictNullChecks": false, - "noImplicitAny": false, - "strictBindCallApply": false, - "noFallthroughCasesInSwitch": false, - "resolveJsonModule": true, - "baseUrl": "." - } -} diff --git a/package.json b/package.json index de6847a..5d1c92e 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,8 @@ "private": true, "scripts": { "build": "turbo run build", + "build:nestjs": "turbo run build -F nestjs...", + "build:remix": "turbo run build -F remix... build", "deploy:nestjs": "fly deploy --config ./apps/nestjs/fly.toml --dockerfile ./apps/nestjs/Dockerfile", "deploy:remix": "fly deploy --config ./apps/remix/fly.toml --dockerfile ./apps/remix/Dockerfile", "develop:docs": "turbo run develop --filter docs",