Skip to content

feat: add Angular devtools adapter#364

Open
AlemTuzlak wants to merge 8 commits intomainfrom
worktree-kind-orbiting-dolphin
Open

feat: add Angular devtools adapter#364
AlemTuzlak wants to merge 8 commits intomainfrom
worktree-kind-orbiting-dolphin

Conversation

@AlemTuzlak
Copy link
Collaborator

Summary

  • Add new @tanstack/angular-devtools package — a standalone Angular 19+ component wrapping TanStackDevtoolsCore with signal-based inputs, dynamic component rendering via createComponent + ApplicationRef.attachView, and reactive config updates via effect()
  • Add @tanstack/devtools-utils/angular export with createAngularPlugin() and createAngularPanel() factory functions following the [Plugin, NoOpPlugin] tuple pattern
  • Includes full build configuration, type declarations, and publint verification

Test plan

  • pnpm build:all passes (all packages including angular)
  • test:types passes for both angular-devtools and devtools-utils
  • test:build (publint --strict) passes for angular-devtools
  • Dist outputs verified: correct ESM exports, type declarations generated

Add the @tanstack/angular-devtools package with:
- TanStackDevtoolsComponent: standalone Angular component that wraps TanStackDevtoolsCore
- Plugin system supporting Angular components rendered into devtools containers
- Type definitions for Angular-specific plugin and init configuration
- Build config using @analogjs/vite-plugin-angular for AOT compilation
- Remove @analogjs/vite-plugin-angular from build (produces empty chunks
  for library builds). Use plain esbuild via Vite instead - Angular AOT
  compilation happens at consumer's build time.
- Upgrade Angular dev deps from ^19 to ^20 for TypeScript 5.9 compat.
- Remove @angular/build dep (only needed by analogjs plugin).
- Add @tanstack/angular-devtools workspace override to root.
@changeset-bot
Copy link

changeset-bot bot commented Mar 4, 2026

⚠️ No Changeset found

Latest commit: e57c0fe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@nx-cloud
Copy link

nx-cloud bot commented Mar 4, 2026

View your CI Pipeline Execution ↗ for commit b56b0af

Command Status Duration Result
nx affected --targets=test:eslint,test:sherif,t... ✅ Succeeded 9s View ↗
nx run-many --targets=build --exclude=examples/** ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2026-03-04 12:54:23 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 4, 2026

More templates

@tanstack/angular-devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/angular-devtools@364

@tanstack/devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools@364

@tanstack/devtools-client

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-client@364

@tanstack/devtools-ui

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-ui@364

@tanstack/devtools-utils

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-utils@364

@tanstack/devtools-vite

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-vite@364

@tanstack/devtools-event-bus

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-event-bus@364

@tanstack/devtools-event-client

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/devtools-event-client@364

@tanstack/preact-devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/preact-devtools@364

@tanstack/react-devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/react-devtools@364

@tanstack/solid-devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/solid-devtools@364

@tanstack/vue-devtools

npm i https://pkg.pr.new/TanStack/devtools/@tanstack/vue-devtools@364

commit: 1813516

AlemTuzlak and others added 3 commits March 4, 2026 13:44
- Fix array-type ESLint rule in angular-devtools
- Fix import/consistent-type-specifier-style in devtools-utils angular
- Sort peerDependencies alphabetically (sherif)
- Remove unused devDependencies flagged by knip
- Remove angularCompilerOptions from tsconfig (not using ngc)
Copy link
Member

@crutchcorn crutchcorn left a comment

Choose a reason for hiding this comment

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

Just a few notes; otherwise broadly looks good

>(
CoreClass: new (props: TComponentProps) => TCoreDevtoolsClass,
): [Type<any>, Type<any>] {
@Component({
Copy link
Member

Choose a reason for hiding this comment

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

I'm not confident this will work for some edgecase compiler usage. I've ran into issues trying to dynamically create components like this before; although FWIW my memory here is a little hazy

"test:lib:dev": "pnpm test:lib --watch",
"test:types": "tsc",
"test:build": "publint --strict",
"build": "vite build"
Copy link
Member

Choose a reason for hiding this comment

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

AFAIK, most other TanStack Angular adapters are using Angular CLI (and/or ng-packagr) itself:

https://github.com/TanStack/form/blob/main/packages/angular-form/package.json#L25

Because of incompatibilities of using Vite for builds.

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.

2 participants