169 Commits

Author SHA1 Message Date
Matthieu Riegler 4183e11aac refactor(devtools): ensure code is escaped
By stringifying twice we ensure the code is escape before building the string template.

(cherry picked from commit 74fa0588b1)
2026-06-16 15:25:40 +00:00
Matthieu Riegler 592b121209 refactor(devtools): Prevent cross-tab privilege escalation
The background script must not rely on the user-controllable `port.name` to authenticate DevTools panel connections.

(cherry picked from commit 7896e74222)
2026-06-03 22:47:39 +00:00
Cameron Smick d30f74c02b refactor(devtools): add optional injector property to DevToolsNode and IndexedNode types
Add an optional injector property to the DevToolsNode and IndexedNode types. Features that require an injector use the injector stored on the node, if it exists, and fall back to getInjectorFromElementNode if it doesn't.

(cherry picked from commit 0cf8a61e58)
2026-05-19 13:04:20 -07:00
Matthieu Riegler d91070ee4f refactor(devtools): cleanup
This are not the droids you are looking for.
2026-05-01 15:59:40 -07:00
Matthieu Riegler ef38017418 build: move devtools only deps out of the workspace
This reduces the clutering of the workspace package.
2026-04-28 13:05:33 -07:00
Matthieu Riegler 4ad3a1fe37 refactor(core): Don't throw when there are not async metadata
In the context of AOT tests, component with defer blocks no longer throw on instanciation if the component is not overridden (with `overrideComponent`)

Prior to this change, all components with a `@defer` block would throw if `compileComponents` was not invoked.

In none-JIT apps, this change makes `compileComponents()` uneccesary.
2026-04-27 17:04:09 -07:00
Cameron Smick e96673ff64 refactor(devtools): make the DevToolsNode directives property optional
Client-Only Wiz doesn't have the concept of a directive. Once the new ng.getComponentForest function is implemented, Client-Only Wiz cowilluld provide `ComponentTreeNode`s without a `directives`` property. This change supports that case by making the `directives` property optional.
2026-04-23 11:36:00 -07:00
Doug Parker 51c3a11d69 release: bump Angular DevTools version to 1.14.1 2026-04-08 12:15:55 -07:00
Aleksander Bodurri 36edf4870f fix(devtools): fix incorrect logic in destroy function for ChromeMessageBus
Destroy uses window.removeEventListener but the ChromeMessageBus doesn't actually depend on a window object.

In practice this code is unlikely to ever be reached. If a tab is closed the entire context script JS process is killed so this is not an bug that would be very common or even reachable. That being said for correctness this should not be using window.
2026-03-23 14:51:27 -07:00
splincode 25dad82e43 refactor(devtools): improve test descriptions by fixing spelling
Fixed misspellings in test descriptions in devtools/projects/shell-browser/src/app/tab_manager_spec.ts: recieved/recieves → received/receives in three it(...) titles.
2026-03-23 10:32:39 -07:00
Doug Parker 785735b7a5 release: bump Angular DevTools version to 1.14.0 2026-03-18 14:11:47 -07:00
hawkgs 832d428d0e refactor(devtools): change upstream and downstream signal deps icons
Update the icons with better custom ones; Introduce an icon component and an assets folder.
2026-03-11 09:25:34 -07:00
Alan Agius 71c9c6d5e5 release: bump Angular DevTools version to 1.13.0 2026-03-11 14:23:20 +01:00
Matthieu Riegler 263b819a75 refactor(devtools): prevent spamming the message bus
This commit adds some state on the bus to prevent sending unecessary messages to the main window.
2026-03-09 10:45:58 -07:00
hawkgs ed3dc10fea refactor(devtools): fix browser-specific styles infra
Fix browser-specific styles infrastructure. PR #62786 cleans up part of the code, but there are still services that attempt to load these stylesheets on `main`.
2026-03-09 10:21:51 -07:00
Alan Agius 786ea441e9 build: force external sourcemaps for esbuild targets
Update the `esbuild` macro in devtools to use
`external` sourcemaps by default and remove the ability to override the `sourcemap` and `sources_content` options.
This change is necessary to ensure that the build is deterministic and 100% reproducible as otherwise Firefox will not publish the build.
2026-03-06 12:13:18 -08:00
Doug Parker 01eadde28e release: bump Angular DevTools version to 1.12.0 2026-02-25 17:44:52 -08:00
Doug Parker fc55996b56 refactor(devtools): don't minify debug builds.
This disables esbuild minification when building DevTools in debug mode, introducing a new `//devtools:debug` flag and a `pnpm run devtools:build:chrome:dev` script to trigger it. This should make debugging a little easier.
2026-02-24 09:28:05 -08:00
Doug Parker 384341d900 feat(devtools): deploy source maps
This adds source maps to both the dev and production builds. Since this project is open source and downloaded ahead of time, there is not much negative cost to shipping source maps in production, as this can help any developers who encounter bugs related to Angular DevTools on the page.

There is a slight performance cost to both processing the `sourceMappingURL` comment _and_ actually processing the sourcemaps. Ideally, we would use linked sourcemaps all the time, as this avoids processing this and parses only a trivial comment unless the user actually opens a debugger. Unfortunately, Chrome seems to fail to load linked sourcemaps for scripts injected into the user's page (the backend script and content scripts), so these need inlined sourcemaps to work, which somewhat increases the performance cost. These scripts should be small enough to not be a major issue, but we can consider removing them in production based on signal from the community if necessary.
2026-02-24 09:28:05 -08:00
Doug Parker b6acda1f7e release: bump Angular DevTools version to 1.11.1 2026-02-19 09:11:15 -08:00
Matthieu Riegler 6f922c18d9 fix(devtools): fix messaging bus
The bus wasn't initialized correctly and never recieved the backend installed messages.

fixes #67143
2026-02-19 08:45:32 -08:00
Doug Parker 47486f8c49 release: bump Angular DevTools version to 1.11.0 2026-02-18 10:47:56 -08:00
Matthieu Riegler 302ea2ee46 fix(devtools): scope the message bus with URLs to prevent cross message interference
This prevents us from having detectAngular from running indefinitely.
2026-02-11 14:38:33 -08:00
Doug Parker da1f61cfbd release: bump Angular DevTools version to 1.10.0 2026-02-04 14:46:56 -08:00
Alan Agius 4123ebf61e release: bump Angular DevTools version to 1.9.0 2026-01-28 10:52:59 +01:00
Doug Parker 61614f6caa release: bump Angular DevTools version to 1.8.0 2026-01-14 14:14:04 -08:00
Jan Martin 2c9328639f release: bump Angular DevTools version to 1.7.0 2026-01-07 13:28:29 -08:00
Matthieu Riegler 6a94300179 refactor(devtools): use whenStable instead of detectChanges
This commits migrates the devtools tests toward to recommendations
and runs the tests in a zoneless config
2026-01-05 12:24:58 -05:00
hawkgs 8795e9f031 refactor(devtools): update extension icon
Change the color of the inactive extension from black to gray (for better contrast in dark mode) and slightly enlarge all of the icons.
2026-01-05 11:42:49 -05:00
hawkgs eb5f5b61c3 refactor(devtools): rename detect angular script name
Drop the 'for-extension-icon' since the script is dealing only with the app detection.
2026-01-02 08:20:19 +01:00
hawkgs 0db09e33b1 fix(devtools): false positive app not detected
Since Manifest V3, the service worker (background) gets terminated after 30s of inactivity. This can break the initialization phase of DevTools or the BE-FE communication channel, if already initialized. To prevent that, we emit a heartbeat in a >30s interval.
2026-01-02 08:12:18 +01:00
Doug Parker 5a146b3256 release: bump Angular DevTools version to 1.6.4 2025-12-18 13:06:36 -08:00
hawkgs 83691704b7 refactor(devtools): slightly optimize extension initialization messaging
- Stop indefinite `detectAngular` messages after the backend is installed.
- Do not attempt handshake with the BE (from content scripts) until it's installed.
2025-12-15 09:52:52 -08:00
Jan Martin 954c546273 release: bump Angular DevTools version to 1.6.3 2025-12-10 11:37:13 -08:00
Joey Perrott aa92f19307 build: update to bazel version 8.4.2
Update bazel to use version 8.4.2
2025-12-08 10:21:59 -08:00
Alan Agius 3e89577655 release: bump Angular DevTools version to 1.6.2 2025-12-03 13:18:27 +01:00
Doug Parker 8555652460 release: bump Angular DevTools version to 1.6.1 2025-11-26 13:32:10 -05:00
Alessio Pelliccione 1aed9408a4 fix(devtools): ensure external docs link opens correctly from extension popup
Adds target="_blank" and rel="noopener noreferrer" to prevent tab-nabbing and follow modern security best practices.
2025-11-17 08:45:34 -08:00
Shuaib Hasan Akib f87e9a02b5 refactor(devtools): clean up unused code and modernize component patterns
- Removed unused code and imports
- Migrated to signal-based input() APIs
- Added readonly to Angular-initialized inputs and removed explicit type annotations
- Updated templates to use self-closing tags for consistency
2025-11-17 08:40:15 -08:00
Alessio Pelliccione 7d41716703 fix(devtools): forward Angular detection to background
Ensure the content script forwards Angular detection results to the service worker so the popup/icon reflects the page state.
2025-11-17 08:38:19 -08:00
Jan Martin 48d395402d release: bump Angular DevTools version to 1.6.0 2025-11-12 11:59:07 -08:00
Alan Agius 1cd5b44f9c release: bump Angular DevTools version to 1.5.0 2025-11-05 15:52:09 +01:00
Georgi Serev 9fc3873ea3 fix(devtools): SameMessageBus source and destination URIs
Fix the URIs by stripping any query parameters and/or fragments from the compound URLs, since they may prevent the extension from successfully establishing a handshake in some instances.
2025-11-04 17:52:07 +00:00
Jan Martin 23c62832e5 release: bump Angular DevTools version to 1.4.1 (#64445)
PR Close #64445
2025-10-15 10:35:24 -07:00
Alan Agius 47b66b1418 release: bump Angular DevTools version to 1.4.0 (#64287)
PR Close #64287
2025-10-08 08:19:50 +00:00
Matthieu Riegler 4fe0ac5a87 refactor(devtools): themed devtool tab icons for firefox (#64122)
With this change, Firefox get a different tab icon when the dark theme is enabled

fixes #52980

PR Close #64122
2025-09-29 09:31:03 -04:00
Doug Parker e8beaa42c0 release: bump Angular DevTools version to 1.3.0 (#64044)
PR Close #64044
2025-09-24 13:54:14 -07:00
Jan Martin 7d3919ed11 release: bump Angular DevTools version to 1.2.1 (#63879)
PR Close #63879
2025-09-17 10:57:05 -07:00
Kristiyan Kostadinov 8f59295019 refactor(core): remove unnecessary deps arrays (#63823)
We don't need to use the `deps` array syntax anymore since we have the `inject` function. These changes clean up the relevant usages.

PR Close #63823
2025-09-16 16:51:52 +00:00
Alan Agius cdf5d6763f release: bump Angular DevTools version to 1.2.0 (#63730)
PR Close #63730
2025-09-11 07:13:52 -07:00