Commit graph

98 commits

Author SHA1 Message Date
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
Keith Li
dc4b4aa57e feat(devtools): Display getters and setters in devtools property viewer (#49695)
Display the function representations of get/set properties in the property viewer just like the existing UI for function properties

PR Close #49695
2023-09-01 14:41:04 +00:00
AleksanderBodurri
78afe889fd refactor(devtools): migrate material legacy components to mdc (#51590)
Removes all legacy angular material imports and moves devtools over to mdc.

PR Close #51590
2023-08-31 17:31:42 +00:00
Joey Perrott
1baeca87e3 fix(devtools): remove unnecessary escaping in regex expressions (#51554)
Correct various Useless regular-expression character escape issues.

PR Close #51554
2023-08-29 21:52:33 +00:00
aanchal
388d1db89d docs: add the title tag (#51233)
PR Close #51233
2023-08-01 12:15:11 -07:00
aanchal
584a32d8e3 docs: add the title tag (#51199)
PR Close #51199
2023-08-01 11:54:36 -07:00
Kristiyan Kostadinov
3a59de681f fix(devtools): ensure that inspected component label is always in the viewport (#50656)
Currently the label showing the component name is always positioned from the bottom/right edge of the element which may be outside of the viewport. These changes add some logic to fall back to a different position so that the label is always visible.

I've also cleaned the `highlighter.ts` file up a bit.

Fixes #48479.

PR Close #50656
2023-07-26 10:04:26 -07:00
alkavats1
1391a7e7e0 docs: updating the contribution guidline docs with the secure tag (#50618)
PR Close #50618
2023-06-22 09:41:26 -07:00
AleksanderBodurri
dbadfea67f feat(devtools): create demo application that uses standalone APIs and standalone components/directives/pipes (#48533)
The existing DevTools demo app that is used for developing on DevTools is exclusively an NgModule application. This commit creates a copy of the old demo app but with no NgModules and only standalone APIs/Components/Directives/Pipes

PR Close #48533
2023-06-12 12:51:24 +02:00
alkavats1
258c773188 docs: remove unused imports and improved the code (#50424)
PR Close #50424
2023-05-25 14:37:54 +00:00
BrianDGLS
24f7c1dc61 refactor(devtools): run spellcheck on devtools dir (#50445)
Correct typos in devtools dir.

PR Close #50445
2023-05-24 13:56:56 +00: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
AleksanderBodurri
aee526a08b build(devtools): make sure linker runs on fesm2022 bundles (#50086)
Since DevTools' Angular framework dependencies are built from local files, they are always up to date. [Recently](https://github.com/angular/angular/pull/49332) these dependencies started being published as fesm2022 instead of fesm2020. We also have an Angular dependency `ngx-flamegraph` that was built and published as fesm2020.

The easiest fix to make sure all of our Angular based dependencies are processed by the linker would be to update the filterPaths field in that file from `/fesm2020/` to `/fesm2020|fesm2022/`. When v16 releases, we can update ngx-flamegraph and publish it with the new APF, letting us change filterPaths to just `/fesm2022/`.

PR Close #50086
2023-05-09 14:41:48 -07:00
Matthieu Riegler
e60b3d45b9 build: remove unused deps (#50116)
* All `@types` package removed have typings in their package.
* brotli is unused
* tmp is unused
* vlq is unused

PR Close #50116
2023-05-08 14:33:20 -07:00
Matthieu Riegler
49386de19f docs: Specify when an app is debuggable by the DevTools. (#48970)
DevMode is when the ng debug object is available. `Optimization:true` is responsible for treeshaking everything behind `ngDevMode`.

Fixes #48968

PR Close #48970
2023-04-17 17:32:41 +00:00
Matthieu Riegler
6daa454e40 fix(devtools): Specify when an app is considered in dev mode. (#48970)
DevMode is when the ng debug object is available. `Optimization:true` is responsible for treeshaking everything behind `ngDevMode`.

PR Close #48970
2023-04-17 17:32:41 +00:00
Angular Robot
f023020368 build: update cross-repo angular dependencies (#49887)
See associated pull request for more information.

PR Close #49887
2023-04-17 15:46:39 +00: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
Matthieu Riegler
ba3e9eac92 feat(devtools): Improve Set support in component properties. (#49316)
With this commit, Sets are displayed with the label Set(#) where # is the size of the set. They are not expandable/editable though.

Partial fix for #49312

PR Close #49316
2023-04-03 19:15:34 -07:00
Kristiyan Kostadinov
585e34bf6c feat(core): remove entryComponents (#49484)
`entryComponents` have been deprecated since version 9, because with Ivy they weren't necessary. These changes remove any remaining references.

BREAKING CHANGE:
* `entryComponents` has been deleted from the `@NgModule` and `@Component` public APIs. Any usages can be removed since they weren't doing anyting.
* `ANALYZE_FOR_ENTRY_COMPONENTS` injection token has been deleted. Any references can be removed.

PR Close #49484
2023-03-23 10:38:03 -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
Kristiyan Kostadinov
99d874fe3b feat(core): add support for TypeScript 5.0 (#49126)
Updates the project to support TypeScript 5.0 and to resolve any errors that came up as a result of the update.

PR Close #49126
2023-02-28 08:24:47 -08:00
Doug Parker
3c079a74c9 release: bump DevTools version (#49121)
PR Close #49121
2023-02-27 10:07:53 -08:00
Andrew Kushnir
83a6e203e3 refactor(compiler): drop obsolete NgFactory and NgSummary config options (#48268)
The options to generate NgFactory and NgSummary files were added to Ivy for backwards compatibility with ViewEngine. Since ViewEngine was deprecated and removed, the NgFactory and NgSummary files are no longer used as well.

This commit drops obsolete options to generate NgFactory and NgSummary files. Also, the logic that generates those files is also removed.

PR Close #48268
2023-02-21 13:03:59 -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
AleksanderBodurri
3a688cb5ec build(devtools): fix issue where esbuild configs were not being set properly in DevTools (#48762)
Previously, a createConfig helper function was created to consolidate common esbuild configurations for DevTools. This function is asynchronous, but when it was used to set the configuration in various esbuild config files, it was used as if it was synchronous.

This commit fixes this issue by wrapping the output of the function in await, so that it propagates the configurations to esbuild correctly.

PR Close #48762
2023-01-18 10:45:13 -08:00
Paul Gschwendtner
c841da82c2 refactor: simplify devtools setup given recent ESM changes (#48521)
Since the `defaults.bzl` repo-wide macros are now supporting ESM,
the special spec-bundle logic from `devtools` can be removed.

Also the esbuild configurations need to be updated to account
for the recent dev-infra build-tooling changes. Also properly
now ensures that `aysnc/await` is downleveled for ZoneJS compatibility.

PR Close #48521
2022-12-19 19:50:44 +00:00
Lukas Matta
2e65a2bd84 fix(devtools): Replace material imports and styles (#48420)
In the #48216 Material deps were updated to v15,
but the components and modules in DevTools were not
updated to MDC nor replaced with the legacy definitions.

PR Close #48420
2022-12-13 13:22:25 -08:00
Alan Agius
612eaca3c5 build: update cross-repo dependencies to latest stable version (#48216)
With this change we update the cross-repo dependencies to the latest stable version

PR Close #48216
2022-11-29 12:29:46 -08: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
AleksanderBodurri
b6c90e8e0b fix(devtools): fix positioning of property explorer expansion icon (#47446)
At some point this went out of sync with the rest of the styling around it. This commit fixes the positioning.

PR Close #47446
2022-09-19 16:59:13 +02:00
Alan Agius
16f96eeabf refactor(compiler-cli): remove enableIvy options (#47346)
This option has no longer any effect as Ivy is the only rendering engine.

BREAKING CHANGE: Angular compiler option `enableIvy` has been removed as Ivy is the only rendering engine.

PR Close #47346
2022-09-06 11:33:48 -07:00
Paul Gschwendtner
b757b1387c build: update dev-infra packages and account for build-tooling split from ng-dev (#46976)
The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.

PR Close #46976
2022-08-02 09:37:37 -07: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
Paul Gschwendtner
83ef9d2fd9 build: remove unused karma debug config file (#46491)
As part of the initial devtools migration (moving it into this repo with
Bazel), we copied some of the Bazel Karma debug config code since it was
not available from the shared dev-infra repo. We already switched to the
shared code that is now available, but were missing an now-unused file.

PR Close #46491
2022-06-24 13:09:25 -07:00
Paul Gschwendtner
d248d83c17 build: convert release package build scripts to typescript (#46456)
Follow-up to: cce395a928.

PR Close #46456
2022-06-22 14:35:31 -07:00
Paul Gschwendtner
ffedcdec08 build: replace copied spec_bundle rule in devtools with dev-infra rule (#46437)
Replaces the copied `spec_bundle` rule in the devtools folder with the
one provided by dev-infra. Initially we couldn't use the rule because
it wasn't available / and also later didn't work with the linker
version from `compiler-cli` built from `HEAD`.

PR Close #46437
2022-06-21 11:48:03 -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
SyedAhm3r
db841d02c9 fix(devtools): Variables initialized to undefined appearing as [setter] in property inspector (#45921)
Fixed the condition and added a test case to catch the fix

PR Close #45921
2022-05-16 10:28:04 -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
mgechev
216a966757 docs: simplify the DevTools readme and add publishing instructions (#45905)
Remove duplicate information. Add publishing instructions for Firefox
and Chrome.

PR Close #45905
2022-05-09 13:58:06 -07:00
mgechev
1a233c2c55 docs: update the Angular DevTools supported version in docs and README (#45902)
Ensure we document we support Angular v12 or older. Also remove Ivy as
a requirement because that's implicit.

PR Close #45902
2022-05-05 16:56:46 -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
a212fb4dde docs: update the Angular DevTools auto-generated READMEs (#45884)
Replace the auto-generated READMEs in the different Angular DevTools
submodules with brief descriptions.

PR Close #45884
2022-05-05 15:29:27 -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