Skip to content

Commit 28ab57b

Browse files
authored
Merge pull request #238 from zenstackhq/dev
merge dev to main (v3.0.0-beta.3)
2 parents a115040 + 0f9764f commit 28ab57b

File tree

21 files changed

+47
-35
lines changed

21 files changed

+47
-35
lines changed

.github/workflows/build-test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,9 @@ jobs:
6868
run: pnpm install --frozen-lockfile
6969

7070
- name: Build
71-
run: pnpm run build
71+
run: |
72+
pnpm run build
73+
pnpm tsx packages/cli/scripts/post-build.ts
7274
7375
- name: Lint
7476
run: pnpm run lint

.github/workflows/publish-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ jobs:
3636
run: pnpm install --frozen-lockfile
3737

3838
- name: Build
39-
run: pnpm run build
39+
run: |
40+
pnpm run build
41+
pnpm tsx packages/cli/scripts/post-build.ts
4042
4143
- name: Get version from package.json
4244
id: version

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,3 +82,4 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
8282
- Database migrations still use Prisma CLI under the hood
8383
- Plugin system allows interception at ORM, Kysely, and entity mutation levels
8484
- Computed fields are evaluated at database level for performance
85+
- The "ide/vscode" package by-design has a different version from the rest of the packages as VSCode doesn't allow pre-release versions in its marketplace.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "zenstack-v3",
3-
"version": "3.0.0-beta.2",
3+
"version": "3.0.0-beta.3",
44
"description": "ZenStack",
55
"packageManager": "[email protected]",
66
"scripts": {

packages/cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"publisher": "zenstack",
44
"displayName": "ZenStack CLI",
55
"description": "FullStack database toolkit with built-in access control and automatic API generation.",
6-
"version": "3.0.0-beta.2",
6+
"version": "3.0.0-beta.3",
77
"type": "module",
88
"author": {
99
"name": "ZenStack Team"

packages/cli/scripts/post-build.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import fs from 'node:fs';
2+
import path from 'node:path';
3+
import { fileURLToPath } from 'node:url';
4+
5+
const token = process.env.TELEMETRY_TRACKING_TOKEN ?? '';
6+
7+
if (!token) {
8+
console.warn('TELEMETRY_TRACKING_TOKEN is not set.');
9+
}
10+
11+
const filesToProcess = ['dist/index.js', 'dist/index.cjs'];
12+
const _dirname = path.dirname(fileURLToPath(import.meta.url));
13+
14+
for (const file of filesToProcess) {
15+
console.log(`Processing ${file} for telemetry token...`);
16+
const filePath = path.join(_dirname, '..', file);
17+
const content = fs.readFileSync(filePath, 'utf-8');
18+
const updatedContent = content.replace('<TELEMETRY_TRACKING_TOKEN>', token);
19+
fs.writeFileSync(filePath, updatedContent, 'utf-8');
20+
}

packages/cli/tsup.config.ts

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import fs from 'node:fs';
2-
import path from 'node:path';
31
import { defineConfig } from 'tsup';
42

53
export default defineConfig({
@@ -12,19 +10,4 @@ export default defineConfig({
1210
clean: true,
1311
dts: true,
1412
format: ['esm', 'cjs'],
15-
onSuccess: async () => {
16-
if (!process.env['TELEMETRY_TRACKING_TOKEN']) {
17-
return;
18-
}
19-
const filesToProcess = ['dist/index.js', 'dist/index.cjs'];
20-
for (const file of filesToProcess) {
21-
console.log(`Processing ${file} for telemetry token...`);
22-
const content = fs.readFileSync(path.join(__dirname, file), 'utf-8');
23-
const updatedContent = content.replace(
24-
'<TELEMETRY_TRACKING_TOKEN>',
25-
process.env['TELEMETRY_TRACKING_TOKEN'],
26-
);
27-
fs.writeFileSync(file, updatedContent, 'utf-8');
28-
}
29-
},
3013
});

packages/common-helpers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/common-helpers",
3-
"version": "3.0.0-beta.2",
3+
"version": "3.0.0-beta.3",
44
"description": "ZenStack Common Helpers",
55
"type": "module",
66
"scripts": {

packages/create-zenstack/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-zenstack",
3-
"version": "3.0.0-beta.2",
3+
"version": "3.0.0-beta.3",
44
"description": "Create a new ZenStack project",
55
"type": "module",
66
"scripts": {

packages/dialects/sql.js/package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@zenstackhq/kysely-sql-js",
3-
"version": "3.0.0-beta.2",
3+
"version": "3.0.0-beta.3",
44
"description": "Kysely dialect for sql.js",
55
"type": "module",
66
"scripts": {
@@ -25,6 +25,10 @@
2525
"types": "./dist/index.d.cts",
2626
"default": "./dist/index.cjs"
2727
}
28+
},
29+
"./package.json": {
30+
"import": "./package.json",
31+
"require": "./package.json"
2832
}
2933
},
3034
"devDependencies": {

0 commit comments

Comments
 (0)