Uh oh!
There was an error while loading. Please reload this page.
chore(v11): Upgrade to TypeScript 7.0 - #19435
Conversation
size-limit report 📦
|
node-overhead report 🧳Note: This is a synthetic benchmark with a minimal express app and does not necessarily reflect the real-world performance impact in an application.
|
84d7268 to
199fbefCompare199fbef to
71f88ccCompared7b1418 to
912d717Compare912d717 to
e54841eComparee54841e to
481dbc6Compared26ac8a to
babf1ccComparebabf1cc to
67ebba4Comparef5e614c to
71c8903Compare71c8903 to
de2e7b3Compare6e0f0fa to
a6fff6dComparea6fff6d to
7db2022Compare7db2022 to
e148da9Comparee148da9 to
1afdab1CompareUh oh!
There was an error while loading. Please reload this page.
| "inlineSources": true, | ||
| "isolatedModules": true, | ||
| "lib": ["es2020"], | ||
| "lib": ["es2020", "DOM"], |
There was a problem hiding this comment.
m/q: Does this add DOM types to server-side packages?
There was a problem hiding this comment.
and vice versa, node types (with types below) to browser packages?
There was a problem hiding this comment.
In TS 6/7 the types aren't autoloaded from @types anymore, so we have to be explicit.
Regarding node-types-in-browser, adding node in L22 reduces the type surface which was autoloaded anyways before that change.
On the DOM side being pulled into node, I think that was also always the case because of jsdom being in @types and leaking in the dom types.
I could change this to remove DOM from the base and hand pick it where applicable, which would be a tightening but may change existing expectations we had knowingly or unknowingly. WDYT?
There was a problem hiding this comment.
I think it's fine, since it already was this way. Just didn't know/forgot about it. No need to change from my PoV
1afdab1 to
5376d06CompareBump typescript to ~7.0.2 and apply the changes TS 7 requires: - remove downlevelIteration and baseUrl (both removed in TS 7) - set explicit rootDir on all emitting tsconfigs (now required) - add DOM lib and node types to the shared base config - scope DOM out of cloudflare (conflicts with workers-types) - source fixes: BodyInit casts on transports, readonly web-vitals globals, WebAssembly.Exception ts-expect-error removal, elysia trace handler generic, replay paint entry ts-expect-error
5376d06 to
c7576dbCompareUh oh!
There was an error while loading. Please reload this page.
Rebased continuation of #19229 (original author @aklkv) onto current `develop`, with merge conflicts resolved and the failing tests fixed. Migrates `@sentry/ember` from the legacy v1 addon format to the [Ember v2 addon format](https://rfcs.emberjs.com/id/0507-embroider-addons), so the package works with both classic Ember builds and Embroider-optimized builds and no longer depends on `@embroider/macros` at runtime. See #19229 for the full description of the migration. ## Why a new branch The original PR was ~1900 commits behind `develop` and conflicting. Rather than resolve the same conflicts twice across its two commits, I squashed them into one and rebased against the final state once. The subtle part: the migration renamed `packages/ember/addon/` → `src/`. Git therefore saw develop's later behavioral changes to those files as edits to *deleted* files and did **not** surface them as conflicts. Several develop-side changes had to be ported into the new `src/` files by hand: - **Span ops** (#22669, #23086) — route hooks now emit `op: 'function'` with a `code.function.name` attribute; the runloop uses `ui.task`; the transition span uses `router`. `instrumentRoutePerformance.ts` still carried the old `ui.ember.route.*` ops and had to be updated. - **URL attributes** (#22095, #22415) — `url.path` / `url.full` / `url.template` on router spans, reconciled onto the PR's restructured `instrumentEmberAppInstanceForPerformance.ts`. ## Build/tooling reconciliation - Re-added the nested `typescript: ~5.8.0` devDependency pin. `develop` upgraded to TypeScript 7 (the native compiler, which drops `typescript/lib/tsc`), and glint's declaration build needs the classic JS compiler — the same stop-gap `develop` already applies to ember (see #19435). Without the pin the declaration build fails with `ERR_PACKAGE_PATH_NOT_EXPORTED`. - Bumped `@sentry/browser` / `@sentry/core` from the PR's stale `10.53.1` to `10.67.0` and added `@sentry/conventions` (now imported by the ported instrumentation). - Removed the PR's `import/no-unresolved` oxlint rule (doesn't exist in this repo's oxlint 1.75) and wrapped `URL_FULL` in `filterCollectedUrl()` for the `sdk/no-unfiltered-url-attributes` rule, which now applies since the code lives under `src/**`. ## Test fixes The originally-failing tests came down to three things: - **Span-op port** above — fixed the `captures correct spans for navigation` assertions. - **Missing `traceLifecycle: 'static'`** in the two new e2e apps (`ember-strict-resolver`, `ember-vite`). `develop` made span-streaming the default and disables it in the ember test apps (#22588); the new apps predated that, so their performance tests hung waiting for transaction events that never arrived under streaming. - **Stale assertions** in `ember-strict-resolver`'s `sentry-performance.test.ts`, updated from the old `ui.ember.*` op schema to the new `router` / `function` / `ui.task` ops. All four ember e2e apps pass (`ember-classic` 6/6, `ember-embroider` 6/6, `ember-strict-resolver` 10/10, `ember-vite` 5/5), along with the ember unit tests, lint, and build. Supersedes #19229. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rebased continuation of #19229 (original author @aklkv) onto current `develop`, with merge conflicts resolved and the failing tests fixed. Migrates `@sentry/ember` from the legacy v1 addon format to the [Ember v2 addon format](https://rfcs.emberjs.com/id/0507-embroider-addons), so the package works with both classic Ember builds and Embroider-optimized builds and no longer depends on `@embroider/macros` at runtime. See #19229 for the full description of the migration. ## Why a new branch The original PR was ~1900 commits behind `develop` and conflicting. Rather than resolve the same conflicts twice across its two commits, I squashed them into one and rebased against the final state once. The subtle part: the migration renamed `packages/ember/addon/` → `src/`. Git therefore saw develop's later behavioral changes to those files as edits to *deleted* files and did **not** surface them as conflicts. Several develop-side changes had to be ported into the new `src/` files by hand: - **Span ops** (#22669, #23086) — route hooks now emit `op: 'function'` with a `code.function.name` attribute; the runloop uses `ui.task`; the transition span uses `router`. `instrumentRoutePerformance.ts` still carried the old `ui.ember.route.*` ops and had to be updated. - **URL attributes** (#22095, #22415) — `url.path` / `url.full` / `url.template` on router spans, reconciled onto the PR's restructured `instrumentEmberAppInstanceForPerformance.ts`. ## Build/tooling reconciliation - Re-added the nested `typescript: ~5.8.0` devDependency pin. `develop` upgraded to TypeScript 7 (the native compiler, which drops `typescript/lib/tsc`), and glint's declaration build needs the classic JS compiler — the same stop-gap `develop` already applies to ember (see #19435). Without the pin the declaration build fails with `ERR_PACKAGE_PATH_NOT_EXPORTED`. - Bumped `@sentry/browser` / `@sentry/core` from the PR's stale `10.53.1` to `10.67.0` and added `@sentry/conventions` (now imported by the ported instrumentation). - Removed the PR's `import/no-unresolved` oxlint rule (doesn't exist in this repo's oxlint 1.75) and wrapped `URL_FULL` in `filterCollectedUrl()` for the `sdk/no-unfiltered-url-attributes` rule, which now applies since the code lives under `src/**`. ## Test fixes The originally-failing tests came down to three things: - **Span-op port** above — fixed the `captures correct spans for navigation` assertions. - **Missing `traceLifecycle: 'static'`** in the two new e2e apps (`ember-strict-resolver`, `ember-vite`). `develop` made span-streaming the default and disables it in the ember test apps (#22588); the new apps predated that, so their performance tests hung waiting for transaction events that never arrived under streaming. - **Stale assertions** in `ember-strict-resolver`'s `sentry-performance.test.ts`, updated from the old `ui.ember.*` op schema to the new `router` / `function` / `ui.task` ops. All four ember e2e apps pass (`ember-classic` 6/6, `ember-embroider` 6/6, `ember-strict-resolver` 10/10, `ember-vite` 5/5), along with the ember unit tests, lint, and build. Supersedes #19229. --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bumps TypeScript from
~5.8.0to~7.0.2, the native (Go) compiler.The changes here are what TS 7 itself forces:
rootDiron every emitting tsconfig (now required)downlevelIterationandbaseUrloptionsDOMto the sharedlibandnodetotypes, since globals are no longer auto-includedlibback toes2020so DOM's fetch types don't clash with@cloudflare/workers-typesbrowser-integration-testsoff the removednode10resolution tobundler(with apathsshim for the internal replay types those tests borrow)as BodyInitcasts on the transports,readonlyon the web-vitals global augmentations, an elysia trace-handler generic, and a couple of@ts-expect-erroradjustmentsemberand the bundler-pluginvite-type-compattest pin a JS-based TypeScript locally (nested devDep), because glint and that test consume the classic compiler API that the native compiler dropped. imo that's fine as a stop-gap until those tools support TS 7.The native compiler also makes type generation much faster. Measured on CI, full monorepo, 46 projects, no nx cache:
build:transpile+build:types(nx run)build:transpile(rollup/esbuild) is unchanged across the two, so effectively all of the ~140s saved istsctype generation.closes#19226