diff --git a/.github/workflows/buddy-bot.yml b/.github/workflows/buddy-bot.yml index ec784b6..4c532d9 100644 --- a/.github/workflows/buddy-bot.yml +++ b/.github/workflows/buddy-bot.yml @@ -130,7 +130,7 @@ jobs: - name: Setup PHP and Composer (if needed) if: ${{ hashFiles('composer.json') != '' }} - uses: shivammathur/setup-php@2.35.4 + uses: shivammathur/setup-php@2.35.5 with: php-version: '8.4' tools: composer @@ -248,7 +248,7 @@ jobs: - name: Setup PHP and Composer (if needed) if: ${{ hashFiles('composer.json') != '' }} - uses: shivammathur/setup-php@2.35.4 + uses: shivammathur/setup-php@2.35.5 with: php-version: '8.4' tools: composer diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 088d4e8..40b4395 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,13 +18,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v5.0.0 - name: Install Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 - name: Use cached node_modules - uses: actions/cache@v4.2.4 + uses: actions/cache@v4.3.0.3.0 with: path: node_modules key: node-modules-${{ hashFiles('**/bun.lock') }} @@ -41,13 +41,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v5.0.0 - name: Install Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 - name: Use cached node_modules - uses: actions/cache@v4.2.4 + uses: actions/cache@v4.3.0.3.0 with: path: node_modules key: node-modules-${{ hashFiles('**/bun.lock') }} @@ -87,13 +87,13 @@ jobs: POSTGRES_DB: test_db steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v5.0.0 - name: Install Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 - name: Use cached node_modules - uses: actions/cache@v4.2.4 + uses: actions/cache@v4.3.0.3.0 with: path: node_modules key: node-modules-${{ hashFiles('**/bun.lock') }} @@ -115,13 +115,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v5.0.0 - name: Install Bun - uses: oven-sh/setup-bun@v2 + uses: oven-sh/setup-bun@v2.0.2 - name: Use cached node_modules - uses: actions/cache@v4 + uses: actions/cache@v4.3.0 with: path: node_modules key: node-modules-${{ hashFiles('**/bun.lock') }} diff --git a/deps.yaml b/deps.yaml index 554926a..e28ac67 100644 --- a/deps.yaml +++ b/deps.yaml @@ -1,5 +1,5 @@ dependencies: - bun: ^1.2.20 + bun: ^1.2.23 mysql: latest postgres: latest sqlite: latest diff --git a/package.json b/package.json index e26bc11..dbca4e0 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "bun-query-builder", "type": "module", "version": "0.1.2", + "private": true, "description": "A simple yet performant query builder for TypeScript. Built with Bun.", "author": "Chris Breuer ", "license": "MIT", @@ -40,12 +41,12 @@ "dist" ], "scripts": { - "build": "bun --bun build.ts && bun run compile", - "compile": "bun build ./bin/cli.ts --compile --minify --outfile bin/query-builder", - "compile:all": "bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64", - "compile:linux-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/query-builder-linux-x64", - "compile:linux-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/query-builder-linux-arm64", - "compile:windows-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/query-builder-windows-x64.exe", + "build": "cd ./packages/bun-query-builder && bun --bun build.ts && bun run compile", + "compile": "cd ./packages/bun-query-builder && bun build ./bin/cli.ts --compile --minify --outfile bin/query-builder", + "compile:all": "cd ./packages/bun-query-builder && bun run compile:linux-x64 && bun run compile:linux-arm64 && bun run compile:windows-x64 && bun run compile:darwin-x64 && bun run compile:darwin-arm64", + "compile:linux-x64": "cd ./packages/bun-query-builder && bun build ./bin/cli.ts --compile --minify --target=bun-linux-x64 --outfile bin/query-builder-linux-x64", + "compile:linux-arm64": "cd ./packages/bun-query-builder && bun build ./bin/cli.ts --compile --minify --target=bun-linux-arm64 --outfile bin/query-builder-linux-arm64", + "compile:windows-x64": "cd ./packages/bun-query-builder && bun build ./bin/cli.ts --compile --minify --target=bun-windows-x64 --outfile bin/query-builder-windows-x64.exe", "compile:darwin-x64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-x64 --outfile bin/query-builder-darwin-x64", "compile:darwin-arm64": "bun build ./bin/cli.ts --compile --minify --target=bun-darwin-arm64 --outfile bin/query-builder-darwin-arm64", "zip": "bun run zip:all", @@ -56,7 +57,6 @@ "zip:darwin-x64": "zip -j bin/query-builder-darwin-x64.zip bin/query-builder-darwin-x64", "zip:darwin-arm64": "zip -j bin/query-builder-darwin-arm64.zip bin/query-builder-darwin-arm64", "fresh": "bunx rimraf node_modules/ bun.lock && bun i", - "prepublishOnly": "bun --bun run build && bun run compile:all && bun run zip", "test": "bun test", "lint": "bunx --bun eslint .", "lint:fix": "bunx --bun eslint . --fix", @@ -70,21 +70,22 @@ "typecheck": "bun --bun tsc" }, "dependencies": { - "@stacksjs/launchpad": "^0.6.4", - "@stacksjs/ts-validation": "^0.4.7" + "@stacksjs/ts-validation": "^0.4.7", + "ts-mocker": "^0.1.2" }, "devDependencies": { - "@stacksjs/bumpx": "^0.1.69", + "@stacksjs/bumpx": "^0.1.86", "@stacksjs/docs": "^0.70.23", "@stacksjs/eslint-config": "^4.14.0-beta.3", "@stacksjs/gitlint": "^0.1.5", + "@stacksjs/launchpad": "^0.6.4", "@stacksjs/logsmith": "^0.1.18", - "@types/bun": "^1.2.21", - "buddy-bot": "^0.9.4", - "bun-git-hooks": "^0.2.19", - "bun-plugin-dtsx": "0.9.5", + "@types/bun": "^1.2.23", + "buddy-bot": "^0.9.8", + "bun-git-hooks": "^0.3.1", + "bun-plugin-dtsx": "0.21.12", "bunfig": "^0.15.0", - "typescript": "^5.9.2" + "typescript": "^5.9.3" }, "overrides": { "unconfig": "0.3.10" @@ -96,5 +97,8 @@ } }, "commit-msg": "bunx gitlint --edit .git/COMMIT_EDITMSG" - } + }, + "workspaces": [ + "packages/*" + ] } diff --git a/packages/benchmark/package.json b/packages/benchmark/package.json new file mode 100644 index 0000000..7b9d80b --- /dev/null +++ b/packages/benchmark/package.json @@ -0,0 +1,31 @@ +{ + "name": "@bun-query-builder/benchmark", + "type": "module", + "version": "0.1.0", + "private": true, + "description": "Performance benchmarks for bun-query-builder vs popular query builders", + "scripts": { + "bench": "bun run src/index.ts", + "bench:basic": "bun run src/benchmarks/basic.ts", + "bench:advanced": "bun run src/benchmarks/advanced.ts", + "bench:batch": "bun run src/benchmarks/batch.ts", + "setup": "bun run src/setup.ts", + "clean": "bun run src/clean.ts" + }, + "dependencies": { + "@prisma/client": "^6.17.0", + "better-sqlite3": "^12.4.1", + "bun-query-builder": "workspace:*", + "chalk": "^5.6.2", + "cli-table3": "^0.6.5", + "drizzle-orm": "^0.44.6", + "kysely": "^0.28.7", + "mitata": "^0.1.14", + "prisma": "^6.17.0", + "typeorm": "^0.3.27" + }, + "devDependencies": { + "@types/bun": "^1.2.21", + "typescript": "^5.9.2" + } +}