From 332de85d5883eb3d92f6ebfa45f0d11a8b6d5555 Mon Sep 17 00:00:00 2001 From: jycouet Date: Fri, 29 Dec 2023 16:28:22 +0100 Subject: [PATCH 1/2] :ambulance: FIX: build --- .github/workflows/ci.yml | 3 +++ package.json | 1 + pnpm-lock.yaml | 29 ++++++++++++++++++++++------- src/cli.ts | 1 + 4 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3565df2..016f3f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,6 +39,9 @@ jobs: - name: Install dependencies run: pnpm install --frozen-lockfile + - name: build + run: pnpm build + - name: test run: pnpm test diff --git a/package.json b/package.json index d63dec0..91f1d2d 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ }, "devDependencies": { "@changesets/cli": "^2.27.1", + "@types/node": "^20.10.5", "@types/pluralize": "^0.0.32", "@types/yargs": "^17.0.32", "@typescript-eslint/eslint-plugin": "^6.16.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index a237a79..b280f4a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -31,6 +31,9 @@ devDependencies: '@changesets/cli': specifier: ^2.27.1 version: 2.27.1 + '@types/node': + specifier: ^20.10.5 + version: 20.10.5 '@types/pluralize': specifier: ^0.0.32 version: 0.0.32 @@ -57,7 +60,7 @@ devDependencies: version: 5.3.3 vitest: specifier: ^1.1.0 - version: 1.1.0 + version: 1.1.0(@types/node@20.10.5) packages: @@ -747,6 +750,12 @@ packages: resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} dev: true + /@types/node@20.10.5: + resolution: {integrity: sha512-nNPsNE65wjMxEKI93yOP+NPGGBJz/PoN3kZsVLee0XMiJolxSekEVD8wRwBUBqkwc7UWop0edW50yrCQW4CyRw==} + dependencies: + undici-types: 5.26.5 + dev: true + /@types/normalize-package-data@2.4.4: resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} dev: true @@ -3276,6 +3285,10 @@ packages: which-boxed-primitive: 1.0.2 dev: true + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true + /universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} @@ -3299,7 +3312,7 @@ packages: spdx-expression-parse: 3.0.1 dev: true - /vite-node@1.1.0: + /vite-node@1.1.0(@types/node@20.10.5): resolution: {integrity: sha512-jV48DDUxGLEBdHCQvxL1mEh7+naVy+nhUUUaPAZLd3FJgXuxQiewHcfeZebbJ6onDqNGkP4r3MhQ342PRlG81Q==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -3308,7 +3321,7 @@ packages: debug: 4.3.4 pathe: 1.1.1 picocolors: 1.0.0 - vite: 5.0.10 + vite: 5.0.10(@types/node@20.10.5) transitivePeerDependencies: - '@types/node' - less @@ -3320,7 +3333,7 @@ packages: - terser dev: true - /vite@5.0.10: + /vite@5.0.10(@types/node@20.10.5): resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -3348,6 +3361,7 @@ packages: terser: optional: true dependencies: + '@types/node': 20.10.5 esbuild: 0.19.10 postcss: 8.4.32 rollup: 4.9.1 @@ -3355,7 +3369,7 @@ packages: fsevents: 2.3.3 dev: true - /vitest@1.1.0: + /vitest@1.1.0(@types/node@20.10.5): resolution: {integrity: sha512-oDFiCrw7dd3Jf06HoMtSRARivvyjHJaTxikFxuqJjO76U436PqlVw1uLn7a8OSPrhSfMGVaRakKpA2lePdw79A==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -3380,6 +3394,7 @@ packages: jsdom: optional: true dependencies: + '@types/node': 20.10.5 '@vitest/expect': 1.1.0 '@vitest/runner': 1.1.0 '@vitest/snapshot': 1.1.0 @@ -3398,8 +3413,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.8.1 - vite: 5.0.10 - vite-node: 1.1.0 + vite: 5.0.10(@types/node@20.10.5) + vite-node: 1.1.0(@types/node@20.10.5) why-is-node-running: 2.2.2 transitivePeerDependencies: - less diff --git a/src/cli.ts b/src/cli.ts index 09b4272..67bb0cb 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -8,6 +8,7 @@ import * as p from "@clack/prompts"; import { logReport } from "./report.js"; import { green } from "@kitql/helpers"; import { SqlDatabase } from "remult"; +// @ts-ignore (TODO: waiting for remult v0.24.1 that will fix the type export in esm issue) import { createPostgresDataProvider } from "remult/postgres"; dotenv.config(); From 9b36b48a6ae7c000567c67b9c33c57d0d7a9359c Mon Sep 17 00:00:00 2001 From: jycouet Date: Fri, 29 Dec 2023 17:49:59 +0100 Subject: [PATCH 2/2] bring _prisma_migrations by default --- src/cli.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cli.ts b/src/cli.ts index 67bb0cb..3dba659 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -75,7 +75,6 @@ You can use it to replace the default decorators by your own, extending Remult o default: process.env["EXCLUDE"]?.split(",").map((c) => c.trim()) ?? [ "pg_stat_statements", "pg_stat_statements_info", - "_prisma_migrations", ], }, include: {