Draft
Conversation
- Rewrite ember_debug/utils/ember.js to use new appLoader.loadCompatInspector() API - Update ember-object-names.js to use getClassName() from new API - Update type-check.js to use new type checking and computed property APIs - Add comprehensive API analysis document with TypeScript definitions - Hard cut to new API (no fallback to old internal modules) - Replace instanceof checks with type checking functions - Simplify tracking API usage
- Add missing exports to ember.js: GlimmerRuntime, GlimmerManager, GlimmerReference, GlimmerUtil, EmberDestroyable, RSVP, Application, Namespace - Update object-inspector.js to use new tracking API (createPropertyTracker, hasPropertyChanged, getPropertyDependencies, getChangedDependencies, isTrackedProperty) - Replace all instanceof checks with type checking functions (isEmberObject, isCoreObject, isObjectProxy, isArrayProxy, isService, isComponent, isGlimmerComponent) - Remove old Glimmer tracking setup code (tagValue, tagValidate, track, tagForProperty, HAS_GLIMMER_TRACKING) - Simplify getTrackedDependencies to use new API - Build passes successfully
- Fix remaining instanceof ObjectProxy check in object-inspector.js - Remove unused emberMeta import from type-check.js - Fix prettier formatting issues - All eslint checks now pass
75f477f to
770e782
Compare
- Replace direct __container__ access with emberInspectorAPI.owner.getContainerInstances() - Replace all owner.lookup() and container.lookup() calls with emberInspectorAPI.owner.lookup() - Replace route tree building (150+ lines) with emberInspectorAPI.router.buildRouteTree() - Replace router internal access with emberInspectorAPI.router.getRouteHandler() - Add comprehensive API stub in ember_debug/utils/ember-inspector-api.js - Update EMBER_INSPECTOR_API_ANALYSIS.md with Owner/Container/Router APIs - Add IMPLEMENTATION_COMPARISON.md showing 98% code reduction Benefits: - Zero direct private API access - Zero version-specific code - 180+ lines eliminated (98% reduction) - Stable public API that won't break with Ember internals changes
770e782 to
1fc3c91
Compare
- Add computed.getComputedMetadata() API to replace direct access to desc._getter, desc._readOnly, desc._auto - Add renderTree.getDebugRenderTree() API to replace direct access to _debugRenderTree - Update object-inspector.js to use new computed metadata API - Update render-tree.js to use new render tree API - Update EMBER_INSPECTOR_API_ANALYSIS.md with new API definitions - Add ComputedMetadata and DebugRenderTree interface definitions This eliminates the remaining private property access in the implementation code. The API stub still contains private access as it's the compatibility layer.
9b372eb to
2ac9e8f
Compare
- Add computed.isMandatorySetter() API to replace string checking for 'You attempted to update' - Update object-inspector.js to use new API instead of checking setter code - Update EMBER_INSPECTOR_API_ANALYSIS.md with new API definition This eliminates the last instance of checking internal implementation details via string matching.
72ac286 to
b29c19b
Compare
- Add computed.isCached() API to detect properties using @cached decorator - Update EMBER_INSPECTOR_API_ANALYSIS.md with isCached documentation - Implement stub in ember-inspector-api.js with heuristic detection - @cached is from @glimmer/tracking and memoizes getter results This provides a public API to identify cached properties without relying on internal implementation details.
1c8d12f to
69c46b0
Compare
- Remove unused imports from object-inspector.js - Fix structural bug in ember-inspector-api.js (misplaced closing brace) - Add eslint-disable directives for intentional private API usage in stub - Add no-unused-vars exceptions for stub method parameters
- Add getApplication() and getOwnerFromApplication() to emberInspectorAPI.owner - Replace local getApplication/getOwner functions in main.js with API calls - Remove now-unused local helper functions
- Move Application/Namespace imports inside the stub (no longer passed as args) - Simplify call site in main.js to emberInspectorAPI.owner.getApplication() - Remove now-unused Application/Namespace imports from main.js
patricklx
added a commit
to patricklx/ember.js
that referenced
this pull request
Feb 27, 2026
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
…ions - Add new higher-level API methods to ember-inspector-api.js: - hasRegistration, getDataAdapter, getRouter, getController, getRoute, getInstance - Remove _resolve method from data-debug.js - Replace all emberInspectorAPI.owner.lookup calls with appropriate high-level methods - Encapsulate all low-level owner access within ember-inspector-api.js only This improves code maintainability and provides better abstraction for owner interactions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Screenshots