Skip to content

Add inspector public api#21135

Draft
patricklx wants to merge 5 commits intoemberjs:mainfrom
patricklx:add-inspector-public-api
Draft

Add inspector public api#21135
patricklx wants to merge 5 commits intoemberjs:mainfrom
patricklx:add-inspector-public-api

Conversation

@patricklx
Copy link
Contributor

No description provided.

@@ -0,0 +1,12 @@
import type Application from '@ember/application';

export function setupInspectorSupport(app: Application) {
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

Implements the public inspector API as outlined in emberjs/ember-inspector#2723.
This provides a stable, high-level interface for the Ember Inspector to access
Ember internals without depending on private APIs.

The API includes:
- debug: captureRenderTree, inspect, registerDeprecationHandler
- environment: getEnv, VERSION
- instrumentation: subscribe, unsubscribe
- objectInternals: cacheFor, guidFor, meta, get, set
- owner: getOwner, lookup, factoryFor, hasRegistration, getContainerInstances
- libraries: getRegistry
- typeChecking: isEmberObject, isComponent, isGlimmerComponent, isService, etc.
- naming: getClassName (resolves Ember class/mixin names)
- tracking: createPropertyTracker, hasPropertyChanged, getPropertyDependencies, etc.
- computed: isComputed, getComputedMetadata, isMandatorySetter, isCached
- renderTree: getDebugRenderTree
- runloop: getBackburner, join, debounce, cancel
…/isCached

- Add infoForTag export and tracked-utils to @glimmer/validator
- Export MonomorphicTagImpl and add meta property for tag introspection
- Update tagFor() to attach metadata (propertyKey, object) to tags
- Implement infoForTag() to retrieve tag metadata
- Add MANDATORY_SETTER_SYMBOL for efficient mandatory setter detection
- Add CACHED_GETTER_SYMBOL for efficient @cached decorator detection
- Replace string matching with symbol checks in isMandatorySetter and isCached
- Improves performance and reliability by avoiding Function.toString() calls
@patricklx patricklx force-pushed the add-inspector-public-api branch from de8f060 to 36e780f Compare March 3, 2026 13:32
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