Commit graph

49 commits

Author SHA1 Message Date
Doug Parker
fb54863773 release: bump Angular DevTools to version 1.0.16 (#55715)
PR Close #55715
2024-05-08 11:11:28 -07:00
AleksanderBodurri
77ae5a391b refactor(devtools): remove git sha stamping from devtools build (#55694)
This stamping is interfering with publishing to the Firefox addons store by brining in the entirety of the `.git` directory as part of the source code necessary for a reproducible build, which Firefox requires as part of it's approval process.

In it's place, we are now using the extension version pulled from the manifest.

PR Close #55694
2024-05-06 16:02:36 -07:00
Doug Parker
58a8f124b0 refactor(devtools): set key in manifest.chrome.json (#55639)
This key comes from the release build of the Chrome extension. Setting it here configures the extension ID of a local build to match the extension ID of the public release. This makes Chrome recognize that local builds are the same extension leading to more intuitive behavior. It's also useful for allowlists of extension IDs to keep the local ID consistent.

PR Close #55639
2024-05-02 14:46:24 -07:00
Doug Parker
b44e35f472 release: bump Angular DevTools to 1.0.15 (#55643)
PR Close #55643
2024-05-02 13:37:34 -07:00
Doug Parker
7cea897132 release: bump DevTools to 1.0.14 (#55545)
PR Close #55545
2024-04-30 17:01:54 -07:00
AleksanderBodurri
efe78d5565 fix(devtools): allow DevTools to fail gracefully for unsupported versions of Angular. (#55233)
Angular DevTools depends on many modern Angular features in order to function. As a result, at present the last officially supported version is v12. Angular DevTools may function for some Angular 9, 10 and 11 applications, but they are not officially supported.

This commit fixes an issue where DevTools would not inject a backend script into an Angular application if it detected it was below version 12. This backend script is important because it's used to inform the DevTools panel that the inspected application is in fact Angular, but that it is not on a supported version.

Angular 9, 10 and 11 applications that successfully have Angular DevTools initialize will now have a red highlight and tooltip on their version number, informing the user that they are using Angular DevTools on a version of Angular that is no longer supported.

Angular DevTools for applications that are below version 9 will continue to display the "Angular Devtools supports Angular versions 12 and above" message.

PR Close #55233
2024-04-22 11:25:20 -07:00
Doug Parker
5f859727e2 release: bump Angular DevTools version to 1.0.13 (#55371)
PR Close #55371
2024-04-17 07:53:11 +02:00
Doug Parker
abd973d0bb release: bump Angular DevTools version to 1.0.12 (#55056)
Also fixes a typo in release docs for the Firefox `zip` command.

PR Close #55056
2024-03-27 09:55:36 -07:00
AleksanderBodurri
d15dca054c fix(devtools): issue where backendReady race condition causes Angular not detected error (#54805)
Previously, a race condition could cause DevTools to enter a state where it can't detect an application on reload. This was caused by a sequencing issue between the content script connection, the devtools panel connection and an event "backendReady" that lets DevTools know when a particular frame is ready to be inspected.

This commit replaces the previously stored backendReady boolean with a promise, so that the devtools panel can eventually run a callback to connect to a content script when that content script emits it's backendReady message.

PR Close #54805
2024-03-26 09:19:06 -07:00
AleksanderBodurri
a3e67036f6 Revert "Revert "refactor(devtools): implement multiframe support in devtools page (#53934)" (#54629)" (#54805)
This reverts commit 133319eba0.

PR Close #54805
2024-03-26 09:19:06 -07:00
AleksanderBodurri
15b54ce8dd Revert "Revert "refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934)" (#54629)" (#54805)
This reverts commit dd9f9d7d44.

PR Close #54805
2024-03-26 09:19:05 -07:00
Doug Parker
83d8c68690 release: bump Angular DevTools version to 1.0.11 (#54631)
PR Close #54631
2024-02-27 14:02:15 -08:00
Doug Parker
dd9f9d7d44 Revert "refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934)" (#54629)
This reverts commit dd3dac9cc9.

PR Close #54629
2024-02-27 14:00:13 -08:00
Doug Parker
133319eba0 Revert "refactor(devtools): implement multiframe support in devtools page (#53934)" (#54629)
This reverts commit ebcdc8dc96.

PR Close #54629
2024-02-27 14:00:12 -08:00
Doug Parker
e9e5e255e9 release: bump Angular DevTools version to 1.0.10 (#54523)
PR Close #54523
2024-02-21 15:23:36 -08:00
AleksanderBodurri
ebcdc8dc96 refactor(devtools): implement multiframe support in devtools page (#53934)
In the Angular DevTools Chrome DevTools page:

- Angular DevTools is able to ask the background script to list each frame that has been registered on a page.
- Angular Devtools is able to ask the background script to "enable" the connection on a particular frame. This enables the messaging between the content script <-> background script <-> devtools page
- Implements detection of non unique urls on the inspected page

Limitations:
- The `inspectedWindow.eval` API is only able to target frames by frameURL. This means some features that integrate with Chrome DevTools like inspect element and open source will not be available when inspecting frames that do not have a unique url on the page.

PR Close #53934
2024-02-14 17:15:25 -08:00
AleksanderBodurri
dd3dac9cc9 refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934)
Modifies the messaging layer of devtools to allow for switching communication between frames on a page. When served as a browser extension.

Design:
- When a page renders, DevTools installs a content script onto it through it's manifest file. The all_frames option is used here to install this script onto every frame in a page.
- When Angular is detected, the content script will install a backend script into it's frame.
- Each content script / backend script pairing is kept track of in the background script. This pairing represents an angular devtools context in a particular frame.
- Angular DevTools is able to ask the background script to list each frame that has been registered on a page.
- Angular Devtools is able to ask the background script to "enable" the connection on a particular frame. This enables the messaging between the content script <-> background script <-> devtools page

Limitations:
- The `inspectedWindow.eval` API is only able to target frames by frameURL. This means some features that integrate with Chrome DevTools like inspect element and open source will not be available when inspecting frames that do not have a unique url on the page.

PR Close #53934
2024-02-14 17:15:25 -08:00
Matthieu Riegler
93845373a3 refactor(devtools): migrate to standalone (#53998)
Migrated with the schematics and cleanup by hand.

PR Close #53998
2024-01-23 09:53:24 +01:00
Joey Perrott
711cb41626 refactor(devtools): migrate devtools to prettier formatting (#53945)
Migrate formatting to prettier for devtools from clang-format

PR Close #53945
2024-01-19 19:09:54 +01:00
Tomasz Ducin
4be253483d refactor(devtools): improving type safety (#53436)
This PR reduces the number of unnecessary `any` occurrences in devtools packages.

PR Close #53436
2024-01-19 17:35:25 +01:00
Matthieu Riegler
6cd91c675c refactor(devtools): enables typescript strict option (#53340)
Enabling `strict` is part of an effort to improve the quality of the devtools code base.
One of the direct side effect is to enable `noImplicitAny`, `strictPropertyInitialization` and `strictBindCallApply`.

This commit also replaces `fullTemplateTypeCheck` with `stringTemplates`.

PR Close #53340
2023-12-05 12:42:56 -08:00
Matthieu Riegler
a429167994 fix(devtools): use a shared angular detection code (#51569)
This fixes an issue where an angular app exposes a global `ng` object that is not our `ng`.

fixes #51565

PR Close #51569
2023-11-30 09:40:11 -08:00
Doug Parker
e639bf4965 release: bump DevTools version to 1.0.9 (#52938)
PR Close #52938
2023-11-15 20:18:32 +00:00
Doug Parker
5ee935e7fe release: bump DevTools version to 1.0.8 (#52759)
PR Close #52759
2023-11-10 17:00:20 +00:00
AleksanderBodurri
d01f371d9a refactor(devtools): update Angular logo for extension and loading animation (#52546)
Previously these were using the pre v17 Angular logo.

Now these have been updated to use the new Angular logo for V17+.

PR Close #52546
2023-11-06 12:34:20 -08:00
Kristiyan Kostadinov
52cc7f839b build: align with internal tsconfig options (#51728)
Currently internally Angular has some customized tsconfig files, because we don't align with the tsconfig of the rest of g3. These changes enable `noImplicitReturns` and `noPropertyAccessFromIndexSignature` to align better with the internal config.

PR Close #51728
2023-09-12 11:39:42 -07:00
AleksanderBodurri
4b54947c97 fix(devtools): use the __ignore_ng_zone__ flag in devtools message bus' to prevent CD loop (#51339)
Updates ChromeMessageBus, SamePageMessageBus and IframeMessageBus to use this new flag in their emit methods.

PR Close #51339
2023-09-05 18:16:32 +00:00
aanchal
584a32d8e3 docs: add the title tag (#51199)
PR Close #51199
2023-08-01 11:54:36 -07:00
AleksanderBodurri
a1dc3bb503 build(devtools): target es2020 explicitly (#50086)
We do this because of a bug caused by https://github.com/evanw/esbuild/issues/2950 and a recent change to how angular static properties are attached to class constructors. Targeting esnext or es2022 will cause the static initializer blocks that attach these static properties on class constructors to reference a class constructor variable that they do not have access to.

Because of this we explicitly target es2020 in our Angular DevTools builds.

PR Close #50086
2023-05-09 14:41:48 -07:00
Andrew Scott
34b2d34d5b refactor(router): Remove RouterTestingModule in favor of RouterModule.forRoot (#49427)
`RouterTestingModule` is not needed as of v16. Instead, TestBed
automatically provides `MockPlatformLocation` in order to help test
navigations in the application. The location mocks in the
RouterTestingModule aren't necessary anymore.

There doesn't appear to be any real documentation around
`RouterTestingModule` other than the API docs.

PR Close #49427
2023-04-04 15:12:33 -07:00
Angular Robot
51d7cfbac6 build: update all non-major dependencies (#49267)
See associated pull request for more information.

PR Close #49267
2023-03-02 14:09:14 -08:00
Doug Parker
3c079a74c9 release: bump DevTools version (#49121)
PR Close #49121
2023-02-27 10:07:53 -08:00
AleksanderBodurri
2ca49726ca refactor(devtools): consolidate devtools global styles into 1 file (#49001)
Previously the DevTools demo app and browser app had duplicated styles in their respective styles.scss files.

This commit creates a global styles.scss that is imported with sass @use into the demo and browser app styles.scss files. This will prevent any issues where css changes to one are missed in the other. Also reduces duplication of material css theme definitions by consolidating it inone place. The respective styles.scss files for the demo app and browser app continue to exist incase those need environment specific css. For example the browser app requires that height: 100% is set on a document in order to render properly in a browsers devtools tab.

PR Close #49001
2023-02-14 20:25:23 +01:00
Matthieu Riegler
f8f8928210 fix(devtools): prevent devTools to load when not text/html document (#48021)
On Firefox, Angular DevTools was breaking the XML display because of the script injected
Based on contentType, we won't inject that script anymore

Fixes #48017

PR Close #48021
2022-11-17 09:35:40 -08:00
AleksanderBodurri
a910c8328a build(devtools): migrate to manifest v3 (#47575)
Previously we built DevTools for all browsers with version 2 of the manifest file format.

This commit includes a number of refactors and API additions that will enable us to build DevTools with version 3 of the manifest file format.

The manifest v3 build of Angular DevTools has been tested on Chrome, Edge, and Safari.

Notably, the Firefox version of Angular DevTools remains as a manifest v2 build. Firefox does not yet support manifest v3 in it's latest stable release. When Firefox makes this transition, a follow up PR will update the Firefox manifest file to version 3.

Because Firefox still needs v2, we need to keep some old v2 APIs around in our background page (service worker in v3) that will execute conditionally based on if the extension was built for v2 or v3. This is determined with the chrome.runtime.getManifest().manifest_version API.

PR Close #47575
2022-10-11 22:47:22 +00:00
Sabareesh Kappagantu
32cad55f0d feat(devtools): implement inspect functionality for directives (#47334)
Previously, you could inspect the source code of a component but not a directive. This commit adds functionality to inspect source code for directives as well. Now you will see the inspect icon on the header component of each directive on a selected element.

PR Close #47334
2022-09-19 18:59:13 +02:00
Paul Gschwendtner
915e82d854 build: simplify sass consumption of Angular CDK/Material in devtools (#46642)
Instead of listing every file manually, we can use the available rule
that extracts Sass dependency files automatically from `@npm//`.

PR Close #46642
2022-07-01 10:20:51 -07:00
mgechev
12a0cad02e build(devtools): update the extension version (#46289)
Update the version for the Firefox and Chrome extension to enable us
to publish the latest support of standalone components.

PR Close #46289
2022-06-10 15:23:12 +00:00
mariu
c3205d0962 feat(devtools): Create browser specific styles for chrome and firefox (#46037)
Create browser specific styles for chrome and firefox

PR Close #46037
2022-05-23 14:00:10 -07:00
AleksanderBodurri
3a468813ca fix(devtools): stop relying on getAllAngularRootElements in Angular DevTools' backend code. (#45983)
With the introduction of standalone components, it is no longer guaranteed that getAllAngularRootElements will be available on the global object. This PR removes the dependency on this function so that DevTools can continue to work for Angular applications that use `bootstrapApplication`.

PR Close #45983
2022-05-13 20:08:49 +00:00
Keith Li
5e404d3114 feat(devtools): support icons in offline mode (#45430) (#45743)
Add support to material design icons in offline mode for Angular Devtools. Self hosting the web font so icons are loaded regardless of network connection.

Bring the font file as well as its corresponding css file from third_party repo through bazel into shell-browser directory while building.

PR Close #45743
2022-05-12 09:17:05 -07:00
AleksanderBodurri
b7fca64828 build(devtools): Optimize prod build for Angular DevTools (#45886)
Uses `createEsbuildAngularOptimizePlugin` from dev-infra-private and passes in `GLOBAL_DEFS_FOR_TERSER_WITH_AOT` into a new esbuild prod configuration. Notably, this removes references to `ngDevMode` from the final build and enables minification.

PR Close #45886
2022-05-05 15:33:14 -07:00
mgechev
136839054c refactor(devtools): remove support for v11 and older versions of Angular (#45883)
In Angular v12 we introduced debugging APIs sufficient for DevTools.
Prior to that Angular DevTools accesses the logical data structures of
Ivy directly, which sometimes produces suboptimal results and skips
dynamically inserted content.

With the end of v11's LTS, we'll support only Angular v12 and up.

PR Close #45883
2022-05-05 15:28:42 -07:00
Kristiyan Kostadinov
29039fcdbc feat(core): support TypeScript 4.7 (#45749)
Adds support for TypeScript 4.7. Changes include:
* Bumping the TS version as well as some Bazel dependencies to include https://github.com/bazelbuild/rules_nodejs/pull/3420.
* Adding a backwards-compatibility layer for calls to `updateTypeParameterDeclaration`.
* Making `LView` generic in order to make it easier to type the context based on the usage. Currently the context can be 4 different types which coupled with stricter type checking would required a lot of extra casting all over `core`.
* Fixing a bunch of miscellaneous type errors.
* Removing assertions of `ReferenceEntry.isDefinition` in a few of the language service tests. The field isn't returned by TS anymore and we weren't using it for anything.
* Resolving in error in the language service that was caused by TS attempting to parse HTML files when we try to open them. Previous TS was silently setting them as `ScriptKind.Unknown` and ignoring the errors, but now it throws. I've worked around it by setting them as `ScriptKind.JSX`.

PR Close #45749
2022-04-29 12:19:45 -04:00
Sumit Arora
2eb39c0878 fix(devtools): inline loading svg (#45762)
* inlined loading animation svg instead of using absolute url
* removing unused assets folder from the build

PR Close #45762
2022-04-27 09:07:38 -07:00
Sumit Arora
b5f39c5da1 docs(devtools): updating firefox documentation (#44952)
updating typo

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
e589bc6227 feat(devtools): added string flag for browser support (#44952)
* Added `flag_browser` to toggle between different browser builds chrome and firefox
* Updated build command to support new flag configuration

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
bc0b6fe67d feat(devtools): adding firefox support (#44952)
* Updating manifest.json to new build structure
* Adding doctype to pages to remove warnings

PR Close #44952
2022-04-12 18:41:37 +00:00
Sumit Arora
ceb19c044a feat(devtools): renaming shell-chrome (#44952)
Renaming `shell-chrome` to `shell-browser` contains the build that supports both browsers.

PR Close #44952
2022-04-12 18:41:37 +00:00