-
-
Notifications
You must be signed in to change notification settings - Fork 12
merge dev to main (v3.0.0-beta.3) #238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* chore: fix telemetry token * update * update * try again * update * update * update * update * update * update * update * fix
Co-authored-by: ymc9 <[email protected]>
WalkthroughAdds a new CLI post-build script and updates CI workflows to invoke it. Moves telemetry token replacement from tsup’s onSuccess hook to the standalone script. Bumps package versions to 3.0.0-beta.3 across the repo. Updates sql.js package exports to include ./package.json. Minor doc note added. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR merges dev to main and upgrades the project version from 3.0.0-beta.2 to 3.0.0-beta.3 across all packages while refactoring the CLI build process to use a dedicated post-build script for telemetry token injection.
- Version bump from 3.0.0-beta.2 to 3.0.0-beta.3 across all packages
- Refactored CLI build telemetry handling from tsup config to dedicated post-build script
- Added package.json export for sql.js dialect package
Reviewed Changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json (root + packages) | Version bump to 3.0.0-beta.3 |
| packages/cli/tsup.config.ts | Removed onSuccess telemetry handling |
| packages/cli/scripts/post-build.ts | New dedicated script for telemetry token replacement |
| packages/dialects/sql.js/package.json | Added package.json export alongside version bump |
| .github/workflows/*.yml | Updated CI workflows to run post-build script |
| CLAUDE.md | Added note about VSCode package versioning |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Claude finished @ymc9's task —— View job Pull Request ReviewReviewing this PR that merges dev to main with version bump to 3.0.0-beta.3 and CLI build refactoring. Review Tasks
🔍 Review Findings✅ Strengths
🏗️ CLI Build Refactoring Analysis -
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (6)
packages/cli/package.json (1)
6-6: Version bump looks good; consider wiring post-build via npm lifecycle for local builds.Since telemetry token replacement moved to a standalone script, add a
postbuildto ensurepnpm buildlocally also performs substitution (not only CI)."scripts": { - "build": "tsc --noEmit && tsup-node", + "build": "tsc --noEmit && tsup-node", + "postbuild": "tsx scripts/post-build.ts", "watch": "tsup-node --watch",CLAUDE.md (1)
85-85: Tighten wording for clarity.Small grammar tweak and remove quotes around the package path.
-- 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. +- The ide/vscode package is intentionally versioned differently from the rest because the VSCode marketplace disallows pre-release versions.packages/dialects/sql.js/package.json (1)
28-32: Nit: simplify package.json export.
You can map "./package.json" directly without import/require conditions; Node and bundlers resolve it fine and it’s shorter.Apply this diff:
}, - "./package.json": { - "import": "./package.json", - "require": "./package.json" - } + "./package.json": "./package.json"packages/cli/scripts/post-build.ts (1)
7-9: Decide policy when TELEMETRY_TRACKING_TOKEN is missing.
Warning-only may ship placeholders; consider an opt-in enforcement for release contexts.Apply this diff to optionally enforce via an env flag:
if (!token) { - console.warn('TELEMETRY_TRACKING_TOKEN is not set.'); + console.warn('TELEMETRY_TRACKING_TOKEN is not set.'); + if (process.env.ENFORCE_TELEMETRY_TOKEN === '1') { + throw new Error('TELEMETRY_TRACKING_TOKEN is required but missing'); + } }.github/workflows/build-test.yml (1)
71-73: Centralize post-build step
Move the inline tsx invocation into a shared repo script (tsx is already installed at root at version ^4.20.3).- run: | - pnpm run build - pnpm tsx packages/cli/scripts/post-build.ts + run: | + pnpm run build + pnpm run postbuild:telemetryAdd to the root package.json:
{ "scripts": { "postbuild:telemetry": "tsx packages/cli/scripts/post-build.ts" } }.github/workflows/publish-release.yml (1)
39-41: Mirror centralization and add guardrails for releases.
- Reuse a repo script for the post-build.
- Optionally fail early if the token is required for published artifacts.
Change this step:
- run: | - pnpm run build - pnpm tsx packages/cli/scripts/post-build.ts + run: | + pnpm run build + pnpm run postbuild:telemetryOptionally enforce token for releases (before Build):
- name: Ensure telemetry token is set (optional) if: github.ref == 'refs/heads/main' run: | if [ -z "${TELEMETRY_TRACKING_TOKEN}" ]; then echo "TELEMETRY_TRACKING_TOKEN is required for release"; exit 1; fiAdd a verification step after Build:
- name: Verify telemetry token substitution run: rg -n "<TELEMETRY_TRACKING_TOKEN>" packages/cli/dist && exit 1 || true
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (21)
.github/workflows/build-test.yml(1 hunks).github/workflows/publish-release.yml(1 hunks)CLAUDE.md(1 hunks)package.json(1 hunks)packages/cli/package.json(1 hunks)packages/cli/scripts/post-build.ts(1 hunks)packages/cli/tsup.config.ts(0 hunks)packages/common-helpers/package.json(1 hunks)packages/create-zenstack/package.json(1 hunks)packages/dialects/sql.js/package.json(2 hunks)packages/eslint-config/package.json(1 hunks)packages/language/package.json(1 hunks)packages/runtime/package.json(1 hunks)packages/sdk/package.json(1 hunks)packages/tanstack-query/package.json(1 hunks)packages/testtools/package.json(1 hunks)packages/typescript-config/package.json(1 hunks)packages/vitest-config/package.json(1 hunks)packages/zod/package.json(1 hunks)samples/blog/package.json(1 hunks)tests/e2e/package.json(1 hunks)
💤 Files with no reviewable changes (1)
- packages/cli/tsup.config.ts
🧰 Additional context used
📓 Path-based instructions (2)
{packages,samples,tests}/**
📄 CodeRabbit inference engine (CLAUDE.md)
Packages are located in
packages/,samples/, andtests/
Files:
packages/typescript-config/package.jsonsamples/blog/package.jsonpackages/testtools/package.jsonpackages/tanstack-query/package.jsonpackages/sdk/package.jsonpackages/vitest-config/package.jsonpackages/eslint-config/package.jsonpackages/zod/package.jsontests/e2e/package.jsonpackages/runtime/package.jsonpackages/common-helpers/package.jsonpackages/dialects/sql.js/package.jsonpackages/cli/package.jsonpackages/create-zenstack/package.jsonpackages/cli/scripts/post-build.tspackages/language/package.json
tests/e2e/**
📄 CodeRabbit inference engine (CLAUDE.md)
E2E tests are in
tests/e2e/directory
Files:
tests/e2e/package.json
🧠 Learnings (2)
📚 Learning: 2025-08-04T08:43:33.161Z
Learnt from: CR
PR: zenstackhq/zenstack-v3#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T08:43:33.161Z
Learning: Database migrations still use Prisma CLI under the hood
Applied to files:
CLAUDE.md
📚 Learning: 2025-08-04T08:43:33.161Z
Learnt from: CR
PR: zenstackhq/zenstack-v3#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-04T08:43:33.161Z
Learning: `zenstack generate` compiles ZModel to TypeScript schema (`schema.ts`)
Applied to files:
packages/language/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: claude-review
- GitHub Check: build-test (20.x)
🔇 Additional comments (15)
packages/eslint-config/package.json (1)
3-3: LGTM: version bump onlyPrivate package; no publish surface impact. All good.
packages/sdk/package.json (1)
3-3: LGTM: version aligned to beta.3No other changes; workspace dependencies remain unaffected.
samples/blog/package.json (1)
3-3: LGTM: sample app version bumpNo runtime/build script changes here; safe.
packages/testtools/package.json (1)
3-3: LGTM: testtools version bumpExports/peer deps unchanged; good to go.
packages/typescript-config/package.json (1)
3-3: LGTM: version bump only.packages/create-zenstack/package.json (1)
3-3: LGTM: version bump only.packages/common-helpers/package.json (2)
3-3: Version bump looks good.No behavioral changes here; safe metadata update.
3-3: Release bump verified; CI post-build and tsup hook removal confirmed.All package.json versions align with 3.0.0-beta.3 (excluding the intentional VSCode extension), workflows invoke the new post-build script, and the onSuccess hook is absent.
packages/vitest-config/package.json (1)
4-4: LGTM on version bump.Matches the repo-wide pre-release versioning.
tests/e2e/package.json (1)
3-3: E2E package version bump approved.No script/dependency changes; safe.
packages/runtime/package.json (1)
3-3: Runtime package version bump looks good.No export/deps changes; API surface unaffected.
packages/zod/package.json (1)
3-3: Zod adapter version bump approved.No functional changes introduced here.
packages/tanstack-query/package.json (1)
3-3: Version bump to beta.3 looks good.
No further concerns from this file.packages/dialects/sql.js/package.json (1)
3-3: Version bump to beta.3 looks good.
No issues spotted.packages/cli/scripts/post-build.ts (1)
14-20: Replace content.replace with replaceAll and verify post-build artifacts
Use a placeholder check andreplaceAll(logging a warning if missing). After updating, run the CLI build (e.g.npm run build --workspace packages/clior equivalent) then:rg -n '<TELEMETRY_TRACKING_TOKEN>' packages/cli/distto confirm no placeholders remain.
Summary by CodeRabbit
New Features
Documentation
Chores