Skip to content

Commit 47ba9c8

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 4e61887 + c66862c commit 47ba9c8

File tree

19 files changed

+307
-119
lines changed

19 files changed

+307
-119
lines changed

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

Lines changed: 20 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -329,37 +329,25 @@ jobs:
329329
permissions:
330330
contents: read
331331
id-token: write
332+
# force empty so npm can use OIDC
333+
env:
334+
NODE_AUTH_TOKEN: ""
335+
NPM_TOKEN: ""
332336
steps:
333-
- uses: actions/checkout@v4
334-
335-
- uses: actions/setup-node@v4
336-
with:
337-
node-version: '22'
338-
registry-url: 'https://registry.npmjs.org'
339-
340-
- uses: pnpm/action-setup@v3
341-
name: Install pnpm
342-
id: pnpm-install
343-
with:
344-
version: latest
345-
run_install: false
346-
347-
- name: Get pnpm store directory
348-
id: pnpm-cache
349-
shell: bash
350-
run: |
351-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
352-
353-
- uses: actions/cache@v4
354-
name: Setup pnpm cache
355-
with:
356-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
357-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
358-
restore-keys: |
359-
${{ runner.os }}-pnpm-store-
360-
361-
- name: Install dependencies
362-
run: pnpm install
337+
- uses: actions/checkout@v5
338+
- uses: pnpm/action-setup@v4
339+
with: { run_install: false }
340+
- uses: actions/setup-node@v6
341+
with: { node-version: '24', cache: 'pnpm', cache-dependency-path: pnpm-lock.yaml }
342+
- run: pnpm install --frozen-lockfile --prefer-offline
343+
344+
# >= 11.5.1 for trusted publishing
345+
- name: Update NPM
346+
run: npm install -g npm@latest
347+
348+
# nuke, so npm can use OIDC
349+
- name: Remove temp npmrc
350+
run: rm -f "$NPM_CONFIG_USERCONFIG"
363351

364352
- name: Check preconditions
365353
id: checks
@@ -374,7 +362,6 @@ jobs:
374362
375363
if [[ "$is_version_published" == "true" ]]; then
376364
echo "\`${{ matrix.package }}$version\` already published, adding tag \`$tag\`" >> $GITHUB_STEP_SUMMARY
377-
npm dist-tag add ${{ matrix.package }}@$version $tag
378365
else
379366
{
380367
echo "version=$version"
@@ -411,4 +398,5 @@ jobs:
411398
echo "npm: \`${{ matrix.package }}@$tag | ${{ matrix.package }}@$version\`" >> $GITHUB_STEP_SUMMARY
412399
413400
# Post release message to Discord
414-
# curl -X POST -H "Content-Type: application/json" -d "{\"embeds\": [{\"title\": \"New \`${{ matrix.package }}\` release! 🎉\", \"url\": \"https://www.npmjs.com/package/${{ matrix.package }}/v/$version\", \"color\": \"12907856\", \"fields\": [{\"name\": \"Version\", \"value\": \"\`$version\`\"}, {\"name\": \"Tag\", \"value\": \"\`$tag\`\"}]}]}" ${{ secrets.DISCORD_DEV_RELEASE_WEBHOOK_URL }}
401+
# curl -X POST -H "Content-Type: application/json" -d "{\"embeds\": [{\"title\": \"New \`${{ matrix.package }}\` release! 🎉\", \"url\": \"https://www.npmjs.com/package/${{ matrix.package }}/v/$version\", \"color\": \"12907856\", \"fields\": [{\"name\": \"Version\", \"value\": \"\`$version\`\"}, {\"name\": \"Tag\", \"value\": \"\`$tag\`\"}]}]}" ${{ secrets.DISCORD_DEV_RELEASE_WEBHOOK_URL }}
402+

.github/workflows/release-latest.yaml

Lines changed: 22 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ jobs:
286286
run: bunx attw package.tgz
287287

288288
release:
289-
permissions: write-all
289+
permissions:
290+
contents: read
291+
id-token: write
290292
needs:
291293
- test
292294
- attw
@@ -303,6 +305,10 @@ jobs:
303305
- drizzle-arktype
304306
- eslint-plugin-drizzle
305307
runs-on: ubuntu-22.04
308+
# force empty so npm can use OIDC
309+
env:
310+
NODE_AUTH_TOKEN: ""
311+
NPM_TOKEN: ""
306312
services:
307313
postgres-postgis:
308314
image: postgis/postgis:16-3.4
@@ -356,36 +362,20 @@ jobs:
356362
ports:
357363
- 33306:3306
358364
steps:
359-
- uses: actions/checkout@v4
360-
361-
- uses: actions/setup-node@v4
362-
with:
363-
node-version: '22'
364-
registry-url: 'https://registry.npmjs.org'
365-
366-
- uses: pnpm/action-setup@v3
367-
name: Install pnpm
368-
id: pnpm-install
369-
with:
370-
version: latest
371-
run_install: false
372-
373-
- name: Get pnpm store directory
374-
id: pnpm-cache
375-
shell: bash
376-
run: |
377-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
378-
379-
- uses: actions/cache@v4
380-
name: Setup pnpm cache
381-
with:
382-
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
383-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
384-
restore-keys: |
385-
${{ runner.os }}-pnpm-store-
386-
387-
- name: Install dependencies
388-
run: pnpm install
365+
- uses: actions/checkout@v5
366+
- uses: pnpm/action-setup@v4
367+
with: { run_install: false }
368+
- uses: actions/setup-node@v6
369+
with: { node-version: '24', cache: 'pnpm', cache-dependency-path: pnpm-lock.yaml }
370+
- run: pnpm install --frozen-lockfile --prefer-offline
371+
372+
# >= 11.5.1 for trusted publishing
373+
- name: Update NPM
374+
run: npm install -g npm@latest
375+
376+
# nuke, so npm can use OIDC
377+
- name: Remove temp npmrc
378+
run: rm -f "$NPM_CONFIG_USERCONFIG"
389379

390380
- name: Check preconditions
391381
id: checks
@@ -398,7 +388,6 @@ jobs:
398388
399389
if [[ "$is_version_published" == "true" ]]; then
400390
echo "\`${{ matrix.package }}@$version\` already published, adding tag \`latest\`" >> $GITHUB_STEP_SUMMARY
401-
npm dist-tag add ${{ matrix.package }}@$version latest
402391
elif [[ "$latest" != "$version" ]]; then
403392
echo "Latest: $latest"
404393
echo "Current: $version"
@@ -432,16 +421,12 @@ jobs:
432421
if: steps.checks.outputs.has_new_release == 'true'
433422
working-directory: ${{ matrix.package }}
434423
shell: bash
435-
env:
436-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
437424
run: npm run pack
438-
425+
439426
- name: Publish
440427
if: steps.checks.outputs.has_new_release == 'true'
441428
working-directory: ${{ matrix.package }}
442429
shell: bash
443-
env:
444-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
445430
run: |
446431
version="${{ steps.checks.outputs.version }}"
447432

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
Drizzle is a modern TypeScript ORM developers [wanna use in their next project](https://stateofdb.com/tools/drizzle).
2020
It is [lightweight](https://bundlephobia.com/package/drizzle-orm) at only ~7.4kb minified+gzipped, and it's tree shakeable with exactly 0 dependencies.
2121

22-
**Drizzle supports every PostgreSQL, MySQL and SQLite database**, including serverless ones like [Turso](https://orm.drizzle.team/docs/get-started-sqlite#turso), [Neon](https://orm.drizzle.team/docs/get-started-postgresql#neon), [Xata](xata.io), [PlanetScale](https://orm.drizzle.team/docs/get-started-mysql#planetscale), [Cloudflare D1](https://orm.drizzle.team/docs/get-started-sqlite#cloudflare-d1), [FlyIO LiteFS](https://fly.io/docs/litefs/), [Vercel Postgres](https://orm.drizzle.team/docs/get-started-postgresql#vercel-postgres), [Supabase](https://orm.drizzle.team/docs/get-started-postgresql#supabase) and [AWS Data API](https://orm.drizzle.team/docs/get-started-postgresql#aws-data-api). No bells and whistles, no Rust binaries, no serverless adapters, everything just works out of the box.
22+
**Drizzle supports every PostgreSQL, MySQL and SQLite database**, including serverless ones like [Turso](https://orm.drizzle.team/docs/get-started-sqlite#turso), [Neon](https://orm.drizzle.team/docs/get-started-postgresql#neon), [Xata](https://orm.drizzle.team/docs/connect-xata), [PlanetScale](https://orm.drizzle.team/docs/get-started-mysql#planetscale), [Cloudflare D1](https://orm.drizzle.team/docs/get-started-sqlite#cloudflare-d1), [FlyIO LiteFS](https://fly.io/docs/litefs/), [Vercel Postgres](https://orm.drizzle.team/docs/get-started-postgresql#vercel-postgres), [Supabase](https://orm.drizzle.team/docs/get-started-postgresql#supabase) and [AWS Data API](https://orm.drizzle.team/docs/get-started-postgresql#aws-data-api). No bells and whistles, no Rust binaries, no serverless adapters, everything just works out of the box.
2323

2424
**Drizzle is serverless-ready by design**. It works in every major JavaScript runtime like NodeJS, Bun, Deno, Cloudflare Workers, Supabase functions, any Edge runtime, and even in browsers.
2525
With Drizzle you can be [**fast out of the box**](https://orm.drizzle.team/benchmarks) and save time and costs while never introducing any data proxies into your infrastructure.

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-orm/0.44.7.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- fix durable sqlite transaction return value #3746 - thanks @joaocstro

drizzle-kit/build.ts

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ esbuild.buildSync({
8282

8383
const main = async () => {
8484
await tsup.build({
85-
entryPoints: ['./src/index.ts', './src/api.ts'],
85+
entryPoints: ['./src/index.ts'],
8686
outDir: './dist',
8787
external: ['bun:sqlite'],
8888
splitting: false,
@@ -102,6 +102,39 @@ const main = async () => {
102102
},
103103
});
104104

105+
await tsup.build({
106+
entryPoints: ['./src/api.ts'],
107+
outDir: './dist',
108+
external: ['bun:sqlite'],
109+
splitting: false,
110+
dts: true,
111+
format: ['cjs', 'esm'],
112+
banner: (ctx) => {
113+
/**
114+
* fix dynamic require in ESM ("glob" -> "fs.realpath" requires 'fs' module)
115+
* @link https://github.com/drizzle-team/drizzle-orm/issues/2853
116+
*/
117+
if (ctx.format === 'esm') {
118+
return {
119+
js: "import { createRequire } from 'module'; const require = createRequire(import.meta.url);",
120+
};
121+
}
122+
return undefined;
123+
},
124+
outExtension: (ctx) => {
125+
if (ctx.format === 'cjs') {
126+
return {
127+
dts: '.d.ts',
128+
js: '.js',
129+
};
130+
}
131+
return {
132+
dts: '.d.mts',
133+
js: '.mjs',
134+
};
135+
},
136+
});
137+
105138
const apiCjs = readFileSync('./dist/api.js', 'utf8').replace(/await import\(/g, 'require(');
106139
writeFileSync('./dist/api.js', apiCjs);
107140
};

drizzle-kit/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "drizzle-kit",
3-
"version": "0.31.5",
3+
"version": "0.31.7",
44
"homepage": "https://orm.drizzle.team",
55
"keywords": [
66
"drizzle",

0 commit comments

Comments
 (0)