Skip to content

fix(package): rewrite published type import paths - #1677

Open
sentry-junior[bot] wants to merge 4 commits into
mainfrom
fix/package-declaration-paths
Open

fix(package): rewrite published type import paths#1677
sentry-junior[bot] wants to merge 4 commits into
mainfrom
fix/package-declaration-paths

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Published package types kept internal @/ imports. Outside this repo, TypeScript could not load those types, so unknown experimental feature names were not rejected.

After type emit, run tsc-alias so @/ imports become normal relative paths. That is the common tool for this job.

After package build, pack the package and typecheck a tiny app: a known experimental feature passes, an unknown one fails.

This is separate from the runtime warn path for unknown experimental features.

Requested by David Cramer.

--

View Junior Session [Sentry]

Emit consumer-resolvable .d.ts by rewriting monorepo @/ imports after tsc, and prove closed experimental keys with a packed consumer typecheck.

Co-Authored-By: David Cramer <david@sentry.io>
@vercel

vercel Bot commented Aug 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 25, 2026 12:16am

Request Review

Keep the rewrite and consumer typecheck, drop extra APIs and scripts.

Co-Authored-By: David Cramer <david@sentry.io>
@sentry-junior sentry-junior Bot changed the title fix(package): rewrite published declaration path aliases fix(package): rewrite published type import paths Aug 24, 2026
@dcramer
dcramer marked this pull request as ready for review August 24, 2026 23:16
@github-actions github-actions Bot added the risk: high PR risk score: high label Aug 24, 2026
Trim two pre-existing dashboard files so workspace lint can pass.

Co-Authored-By: David Cramer <david@sentry.io>
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

Dashboard visual evidence

Mode: path-selected
Selected: gallery-index

Triggered by:

  • packages/junior-dashboard/src/app.ts
  • packages/junior-dashboard/tests/dashboard-routes.test.ts

Component gallery index · desktop

Component gallery index · desktop

Full-page screenshots from the mock dashboard. Not a pixel-diff gate.

Replace the hand-written declaration rewrite with tsc-alias, the common post-tsc tool for this job. Keep the packed consumer typecheck.

Co-Authored-By: David Cramer <david@sentry.io>
@dcramer

dcramer commented Aug 25, 2026

Copy link
Copy Markdown
Member

maybe instead we should just correctly publish exports/types for anything that is expected to be imported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant