Skip to content

Commit facb2aa

Browse files
committed
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-orm into alternation-engine
2 parents 94e6781 + 1bf9344 commit facb2aa

File tree

271 files changed

+17036
-5325
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

271 files changed

+17036
-5325
lines changed

.github/workflows/release-feature-branch.yaml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,28 @@
11
name: Release (feature branch)
22

33
on:
4-
push:
5-
branches-ignore:
6-
- main
7-
pull_request: {}
4+
workflow_call:
5+
secrets:
6+
PLANETSCALE_CONNECTION_STRING:
7+
required: true
8+
NEON_CONNECTION_STRING:
9+
required: true
10+
NEON_HTTP_CONNECTION_STRING:
11+
required: true
12+
TIDB_CONNECTION_STRING:
13+
required: true
14+
XATA_API_KEY:
15+
required: true
16+
XATA_BRANCH:
17+
required: true
18+
LIBSQL_REMOTE_URL:
19+
required: true
20+
LIBSQL_REMOTE_TOKEN:
21+
required: true
22+
SQLITE_CLOUD_CONNECTION_STRING:
23+
required: true
24+
SQLITE_MANY_CLOUD_CONNECTION_STRING:
25+
required: true
826

927
concurrency:
1028
group: feature-${{ github.workflow }}-${{ github.ref }}
@@ -195,9 +213,12 @@ jobs:
195213
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
196214
GEL_CONNECTION_STRING: gel://admin:password@localhost:56565/main
197215
SINGLESTORE_CONNECTION_STRING: singlestore://root:singlestore@localhost:33307/
216+
SINGLESTORE_MANY_CONNECTION_STRING: singlestore://root:singlestore@localhost:3308/;singlestore://root:singlestore@localhost:3309/;singlestore://root:singlestore@localhost:3310/;singlestore://root:singlestore@localhost:3311/
198217
COCKROACH_CONNECTION_STRING: postgresql://[email protected]:26257/defaultdb?sslmode=disable
199218
MSSQL_CONNECTION_STRING: mssql://SA:drizzle123PASSWORD!@localhost:1433?encrypt=true&trustServerCertificate=true
200219
TEST_CONFIG_PATH_PREFIX: ./tests/cli/
220+
SQLITE_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_CLOUD_CONNECTION_STRING }}
221+
SQLITE_MANY_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_MANY_CLOUD_CONNECTION_STRING }}
201222
working-directory: integration-tests
202223
shell: bash
203224
run: |
@@ -334,7 +355,7 @@ jobs:
334355
matrix:
335356
package: [drizzle-orm, drizzle-kit, drizzle-zod, drizzle-seed, drizzle-typebox, drizzle-valibot, drizzle-arktype, eslint-plugin-drizzle]
336357
steps:
337-
- uses: actions/checkout@v4
358+
- uses: actions/checkout@v5
338359

339360
# don't specify registry url, so there's no .npmrc config file
340361
- uses: actions/setup-node@v6
@@ -384,4 +405,4 @@ jobs:
384405
run: |
385406
set -euxo pipefail
386407
npm publish ./artifacts/${{ matrix.package }}/package.tgz --tag "${{ steps.checks.outputs.tag }}"
387-
echo "npm: \`${{ matrix.package }}@${{ steps.checks.outputs.tag }} | ${{ steps.checks.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY
408+
echo "npm: \`${{ matrix.package }}@${{ steps.checks.outputs.tag }} | ${{ steps.checks.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY

.github/workflows/release-latest.yaml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
name: Release (latest)
22

3-
on: workflow_dispatch
3+
on:
4+
workflow_call:
5+
secrets:
6+
PLANETSCALE_CONNECTION_STRING:
7+
required: true
8+
NEON_CONNECTION_STRING:
9+
required: true
10+
NEON_HTTP_CONNECTION_STRING:
11+
required: true
12+
TIDB_CONNECTION_STRING:
13+
required: true
14+
XATA_API_KEY:
15+
required: true
16+
XATA_BRANCH:
17+
required: true
18+
LIBSQL_REMOTE_URL:
19+
required: true
20+
LIBSQL_REMOTE_TOKEN:
21+
required: true
22+
SQLITE_CLOUD_CONNECTION_STRING:
23+
required: true
424

525
jobs:
626
test:
@@ -81,7 +101,7 @@ jobs:
81101
ports:
82102
- 33306:3306
83103
singlestore:
84-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
104+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.67
85105
env:
86106
ROOT_PASSWORD: singlestore
87107
ports:
@@ -146,7 +166,7 @@ jobs:
146166
NEON_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
147167
# NEON_HTTP_CONNECTION_STRING: postgres://postgres:[email protected]:5432/postgres
148168
NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
149-
NEON_CONNECTION_STRING: postgres://postgres:postgres@localhost:5445/postgres
169+
# NEON_CONNECTION_STRING: postgres://postgres:postgres@localhost:5445/postgres
150170
TIDB_CONNECTION_STRING: ${{ secrets.TIDB_CONNECTION_STRING }}
151171
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
152172
XATA_BRANCH: ${{ secrets.XATA_BRANCH }}
@@ -157,6 +177,7 @@ jobs:
157177
COCKROACH_CONNECTION_STRING: postgresql://[email protected]:26257/defaultdb?sslmode=disable
158178
MSSQL_CONNECTION_STRING: mssql://SA:drizzle123PASSWORD!@localhost:1433?encrypt=true&trustServerCertificate=true
159179
TEST_CONFIG_PATH_PREFIX: ./tests/cli/
180+
SQLITE_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_CLOUD_CONNECTION_STRING }}
160181
working-directory: integration-tests
161182
run: |
162183
case ${{ matrix.shard }} in
@@ -417,7 +438,9 @@ jobs:
417438
run: bun --bun run ../attw-fork/src/run.ts package.tgz ${{ matrix.shard }}
418439

419440
release:
420-
permissions: write-all
441+
permissions:
442+
contents: read
443+
id-token: write
421444
needs:
422445
- test
423446
- attw
@@ -436,12 +459,11 @@ jobs:
436459
- eslint-plugin-drizzle
437460
runs-on: ubuntu-22.04
438461
steps:
439-
- uses: actions/checkout@v4
462+
- uses: actions/checkout@v5
440463

441-
- uses: actions/setup-node@v4
442-
with:
443-
node-version: '22'
444-
registry-url: 'https://registry.npmjs.org'
464+
# don't specify registry url, so there's no .npmrc config file
465+
- uses: actions/setup-node@v6
466+
with: { node-version: '24' }
445467

446468
- uses: pnpm/action-setup@v3
447469
name: Install pnpm
@@ -478,7 +500,6 @@ jobs:
478500
479501
if [[ "$is_version_published" == "true" ]]; then
480502
echo "\`${{ matrix.package }}@$version\` already published, adding tag \`latest\`" >> $GITHUB_STEP_SUMMARY
481-
npm dist-tag add ${{ matrix.package }}@$version latest
482503
elif [[ "$latest" != "$version" ]]; then
483504
echo "Latest: $latest"
484505
echo "Current: $version"
@@ -512,16 +533,12 @@ jobs:
512533
if: steps.checks.outputs.has_new_release == 'true'
513534
working-directory: ${{ matrix.package }}
514535
shell: bash
515-
env:
516-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
517536
run: npm run pack
518-
537+
519538
- name: Publish
520539
if: steps.checks.outputs.has_new_release == 'true'
521540
working-directory: ${{ matrix.package }}
522541
shell: bash
523-
env:
524-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
525542
run: |
526543
version="${{ steps.checks.outputs.version }}"
527544

.github/workflows/router.yaml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Release Router
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- main
7+
pull_request:
8+
workflow_dispatch:
9+
10+
jobs:
11+
switch:
12+
runs-on: ubuntu-latest
13+
outputs:
14+
target: ${{ steps.route.outputs.target }}
15+
steps:
16+
- name: Route release
17+
id: route
18+
run: |
19+
HEAD_REPO="${{ github.event.pull_request.head.repo.full_name }}"
20+
if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" && "${GITHUB_REF##*/}" == "main" ]]; then
21+
echo "target=latest" >> $GITHUB_OUTPUT
22+
# only run on all pushes or pull requests from forks
23+
elif [[ "$GITHUB_EVENT_NAME" == "push" ]] || [[ "$HEAD_REPO" != "$GITHUB_REPOSITORY" ]]; then
24+
echo "target=feature" >> $GITHUB_OUTPUT
25+
else
26+
echo "target=skip" >> $GITHUB_OUTPUT
27+
fi
28+
29+
run-feature:
30+
needs: switch
31+
if: needs.switch.outputs.target == 'feature'
32+
uses: ./.github/workflows/release-feature-branch.yaml
33+
secrets:
34+
PLANETSCALE_CONNECTION_STRING: ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
35+
NEON_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
36+
NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
37+
TIDB_CONNECTION_STRING: ${{ secrets.TIDB_CONNECTION_STRING }}
38+
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
39+
XATA_BRANCH: ${{ secrets.XATA_BRANCH }}
40+
LIBSQL_REMOTE_URL: ${{ secrets.LIBSQL_REMOTE_URL }}
41+
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
42+
SQLITE_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_CLOUD_CONNECTION_STRING }}
43+
SQLITE_MANY_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_MANY_CLOUD_CONNECTION_STRING }}
44+
45+
run-latest:
46+
needs: switch
47+
if: needs.switch.outputs.target == 'latest'
48+
uses: ./.github/workflows/release-latest.yaml
49+
secrets:
50+
PLANETSCALE_CONNECTION_STRING: ${{ secrets.PLANETSCALE_CONNECTION_STRING }}
51+
NEON_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
52+
NEON_HTTP_CONNECTION_STRING: ${{ secrets.NEON_CONNECTION_STRING }}
53+
TIDB_CONNECTION_STRING: ${{ secrets.TIDB_CONNECTION_STRING }}
54+
XATA_API_KEY: ${{ secrets.XATA_API_KEY }}
55+
XATA_BRANCH: ${{ secrets.XATA_BRANCH }}
56+
LIBSQL_REMOTE_URL: ${{ secrets.LIBSQL_REMOTE_URL }}
57+
LIBSQL_REMOTE_TOKEN: ${{ secrets.LIBSQL_REMOTE_TOKEN }}
58+
SQLITE_CLOUD_CONNECTION_STRING: ${{ secrets.SQLITE_CLOUD_CONNECTION_STRING }}

.oxlintrc.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,15 @@
6666
"typescript/no-empty-interface": "off",
6767
"typescript/no-unsafe-declaration-merging": "off",
6868
"no-inner-declarations": "off",
69-
"drizzle-internal/no-instanceof": "error",
7069
"drizzle-internal/require-entity-kind": "error"
7170
},
7271
"overrides": [
72+
{
73+
"files": ["drizzle-orm/**/*"],
74+
"rules": {
75+
"drizzle-internal/no-instanceof": "error"
76+
}
77+
},
7378
{
7479
"files": [
7580
"**/tests/**/*.ts",
@@ -78,7 +83,6 @@
7883
],
7984
"rules": {
8085
"import/extensions": "off",
81-
"drizzle-internal/no-instanceof": "off",
8286
"no-useless-escape": "off",
8387
"consistent-type-imports": "off",
8488
"no-unused-vars": "off",

changelogs/drizzle-kit/0.31.6.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Bug fixes
2+
3+
- [[BUG]: Importing drizzle-kit/api fails in ESM modules](https://github.com/drizzle-team/drizzle-orm/issues/2853)

changelogs/drizzle-kit/0.31.7.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Bug fixes
2+
3+
- [[BUG]: Drizzle Kit push to Postgres 18 produces unecessary DROP SQL when the schema was NOT changed](https://github.com/drizzle-team/drizzle-orm/issues/4944)

changelogs/drizzle-kit/0.31.8.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Bug fixes
2+
3+
- Fixed `algorythm` => `algorithm` typo

changelogs/drizzle-orm/0.45.0.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
- Fixed pg-native Pool detection in node-postgres transactions
2+
- Allowed subqueries in select fields
3+
- Updated typo algorythm => algorithm
4+
- Fixed `$onUpdate` not handling `SQL` values (fixes [#2388](https://github.com/drizzle-team/drizzle-orm/issues/2388), tests implemented by [L-Mario564](https://github.com/L-Mario564) in [#2911](https://github.com/drizzle-team/drizzle-orm/pull/2911))
5+
- Fixed `pg` mappers not handling `Date` instances in `bun-sql:postgresql` driver responses for `date`, `timestamp` types (fixes [#4493](https://github.com/drizzle-team/drizzle-orm/issues/4493))

compose/singlestore-many.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
singlestore0:
3-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
3+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.67
44
environment:
55
ROOT_PASSWORD: singlestore
66
TZ: UTC
@@ -13,7 +13,7 @@ services:
1313
retries: 60
1414

1515
singlestore1:
16-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
16+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.67
1717
environment:
1818
ROOT_PASSWORD: singlestore
1919
TZ: UTC
@@ -26,7 +26,7 @@ services:
2626
retries: 60
2727

2828
singlestore2:
29-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
29+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.67
3030
environment:
3131
ROOT_PASSWORD: singlestore
3232
TZ: UTC
@@ -39,7 +39,7 @@ services:
3939
retries: 60
4040

4141
singlestore3:
42-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
42+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.67
4343
environment:
4444
ROOT_PASSWORD: singlestore
4545
TZ: UTC
@@ -50,16 +50,3 @@ services:
5050
interval: 2s
5151
timeout: 3s
5252
retries: 60
53-
54-
singlestore4:
55-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
56-
environment:
57-
ROOT_PASSWORD: singlestore
58-
TZ: UTC
59-
ports:
60-
- "3312:3306"
61-
healthcheck:
62-
test: ["CMD", "bash", "-lc", "nc -z 127.0.0.1 3306"]
63-
interval: 2s
64-
timeout: 3s
65-
retries: 60

compose/singlestore.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
singlestore:
3-
image: ghcr.io/singlestore-labs/singlestoredb-dev:latest
3+
image: ghcr.io/singlestore-labs/singlestoredb-dev:0.2.67
44
environment:
55
ROOT_PASSWORD: singlestore
66
TZ: UTC

0 commit comments

Comments
 (0)