refactor(telemetry): add standalone telemetry for create-sanity#1018
refactor(telemetry): add standalone telemetry for create-sanity#1018mttdnt wants to merge 5 commits intofeat/bundled-create-sanity-rebasedfrom
Conversation
|
This change is part of the following stack: Change managed by git-spice. |
|
Claude finished @binoy14's task in 3m 2s —— View job PR Review
Missing changesetNo changeset is present in this PR's diff. The previous The bump type (minor) and summary were appropriate. The squiggler bot auto-created and then removed a replacement ( Everything else looks good — logic, test coverage, and implementation are clean. |
📦 Bundle Stats —
|
| Metric | Value | vs feat/bundled-create-sanity-rebased (2583989) |
|---|---|---|
| Internal (raw) | 2.1 KB | - |
| Internal (gzip) | 799 B | - |
| Bundled (raw) | 1.54 MB | - |
| Bundled (gzip) | 395.0 KB | - |
| Import time | 771ms | -1ms, -0.1% |
bin:sanity
| Metric | Value | vs feat/bundled-create-sanity-rebased (2583989) |
|---|---|---|
| Internal (raw) | 975 B | - |
| Internal (gzip) | 460 B | - |
| Bundled (raw) | 9.84 MB | - |
| Bundled (gzip) | 1.77 MB | - |
| Import time | 1.76s | -22ms, -1.2% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — @sanity/cli-core
Compared against feat/bundled-create-sanity-rebased (25839893)
| Metric | Value | vs feat/bundled-create-sanity-rebased (2583989) |
|---|---|---|
| Internal (raw) | 98.0 KB | - |
| Internal (gzip) | 23.3 KB | - |
| Bundled (raw) | 21.63 MB | - |
| Bundled (gzip) | 3.43 MB | - |
| Import time | 740ms | +11ms, +1.5% |
🗺️ View treemap · Artifacts
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
📦 Bundle Stats — create-sanity
Compared against feat/bundled-create-sanity-rebased (25839893)
| Metric | Value | vs feat/bundled-create-sanity-rebased (2583989) |
|---|---|---|
| Internal (raw) | 2.25 MB | +146.2 KB, +6.8% |
| Internal (gzip) | 531.4 KB | +38.1 KB, +7.7% |
| Bundled (raw) | 2.25 MB | +146.6 KB, +6.8% |
| Bundled (gzip) | 531.4 KB | +38.1 KB, +7.7% |
| Import time | ❌ --output-path must be specified in unattended mode |
- |
Details
- Import time regressions over 10% are flagged with
⚠️ - Sizes shown as raw / gzip 🗜️. Internal bytes = own code only. Total bytes = with all dependencies. Import time = Node.js cold-start median.
02d7b28 to
dcc9323
Compare
e023fe6 to
7b272c6
Compare
dcc9323 to
d705c00
Compare
48cb05b to
df29e68
Compare
|
I'll analyze this and get back to you. |
Reapply PR #892 on top of the rebased bundled-create branch. Replaces the noop telemetry store with real standalone telemetry for create-sanity, including telemetry disclosure and error reporting. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
4d826fc to
1c91fe5
Compare
Coverage Delta
Comparing 26 changed files against main @ Overall Coverage
|

Description
Reapply of #892 on top of #1011. Adds real telemetry to
create-sanityso we get the same usage/error data as the oclif CLI, without pulling in oclif as a dependency.setupStandaloneTelemetry— mirrors the oclif prerun hook without the oclif dependency, flushes inline with a 3s timeout instead of a detached workertelemetryDisclosureStandaloneand unifytelemetryDisclosureto re-export it--helpexits without showing the disclosure banner (parity with oclif where--helpruns before the prerun hook)output.errorthrowsInitErrorso errors flush through the same catch pathnoopTelemetry.tsWhat to review
packages/@sanity/cli/src/util/telemetry/setupStandaloneTelemetry.ts— standalone telemetry setuppackages/@sanity/cli/src/actions/telemetry/telemetryDisclosureStandalone.ts— oclif-free disclosurepackages/create-sanity/src/index.ts— restructured to parse args first, then setup telemetrypackages/create-sanity/src/version.ts— version info for telemetryTesting
setupStandaloneTelemetryandtelemetryDisclosureStandalone