Commit graph

21 commits

Author SHA1 Message Date
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
lilbeqiri
8737544d69 build(devtools): prevent underscores from being added at build time (#53921)
Add the keepNames config property to esbuild in order to prevent prepending of underscores to the class names.

PR Close #53921
2024-01-18 10:22:12 +01: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
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 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
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
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
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
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
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
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
Paul Gschwendtner
c996b477a9 build: replace bazel devserver with shared dev-infra implementation (#45452)
As part of the devtools migration, we copied the custom http server/
dev-server from the `angular/components` repo. This server implementation
has now moved to the shared dev-infra code, and we can clean up the
copy in this repository now.

PR Close #45452
2022-03-28 09:23:28 -07:00
Renovate Bot
010a39f856 build: update bazel (#45431)
Update `@bazel` packages to the latest 5.x version.

Some of the changes here are modeled after
angular/dev-infra@40c0ac8559.

Co-Authored-By: George Kalpakas <kalpakas.g@gmail.com>

PR Close #45431
2022-03-25 12:18:33 -07:00
AleksanderBodurri
445fbf81fd refactor(devtools): bring the angular devtools directory into the root bazel workspace
Previously devtools used a nested workspace for its bazel configurations. This meant framework dependencies were consumed via npm.

Now devtools is part of the root bazel directory that all other files in this codebase fall under. This allows us to build devtools using local angular packages, removing the need to consume these dependencies with npn. This is useful because we no longer have to update these dependencies with an automated tool like renovate, and our CI tests will always run against the most up to date framework packages.
2022-01-26 16:35:31 -05:00
AleksanderBodurri
6b06fa3f78 refactor(devtools): make bazel labels follow snake case convention
Previously, camel case was used for bazel labels in the devtools directory. This commit changes these labels to snake case except in the case where the label is identical to the directory name that the BUILD file is in.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
27a9b9f12c refactor(devtools): remove inaccurate comment in bazelrc and defaults.bzl
Both of these comments were included accidentally after porting over bazel code from angular/angular and angular/components to devtools.

They are not relevant to devtools so this commit removes them.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
9c13d48b66 refactor(devtools): clean up some of tooling brought in from angular/components
Removes MDC constants and unneeded angular package configs from packages.bzl.

Removes partial-compilation-integration from the karma web test tags because we don't perform any of partial compilation integration tests for devtools.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
aab59c1e09 refactor(devtools): dedupe some bazel tooling brought in from angular/components
Some tooling was brought in from angular/components to help with bundling spec files for Karma. This tooling has since been ported over to the dev-infra repo. This commit dedupes the tooling and instead depends on the angular/dev-infra-private repo.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
82d46b20b1 refactor(devtools): run ng-dev format on bazel files in devtools directory 2022-01-26 16:35:30 -05:00
AleksanderBodurri
528f33d13d refactor(devtools): prepare codebase for migration to angular/angular repo 2021-11-21 20:23:18 -05:00