Skip to content

Conversation

AtofStryker
Copy link
Contributor

@AtofStryker AtofStryker commented Oct 1, 2025

  • Closes N/A

Additional details

Makes @packages/telemetry an independent bundle. This change, similar to #32633, builds @packages/telemetry with 3 entry points:

  • a node commonjs entrypoint for server code
  • a node esm entrypoint for server code (not used and is not emitted)
  • a browser esm entrypoint to be used in browser based code in the browser directory.

We are somewhat limited with an older moduleResolution and can't leverage exports similar to the CLI, the best we can do is use rollup to move/rename the compiled browser bundle (NOTE: node_modules dependencies are external and will be resolved by the package) to have a browser entry point, and omit the client file in the node build.

We bundle delcarations with the code so we don't have to worry about type checking the telemetry package in other extraneous monorepo packages as we are no longer importing from source

TODO: needs to be tested with the telemetry client

Steps to test

How has the user experience changed?

PR Tasks


Note

Restructures @packages/telemetry into separate CJS/ESM/browser builds and switches all browser imports to @packages/telemetry/browser/client, with docs/tests and minor proxy handling updates.

  • Telemetry packaging:
    • Introduce separate build targets: cjs/ (Node CJS), esm/ (Node ESM), and bundled browser/client (Rollup).
    • Update package.json (main/types/module, build scripts), add Rollup config and tsconfigs; remove TS runtime index.js loader.
    • Refactor internal paths (src/telemetry/index.ts), adjust TelemetryNoop typings.
  • Consumers:
    • Replace browser imports @packages/telemetry/src/browser@packages/telemetry/browser/client in packages/app, driver, and runner telemetry events.
  • Docs:
    • Update README examples to new browser import and add bundling notes; mark packages/telemetry as completed in ESM migration guide.
  • Tests:
    • Point tests to new entry points and adjust options (e.g., isVerbose).
  • Proxy:
    • Guard span param in network-proxy.ts (span || undefined).
  • Dependencies:
    • Add Rollup/typescript plugins and lockfile updates.

Written by Cursor Bugbot for commit 5262613. This will update automatically on new commits. Configure here.

Copy link

cypress bot commented Oct 1, 2025

cypress    Run #66234

Run Properties:  status check failed Failed #66234  •  git commit 52626131ff: chore: make the @packages/telemetry an independent bundle without needed ts-node...
Project cypress
Branch Review chore/bundle_telemetry
Run status status check failed Failed #66234
Run duration 20m 01s
Commit git commit 52626131ff: chore: make the @packages/telemetry an independent bundle without needed ts-node...
Committer Bill Glesias
View all properties for this run ↗︎

Test results
Tests that failed  Failures 1
Tests that were flaky  Flaky 15
Tests that did not run due to a developer annotating a test with .skip  Pending 1102
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 26690
View all changes introduced in this branch ↗︎

Warning

Partial Report: The results for the Application Quality reports may be incomplete.

UI Coverage  45.11%
  Untested elements 186  
  Tested elements 157  
Accessibility  97.96%
  Failed rules  4 critical   8 serious   2 moderate   2 minor
  Failed elements 101  

Tests for review

Failed  cypress/e2e/studio/studio.cy.ts • 1 failed test • app-e2e

View Output

Test Artifacts
Cypress Studio > creates a new test from an empty spec Test Replay Screenshots
Flakiness  issues/28527.cy.ts • 1 flaky test • 5x-driver-electron

View Output

Test Artifacts
issue 28527 > fails and then retries and verifies about:blank is not displayed Test Replay Screenshots
Flakiness  e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-inject-document-domain-chrome

View Output

Test Artifacts
cy.origin- Cypress.config() > serializable > overwrites different values in secondary if one exists in the primary Test Replay
Flakiness  commands/waiting.cy.js • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
... > errors > throws when waiting for 2nd response to route Test Replay
Flakiness  e2e/origin/config_env.cy.ts • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
cy.origin- Cypress.config() > serializable > overwrites different values in secondary if one exists in the primary Test Replay
Flakiness  issues/28527.cy.ts • 1 flaky test • 5x-driver-chrome:beta

View Output

Test Artifacts
issue 28527 > fails and then retries and verifies about:blank is not displayed Test Replay Screenshots

The first 5 flaky specs are shown, see all 15 specs in Cypress Cloud.

@AtofStryker AtofStryker changed the title chore(DRAFT): make the @packages/telemetry an independent bundle chore(DRAFT): make the @packages/telemetry an independent bundle Oct 6, 2025
…ded ts-node to register entrypoint. Both ESM and CJS distributions are built and types are used as source to be compatible with older styles of commonjs bundling. Types are not shipped with the package.
@AtofStryker AtofStryker force-pushed the chore/bundle_telemetry branch from 611d915 to 5262613 Compare October 7, 2025 00:34
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "node",
"noEmit": true
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: ESM Build Fails Due to noEmit Setting

The tsconfig.esm.json has "noEmit": true, which prevents the ESM build from generating its expected output files in the esm/ directory. This means the intended ESM package build won't produce its artifacts.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant