Skip to content
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
1120 commits
Select commit Hold shift + click to select a range
f625a03
+
AlexBlokh Oct 31, 2025
eae5510
Ignored empty tests
Sukairo-02 Oct 31, 2025
10c94e7
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
Sukairo-02 Oct 31, 2025
7528925
+
AlexBlokh Oct 31, 2025
bcaf0f8
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Oct 31, 2025
739bd90
todo -> skip
Sukairo-02 Oct 31, 2025
4f31ad4
Added bunfig to avoid tests exit 1 bug
Sukairo-02 Oct 31, 2025
cb95e80
Temporarily disabled bun workflow tests
Sukairo-02 Oct 31, 2025
19bd8a0
+
AlexBlokh Oct 31, 2025
d299e61
Merge commit '4f31ad4ac640ba2aa16643244b14cbef4d50f383' into alternat…
AlexBlokh Oct 31, 2025
38f1961
Merge commit 'cb95e80f4991dd2eee86bfd5fbf24d1273494f64' into alternat…
AlexBlokh Oct 31, 2025
119a0b1
Enhance MySQL connection query to include type casting
RomanNabukhotnyi Nov 1, 2025
d4c3d56
+
AlexBlokh Nov 1, 2025
a135870
ignore prisma in integrations tests
AlexBlokh Nov 1, 2025
7ff9d18
+
AlexBlokh Nov 1, 2025
e313f6f
+
AlexBlokh Nov 1, 2025
14ba2fe
+
AlexBlokh Nov 1, 2025
9136201
[integration-tests] fixed seed tests
OleksiiKH0240 Nov 1, 2025
ef38e85
add postgres postgis
AlexBlokh Nov 1, 2025
9d1e622
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 1, 2025
33fd7ec
+
AlexBlokh Nov 1, 2025
2ac9538
+
AlexBlokh Nov 1, 2025
f53b3eb
pull dbs simultaneously
AlexBlokh Nov 1, 2025
1ddb51e
increase test timeout for exports/imports tests
AlexBlokh Nov 1, 2025
d994f92
+
AlexBlokh Nov 1, 2025
51e574b
chunck imports tests by 10
AlexBlokh Nov 1, 2025
7408281
massive perf boost for imports tests
AlexBlokh Nov 1, 2025
f6518aa
fix mysql tests
AlexBlokh Nov 2, 2025
a36c401
fix pg tests
AlexBlokh Nov 3, 2025
15327db
+
AlexBlokh Nov 3, 2025
eb0d3c4
+
AlexBlokh Nov 3, 2025
df56653
[integration-tests] updated gel tests
OleksiiKH0240 Nov 3, 2025
cadb4f7
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
OleksiiKH0240 Nov 3, 2025
464d555
fix up postgres snapshot
AlexBlokh Nov 3, 2025
49535e0
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 3, 2025
7e9489b
fix types
AlexBlokh Nov 3, 2025
0cac638
remove console log
AlexBlokh Nov 3, 2025
2d6390e
[cockroach-update]: updated not null handling
AleksandrSherman Nov 3, 2025
8ce589f
add postgis for kit tests
AlexBlokh Nov 3, 2025
7843c1e
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
AleksandrSherman Nov 3, 2025
40ee166
cockroach speed up
AlexBlokh Nov 3, 2025
4ba807d
+
AlexBlokh Nov 3, 2025
6dfc640
+
AlexBlokh Nov 3, 2025
aaa7784
fix cockrch
AlexBlokh Nov 3, 2025
7dc5abd
cockroach more concurrent tests
AlexBlokh Nov 3, 2025
449fde0
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
AleksandrSherman Nov 4, 2025
bd5a926
Prepare merge 'api-studio' to 'alternation-engine'
RomanNabukhotnyi Nov 4, 2025
66ba9d8
[update]: added isExisting to schemas
AleksandrSherman Nov 4, 2025
a379a3b
Refactor import statements to use type imports in various API files a…
RomanNabukhotnyi Nov 4, 2025
54b9f63
postgres kit:push schemas behaviour change
AlexBlokh Nov 4, 2025
3fa9194
fix
AlexBlokh Nov 4, 2025
20e68ad
[update]: schemas isExisting flag made public
AleksandrSherman Nov 4, 2025
9e74e8c
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
AleksandrSherman Nov 4, 2025
eb962a0
[integration-tests] updated singlestore tests
OleksiiKH0240 Nov 4, 2025
252e449
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
OleksiiKH0240 Nov 4, 2025
ca27893
upd feature branch attw pnpm installs
AlexBlokh Nov 4, 2025
92f3ae0
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 4, 2025
cfed15e
[drizzle-seed] removed docker container creation from pg-postgis data…
OleksiiKH0240 Nov 5, 2025
090c6e3
[int] added test
OleksiiKH0240 Nov 6, 2025
8710ec1
[drizzle-kit] updated mysql tests
OleksiiKH0240 Nov 6, 2025
3d74138
Reworked `Stop DBs` to logic like `Start DBs`
Sukairo-02 Nov 7, 2025
574b931
Prevented `Stop DBs` when no DBs specified
Sukairo-02 Nov 7, 2025
71e1ea9
Syntax fix
Sukairo-02 Nov 7, 2025
fb55874
[drizzle-kit] added tests
OleksiiKH0240 Nov 7, 2025
f13b51f
Added case for `gel` to `Stop DBs`
Sukairo-02 Nov 7, 2025
19f1aad
`Stop DBs` rework
Sukairo-02 Nov 8, 2025
eb6bc83
added `postgres-vector` container to `Stop DBs`
Sukairo-02 Nov 8, 2025
cacd22b
remove stop dbs
AlexBlokh Nov 8, 2025
3394cdb
fix mysql diff
AlexBlokh Nov 8, 2025
635addf
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 8, 2025
1592767
[drizzle-kit] updated tests
OleksiiKH0240 Nov 8, 2025
780a1da
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
OleksiiKH0240 Nov 8, 2025
4ae3fbc
Added v3 folders migration
AndriiSherman Nov 8, 2025
47b7301
Update husky
AndriiSherman Nov 8, 2025
2a0e6e1
Update husky
AndriiSherman Nov 8, 2025
763a353
check for pre-commit
AndriiSherman Nov 8, 2025
43c5f28
if pnpm is unavailable in husky hook - fallback to dockerized lint
AlexBlokh Nov 8, 2025
be26309
Merge commit '780a1da2523acca0741fa5d540621f8b7e3386a9' into alternat…
AlexBlokh Nov 8, 2025
9229100
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-…
AndriiSherman Nov 8, 2025
61f2266
check docker
AndriiSherman Nov 8, 2025
fa7ca82
test 2
AndriiSherman Nov 8, 2025
0aed289
fix lint.sh script to do lint-staged
AlexBlokh Nov 8, 2025
f083c0c
fix lint.sh
AlexBlokh Nov 8, 2025
fb35321
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-…
AndriiSherman Nov 8, 2025
1a0da85
reimplement schemas in drizzle kit config
AlexBlokh Nov 10, 2025
fd3add9
up typescript target
AlexBlokh Nov 10, 2025
5aec352
Fixed incorrect usage of interval in test case
Sukairo-02 Nov 10, 2025
d5b6b3b
Fix linting issues
L-Mario564 Nov 10, 2025
b96bff9
Remove ESLint files
L-Mario564 Nov 10, 2025
4b128e5
fix crdb
AlexBlokh Nov 10, 2025
c1547cb
Merge commit 'b96bff9b557d06a36bd0c26073f19d90fafbb2ef' into alternat…
AlexBlokh Nov 10, 2025
715724d
Fix lint errors
L-Mario564 Nov 10, 2025
9760000
Lint ignore line in test
L-Mario564 Nov 10, 2025
971013b
+
AlexBlokh Nov 10, 2025
b07fbc2
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 10, 2025
edd88cf
Fix Kit tests
L-Mario564 Nov 10, 2025
bbbe222
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
L-Mario564 Nov 10, 2025
c9941d5
+
AlexBlokh Nov 10, 2025
53c2d13
fix ci script
AlexBlokh Nov 10, 2025
bf2579a
Merge commit 'bbbe2226ac600315d66e77dc15e5dee2768c4aad' into alternat…
AlexBlokh Nov 10, 2025
ad93931
typo fix
AlexBlokh Nov 10, 2025
1aa90a2
Fix
L-Mario564 Nov 10, 2025
f6385a3
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
L-Mario564 Nov 10, 2025
cbe869a
Fix
L-Mario564 Nov 10, 2025
4da4846
keep singlestore separated
AlexBlokh Nov 10, 2025
cb46b79
Merge commit 'cbe869af1d76fabc1a10779a7d6a8c6a1bf21c8c' into alternat…
AlexBlokh Nov 10, 2025
e7570f3
fix publish script
AlexBlokh Nov 10, 2025
76a5ae8
fix version fetch
AlexBlokh Nov 10, 2025
ea9ce2d
remove redundant `npm version`
AlexBlokh Nov 10, 2025
9153540
fix
AlexBlokh Nov 10, 2025
8c98244
:'(
AlexBlokh Nov 10, 2025
0fdb818
test no shared dist
AlexBlokh Nov 10, 2025
2349b7e
revert
AlexBlokh Nov 10, 2025
d04cd1e
upload all artifacts in 1 job
AlexBlokh Nov 10, 2025
952771b
+
AlexBlokh Nov 10, 2025
462c839
+
AlexBlokh Nov 10, 2025
9031739
+
AlexBlokh Nov 10, 2025
9138adb
we no longer need npm token for publishing
AlexBlokh Nov 11, 2025
a3d1e5e
try latest npm version
AlexBlokh Nov 11, 2025
0bd34ed
ci fix
AlexBlokh Nov 11, 2025
2d6027b
I hate npm and github and CIs
AlexBlokh Nov 11, 2025
5b158db
nuke .npmrc folder
AlexBlokh Nov 11, 2025
06e8071
don't explicitely create tag for package
AlexBlokh Nov 11, 2025
34bef0b
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-…
AndriiSherman Nov 11, 2025
95e701e
V3folder (#5031)
AndriiSherman Nov 11, 2025
1625a4f
debug
AlexBlokh Nov 11, 2025
fbc17a1
ci+
AlexBlokh Nov 11, 2025
3179d80
:'(
AlexBlokh Nov 11, 2025
813549e
+
AlexBlokh Nov 11, 2025
f6825a5
Removed `.getSQL()` from tables and views, moved `enableRLS()` from p…
Sukairo-02 Nov 13, 2025
0a9bf48
Updated kit tests to use new `withRLS()` syntax
Sukairo-02 Nov 13, 2025
2129bd5
Additional test case fixes, updated `cockroach` `withRLS()` syntax
Sukairo-02 Nov 13, 2025
22b1558
entity filters rework
AlexBlokh Nov 13, 2025
d320333
Merge commit '2129bd5ceda27d73e4d2263c07f42dd6cf36c024' into alternat…
AlexBlokh Nov 13, 2025
185e88e
fix .withRLS ts introspect
AlexBlokh Nov 13, 2025
8285f7b
squash attw steps into 1
AlexBlokh Nov 13, 2025
049e622
remove .only
AlexBlokh Nov 13, 2025
1d04ab9
fix attw
AlexBlokh Nov 13, 2025
cc5dd03
o_o
AlexBlokh Nov 13, 2025
8dc14dc
fix .existing filtering for views in crdb
AlexBlokh Nov 13, 2025
02522e1
fix crdb drizzle talbes filtering
AlexBlokh Nov 13, 2025
dd2142c
Returned old RLS syntax in deprecated form
Sukairo-02 Nov 14, 2025
e5cd576
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
Sukairo-02 Nov 14, 2025
65f2b9f
fix postgres introspect with .existing / entity filters
AlexBlokh Nov 14, 2025
e7ffaf3
Merge commit 'e5cd57623f7caa3cb5f9c790cf6b24935b46b042' into alternat…
AlexBlokh Nov 14, 2025
510b681
`column.as(alias)` prototype
Sukairo-02 Nov 14, 2025
7f424fe
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
Sukairo-02 Nov 14, 2025
2ab34aa
Add index case
AndriiSherman Nov 14, 2025
fce785b
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-…
AndriiSherman Nov 14, 2025
485d836
Test suite name fix, added tests for `column.as(alias)`
Sukairo-02 Nov 14, 2025
5c174f2
+
AlexBlokh Nov 15, 2025
0eb5d89
remove redundant default as object in postgres ddl
AlexBlokh Nov 15, 2025
ea2dcd9
Merge commit '485d8360f0d38246383ab7b9df6d48590c8562e2' into alternat…
AlexBlokh Nov 15, 2025
5c2b5b5
Added `cockroach` casing tests
Sukairo-02 Nov 17, 2025
3c441f0
add detect
AndriiSherman Nov 17, 2025
ab4f0f0
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-…
AndriiSherman Nov 17, 2025
f5208d5
View select fix for views with `column.as` in selection, integration …
Sukairo-02 Nov 17, 2025
ed867c5
SQLite test case fix
Sukairo-02 Nov 17, 2025
d49e344
Added missed drop clauses
Sukairo-02 Nov 17, 2025
247071f
Fixed wrong data type
Sukairo-02 Nov 17, 2025
185d024
Added missed table drops
Sukairo-02 Nov 17, 2025
ce17209
Removed faulty `.catch`es
Sukairo-02 Nov 17, 2025
b1a0bfd
Added tables clearing
Sukairo-02 Nov 17, 2025
209a5a8
[integration-tests] updated singlestore tests
OleksiiKH0240 Nov 17, 2025
e6bdce6
[integration-tests] decreased number of singlestore dbs
OleksiiKH0240 Nov 17, 2025
9ecb9ca
update cockroach entity filters
AlexBlokh Nov 19, 2025
e58be70
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 19, 2025
051491f
fix crdb convertor
AlexBlokh Nov 19, 2025
1919be2
Merge branch 'alternation-engine' into ae-api-studio
RomanNabukhotnyi Nov 19, 2025
5183923
refactor
RomanNabukhotnyi Nov 19, 2025
eedae89
fix: Add api entries
RomanNabukhotnyi Nov 19, 2025
5dbd2b6
Merge pull request #5012 from drizzle-team/ae-api-studio
RomanNabukhotnyi Nov 19, 2025
fa40f7a
Merge branch 'beta' into alternation-engine
RomanNabukhotnyi Nov 19, 2025
d9557d9
refactor workflows
RomanNabukhotnyi Nov 19, 2025
faaa5a7
Update no-instanceof lint rule
L-Mario564 Nov 20, 2025
690b421
[feat:psql]: explain command option
AleksandrSherman Nov 21, 2025
066475d
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
AleksandrSherman Nov 21, 2025
32cf2fd
add sql highligher for cli and remove redundant strict for pg push
AlexBlokh Nov 21, 2025
abd7440
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 21, 2025
3c01202
[feat]: mysql exlpain option
AleksandrSherman Nov 21, 2025
e2e38b3
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
AleksandrSherman Nov 21, 2025
bb1e222
[update]: prev merge conflict fix
AleksandrSherman Nov 21, 2025
4c4d831
Merge branch 'beta' of https://github.com/drizzle-team/drizzle-orm in…
Sukairo-02 Nov 21, 2025
8eab2b2
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
Sukairo-02 Nov 21, 2025
c99692d
[update]: mssql ignore master system tables
AleksandrSherman Nov 21, 2025
eb5a22d
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
AleksandrSherman Nov 21, 2025
1f0cd69
[fix]: more universal fix on prev commit
AleksandrSherman Nov 21, 2025
6b97ccc
[integration-tests] added instrumentation.ts to sqlite; updated sqlit…
OleksiiKH0240 Nov 21, 2025
8b74842
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
OleksiiKH0240 Nov 21, 2025
0ea1769
updated pnpm-lock.yaml
OleksiiKH0240 Nov 21, 2025
0478f27
properly log sql query errors, remove redundant strict flag
AlexBlokh Nov 22, 2025
d9a8da0
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 22, 2025
cd4c14c
Redeclared broken imported enum
Sukairo-02 Nov 22, 2025
235d758
Merge commit 'cd4c14cd1801162974f25e7f92c318e30e4bc919' into alternat…
AlexBlokh Nov 22, 2025
1fe094b
+
AlexBlokh Nov 22, 2025
50496ba
+
AlexBlokh Nov 22, 2025
5049094
fix pg tests
AlexBlokh Nov 22, 2025
26b9925
Planetscale test cases fix
Sukairo-02 Nov 22, 2025
b508f21
+
AlexBlokh Nov 22, 2025
c21aa08
Merge commit '26b9925c9992b47a924b40c688566a6c76fd243d' into alternat…
AlexBlokh Nov 22, 2025
e7c2202
--init migration tests to end
AlexBlokh Nov 22, 2025
3f69947
Fixed PGJS migrator --init tests
Sukairo-02 Nov 22, 2025
68a7aed
Fixed pg-proxy migrate --init tests
Sukairo-02 Nov 22, 2025
c34af85
+
AlexBlokh Nov 22, 2025
664ca08
Merge remote-tracking branch 'origin/alternation-engine' into alterna…
AlexBlokh Nov 22, 2025
db03f99
+
AlexBlokh Nov 22, 2025
ec2e97b
+
AlexBlokh Nov 22, 2025
3499570
+
AlexBlokh Nov 24, 2025
fbaac7c
[mssql]: introspect fix
AleksandrSherman Nov 24, 2025
cea292e
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
AleksandrSherman Nov 24, 2025
980c6f7
[update-kit]: explain for all dialects except sqlite
AleksandrSherman Nov 24, 2025
0031ef1
Removed typings from `cockroach-core`
Sukairo-02 Nov 25, 2025
114eebb
Removed deprecated driver constructor overload
Sukairo-02 Nov 25, 2025
ef0d044
Fixed invalid typings removal logic
Sukairo-02 Nov 25, 2025
23a5c57
[sqlite]: explain
AleksandrSherman Nov 25, 2025
fd79c4c
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
AleksandrSherman Nov 25, 2025
7253e03
[sqlite]: explain
AleksandrSherman Nov 25, 2025
6e4e345
[sqlite]: explain
AleksandrSherman Nov 25, 2025
88e491c
[sqlite]: push - explain
AleksandrSherman Nov 25, 2025
d0591b8
fix libsql for push command
AlexBlokh Nov 25, 2025
b2af4f4
Merge branch 'beta' of https://github.com/drizzle-team/drizzle-orm in…
Sukairo-02 Nov 26, 2025
050dff2
Additional merge-related changes
Sukairo-02 Nov 26, 2025
87ec5ed
chore: Update SQLite connection message to include '@tursodatabase/da…
RomanNabukhotnyi Nov 26, 2025
5cd119e
chore: Remove '@hono/bun-compress' dependency (Bun already supports C…
RomanNabukhotnyi Nov 26, 2025
f5ce5c0
Fixed missing bun drivers from kit, fixed lack of subquery procession…
Sukairo-02 Nov 26, 2025
9950385
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
Sukairo-02 Nov 26, 2025
ca7f3db
chore: Update SQLite connection message to include 'bun' as an option
RomanNabukhotnyi Nov 26, 2025
e215a4d
chore: Update driversPackages to include additional SQLite drivers
RomanNabukhotnyi Nov 26, 2025
481ccf1
Fixed driver packages list
Sukairo-02 Nov 26, 2025
985c433
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
Sukairo-02 Nov 26, 2025
3065873
fix: Add external dependencies for api build
RomanNabukhotnyi Nov 26, 2025
e3cad09
Fixed broken test cases
Sukairo-02 Nov 26, 2025
04be969
Merge branch 'alternation-engine' of https://github.com/drizzle-team/…
Sukairo-02 Nov 26, 2025
d73ffa5
fix: Update release routing logic
RomanNabukhotnyi Nov 26, 2025
c747029
fix: Correct variable usage in release routing logic
RomanNabukhotnyi Nov 26, 2025
84871b1
+
AlexBlokh Nov 27, 2025
1bf9344
[mysql]: suggestions
AleksandrSherman Nov 27, 2025
94e6781
Commutativity
AndriiSherman Nov 27, 2025
facb2aa
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-…
AndriiSherman Nov 27, 2025
f5cec4f
Additional test cases
Sukairo-02 Nov 27, 2025
61e758f
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-…
AndriiSherman Nov 28, 2025
93849ec
Add pull relations to pg
AndriiSherman Nov 28, 2025
7e68218
Merge branch 'alternation-engine' of github.com:drizzle-team/drizzle-…
AndriiSherman Nov 28, 2025
e6f2a19
ignore commutative
AndriiSherman Nov 28, 2025
0291153
ignore commutative
AndriiSherman Nov 28, 2025
fa4e2fe
fix all tests issues
AlexBlokh Nov 29, 2025
39ee5c1
remove .only
AlexBlokh Nov 29, 2025
0ec754e
postpone commutative tests
AlexBlokh Nov 29, 2025
e93475f
Up versions
AndriiSherman Dec 2, 2025
6565b14
[update]: codeql suggestion updates + new tests on generated
AleksandrSherman Dec 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions clean.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { readdirSync, lstatSync, existsSync, rmSync } from "node:fs";
import { join } from "node:path";

const printTree = (path: string, indentation: number) => {
for (const it of readdirSync(path)) {
if (it === "node_modules") continue;
if (it === ".git") continue;
if (it === ".github") continue;
if (it === ".turbo") continue;
if (it === "dist") continue;

const full = join(path, it);
const stat = existsSync(full) ? lstatSync(full) : undefined;
if (!stat) continue;

if (stat.isDirectory()) {
printTree(full, indentation + 1);
} else {
if (
full.endsWith(".js") &&
existsSync(full.replace(".js", ".js.map")) &&
existsSync(full.replace(".js", ".ts"))
) {
console.log(full);
rmSync(full);
rmSync(full.replace(".js", ".js.map"));
}
}
}
};

// I've accidentally ran tsc which generated .d.ts files for all ts files in repo
// printTree(".");
3 changes: 3 additions & 0 deletions drizzle-kit/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@

!src
!imports-checker

!tests
tests/**/tmp/
!vitest.config.ts
!README.md
!CONTRIBUTING.md
Expand All @@ -19,6 +21,7 @@
!.github
!build.ts
!build.dev.ts
!build.ext.ts

tests/test.ts

Expand Down
54 changes: 54 additions & 0 deletions drizzle-kit/build.ext.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
import * as tsup from 'tsup';
// import { readFileSync, writeFileSync } from 'node:fs';

const main = async () => {
// await tsup.build({
// entryPoints: ['./src/utils/studio.ts'],
// outDir: './dist',
// external: [],
// splitting: false,
// dts: true,
// platform: 'browser',
// format: ['esm'],
// });

await tsup.build({
entryPoints: ['./src/utils/studio-sqlite.ts'],
outDir: './dist',
external: [],
splitting: false,
dts: true,
platform: 'browser',
format: ['esm'],
});

await tsup.build({
entryPoints: ['./src/utils/studio-postgres.ts'],
outDir: './dist',
external: [],
splitting: false,
dts: true,
platform: 'browser',
format: ['esm'],
});

await tsup.build({
entryPoints: ['./src/utils/mover-postgres.ts','./src/utils/mover-mysql.ts'],
outDir: './dist',
external: [],
splitting: false,
dts: true,
platform: 'browser',
format: ['esm'],
});
};

main().then(() => {
process.exit(0);
}).catch((e) => {
console.error(e);
process.exit(1);
});

// const apiCjs = readFileSync('./dist/api.js', 'utf8').replace(/await import\(/g, 'require(');
// writeFileSync('./dist/api.js', apiCjs);
7 changes: 4 additions & 3 deletions drizzle-kit/imports-checker/analyze.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@ function init(collection: CollectionItem[]) {

ImportExpr_From(kImport, importInner, kFrom, importSource) {
const ruleName = importInner.children[0]!.ctorName;
const importType = ruleName === 'ImportInner_Type' || ruleName === 'ImportInner_Types'
? 'types'
: 'data';
const importType =
ruleName === 'ImportInner_Type' || ruleName === 'ImportInner_Types' || ruleName === 'ImportInner_AllTypes'
? 'types'
: 'data';

collection.push({
source: importSource.children[1]!.sourceString!,
Expand Down
3 changes: 2 additions & 1 deletion drizzle-kit/imports-checker/grammar/grammar.ohm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ JSImports {
ImportInner =
| ("type" "{" NonemptyListOf<ImportExtendedSelectionTypeless, ","> ","? "}") -- Type
| ("{" NonemptyListOf<ImportExtendedSelectionTypes, ","> ","? "}") -- Types
| ("type " "*") -- AllTypes
| ("{" NonemptyListOf<ImportExtendedSelection, ","> ","? "}") -- Extended
| (identifier ("," "type"? "{" NonemptyListOf<ImportExtendedSelection, ","> ","? "}")?) -- Mixed
| ("*" ("as" identifier)?) -- All
Expand All @@ -29,7 +30,7 @@ JSImports {
Import = identifier ("as" identifier)?
TypeImport = "type" Import ("as" identifier)?

identifier = letter alnum*
identifier = (letter | "_" | "$" | "~" ) (alnum | "_" | "$" | "~")*
quote = "\"" | "'" | "`"
notQuote = ~quote any
importSource =
Expand Down
3 changes: 2 additions & 1 deletion drizzle-kit/imports-checker/grammar/grammar.ohm-bundle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface JSImportsActionDict<T> extends BaseActionDict<T> {
arg2: IterationNode,
arg3: TerminalNode,
) => T;
ImportInner_AllTypes?: (this: NonterminalNode, arg0: TerminalNode, arg1: TerminalNode) => T;
ImportInner_Extended?: (
this: NonterminalNode,
arg0: TerminalNode,
Expand Down Expand Up @@ -62,7 +63,7 @@ export interface JSImportsActionDict<T> extends BaseActionDict<T> {
arg2: IterationNode,
arg3: IterationNode,
) => T;
identifier?: (this: NonterminalNode, arg0: NonterminalNode, arg1: IterationNode) => T;
identifier?: (this: NonterminalNode, arg0: NonterminalNode | TerminalNode, arg1: IterationNode) => T;
quote?: (this: NonterminalNode, arg0: TerminalNode) => T;
notQuote?: (this: NonterminalNode, arg0: NonterminalNode) => T;
importSource?: (this: NonterminalNode, arg0: TerminalNode, arg1: IterationNode, arg2: TerminalNode) => T;
Expand Down
Loading
Loading