Commit graph

13066 commits

Author SHA1 Message Date
Tomasz Domański
7cd89ad2c6 fix(service-worker): assign initializing client's app version, when a request is for worker script (#58131)
When a new version of app is available in a service worker, and a client with old version exists, web workers initialized from a client with old version will now be properly assigned with the same version.

Before this change, a web worker was assigned with the newest version.

Fixes #57971

PR Close #58131
2025-04-02 14:23:52 +00:00
Matthieu Riegler
9604ec6e16 refactor(compiler): prevent object methods being recognised as entities (#58100)
With this commit object methods (like `valueOf`, `toString` are not considered as valid entities anymore.

PR Close #58100
2025-04-02 11:35:54 +00:00
Matthieu Riegler
2d8943122b docs: add targets for the bundling debug (#60693)
PR Close #60693
2025-04-02 11:33:52 +00:00
Andrew Kushnir
d0c979e0f0 test(bazel): update common package contents test to skip chunks (#60676)
This commit updates the `common` package contents test to skip JS chunks, while still making sure that the main entrypoint files are present.

PR Close #60676
2025-04-01 18:16:49 +00:00
Andrew Kushnir
d725c6ed0f refactor(common): convert scripts within packages/common to relative imports (#60676)
This commit updates scripts within `packages/common` to relative imports as a prep work to the upcoming infra updates.

PR Close #60676
2025-04-01 18:16:49 +00:00
Andrew Kushnir
7edca03989 refactor(router): re-export the RouterTestingModule symbols (#60674)
This commit re-exports the symbols that are exposed by the `RouterTestingModule` (which re-exports
the symbols from the `RouterModule`. These re-exports are needed for the Angular compiler
to overcome its limitation (on the consumer side) of not knowing where to import import
symbols when relative imports are used within the package.

PR Close #60674
2025-04-01 18:16:05 +00:00
Andrew Kushnir
1fa95e5c2e refactor(router): switching to relative imports within the router package (#60674)
This commit updates scripts within `packages/router` to relative imports as a prep work to the upcoming infra updates.

PR Close #60674
2025-04-01 18:16:05 +00:00
Andrew Scott
bd1a755ab4 refactor(router): Update StateManager base class with common concrete implementations (#60617)
This commit updates the `StateManager` base class to contain common
concrete implementations that would be the same regardless of whether
the state manager is backed by the browser history API or the Navigation
API.

PR Close #60617
2025-04-01 14:05:44 +00:00
Jessica Janiuk
b3c7282121 Revert "refactor(core): add ApplicationRef.prototype.bootstrapImpl with an injector parameter (#60622)" (#60669)
This reverts commit 7cb8639da9.

PR Close #60669
2025-04-01 12:18:52 +00:00
Doug Parker
e816d2d694 refactor(core): add ApplicationRef.prototype.bootstrapImpl with an injector parameter (#60622)
This allows any components individually bootstrapped to inherit from a unique `Injector`. This is useful when bootstrapping multiple root components with different providers.

For now, the function is private while we explore potential designs to consolidate it with the existing `ApplicationRef.prototype.bootstrap` method.

PR Close #60622
2025-04-01 12:01:00 +00:00
Paul Gschwendtner
fa48f98d9f fix(animations): add missing peer dependency on @angular/common (#60660)
As of
1c4a3677eb (diff-64131f78c9ae21421dc277debf9c8a16705a90fa649ddf580da3db434c295b11R7-R8),
the animations package has a dependency on `@angular/common`. This
commit adds this dependency to the `package.json`— as otherwise pnpm
strict builds will fail.

PR Close #60660
2025-04-01 11:59:50 +00:00
Andrew Kushnir
9eaeffd398 refactor(compiler): convert scripts within packages/compiler to relative imports (#60655)
This commit updates scripts within `packages/compiler` to relative imports as a prep work to the upcoming infra updates.

PR Close #60655
2025-04-01 11:59:14 +00:00
Andrew Kushnir
f94f3a6acf refactor(compiler-cli): convert scripts within packages/compiler-cli to relative imports (#60655)
This commit updates scripts within `packages/compiler-cli` to relative imports as a prep work to the upcoming infra updates.

PR Close #60655
2025-04-01 11:59:14 +00:00
Andrew Kushnir
0b7fc584d4 refactor(forms): convert scripts within packages/forms to relative imports (#60624) (#60654)
This commit updates scripts within `packages/forms` to relative imports as a prep work to the upcoming infra updates.

PR Close #60624

PR Close #60654
2025-04-01 11:58:28 +00:00
Andrew Scott
0e9e0348dd fix(language-service): Update adapter to log instead of throw errors (#60651)
This prevents errors from being thrown from the adapters. Throwing errors
in the language service causes the extension to crash. Repeated errors
will permanently break the extension.

fixes https://github.com/angular/vscode-ng-language-service/issues/2166

PR Close #60651
2025-03-31 21:36:35 +00:00
Vincent
74cd7be6b3 refactor(core): Make unsupported styling type error message clearer (#59563)
The previous message would sound like a full sentence when using a signal without `()` (Example: Unsupported styling type function: [Input Signal: neutral]). The new formatting makes it a bit more obvious that the type itself is the problem.

PR Close #59563
2025-03-31 21:31:43 +00:00
Andrew Kushnir
4387b37eb9 refactor(router): drop special handling of the OutletInjector (#58351)
This commit updates the OutletInjector and related code to avoid special handling of that injector. The main code that had special handling was refactored to no longer require is in https://github.com/angular/angular/pull/56763, this commit completes the cleanup.

PR Close #58351
2025-03-31 20:46:01 +00:00
Matthieu Riegler
38557304e3 refactor(core): remove TODOs referencing #24571 (#60648)
Fixing those todos are now mostly breaking changes.
The situation is "good" as is.

PR Close #60648
2025-03-31 20:24:30 +00:00
Vlad Boisa
b2222889c8 docs: remove todo comment (#59928)
Removes outdated todo comment

PR Close #59928
2025-03-31 19:57:57 +00:00
arturovt
f3361fbf3e refactor(platform-browser): remove empty deps lists (#60312)
Removes empty `deps` lists in Platform-Browser providers.

PR Close #60312
2025-03-31 18:09:08 +00:00
Angular Robot
84f3ba0d90 build: lock file maintenance (#60635)
See associated pull request for more information.

PR Close #60635
2025-03-31 14:43:03 +00:00
Jessica Janiuk
dbbddd1617 fix(core): prevent omission of deferred pipes in full compilation (#60571)
This prevents a bug where pipes would be excluded from defer dependency generation.

PR Close #60571
2025-03-31 13:11:13 +00:00
Andrew Kushnir
0252da985a build: remove obsolete bundling test apps (#60591) (#60615)
This commit removes a few bundling test apps that do not provide any value, but require time on CI and during local development to update golden files.

The functionality that was tested in those apps is covered by various other tests that we have in a repository (either in the same `packages/core/test/bundling` folder or in other unit/integration tests).

PR Close #60591

PR Close #60615
2025-03-28 19:57:06 +00:00
Jessica Janiuk
43d03f840e ci: fix over extraction of init symbols in symbol tests (#60493) (#60614)
This omits including any init_ symbols in the symbol tests that were unnecessary and causing friction.

PR Close #60493

PR Close #60614
2025-03-28 19:48:36 +00:00
Andrew Kushnir
882f96fead refactor(core): produce a message about @defer behavior when HMR is enabled (#60533)
When the HMR is enabled in Angular, all `@defer` block dependencies are loaded
eagerly, instead of waiting for configured trigger conditions. From the DX perspective,
it might be seen as an issue when all dependencies are being loaded eagerly. This commit
adds a logic to produce a message into the console to provide more info for developers.

PR Close #60533
2025-03-28 15:00:32 +00:00
Matthieu Riegler
b18215d1c8 refactor(core): retrieve the jsActionMap only once. (#60587)
Before the change, the map was pull on every loop execution.

PR Close #60587
2025-03-28 13:35:29 +00:00
Kristiyan Kostadinov
15f53f035b fix(migrations): handle shorthand assignments in super call (#60602)
Fixes that the logic which checks whether a parameter is used inside a `super` call wasn't accounting for shorthand assignments.

PR Close #60602
2025-03-28 13:34:37 +00:00
Kristiyan Kostadinov
4b161e6234 fix(migrations): inject migration not handling super parameter referenced via this (#60602)
The inject migration has some logic that treats parameters referenced directly inside of `super` differently. This logic didn't account for the fact that the parameters could be inside of inline functions which have less strict access requirements.

PR Close #60602
2025-03-28 13:34:37 +00:00
arturovt
8931fca34c refactor(core): calculate hasHttpTransferCacheOptions later (#60605)
Prior to this commit, `hasHttpTransferCacheOptions` was calculated immediately after the `featuresKind` set was declared, which was always defaulted to `false`.

PR Close #60605
2025-03-28 13:33:58 +00:00
Andrew Scott
958e98e4f7 fix(router): Add missing types to transition (#60307)
The 'types' property was added recently and is available in all browsers that support view transitions

fixes #60285

PR Close #60307
2025-03-28 11:51:07 +00:00
Andrew Scott
f4c4b10ea8 fix(compiler-cli): Produce fatal diagnostic on duplicate decorated properties (#60376)
This prevents the compilation and language service from crashing.

fixes https://github.com/angular/vscode-ng-language-service/issues/2091

PR Close #60376
2025-03-27 20:26:42 +00:00
Benjamin Pabst
64da69f7b6 fix(core): check ngDevMode for undefined (#60565)
This adds a check to "toSignal" whether ngDevMode is not undefined as this can happen for some MFE applications.

PR Close #60565
2025-03-27 20:25:41 +00:00
Kristiyan Kostadinov
ca5aa4d55b fix(compiler): throw for invalid "as" expression in if block (#60580)
Adds some validation that the "as" expression in an `@if` block is valid.

Fixes #59939.

PR Close #60580
2025-03-27 20:24:59 +00:00
Ryan Russell
da6e93f434 fix(core): preserve comments in internal inject migration (#60588)
The internal-only combineMemberInitializers option
for the inject migration sometimes dropped the
doc comments from the members.

PR Close #60588
2025-03-27 20:24:23 +00:00
Shashwat Pathak
b53220a9bf docs: update description for AfterRenderPhase.EarlyRead (#60527)
PR Close #60527
2025-03-27 18:33:24 +00:00
Andrew Kushnir
96b4f8abde refactor(platform-browser): switching to relative imports within the platform-browser package (#60559)
This commit updates scripts within `packages/platform-browser` to relative imports as a prep work to the upcoming infra updates.

PR Close #60559
2025-03-27 18:31:53 +00:00
Andrew Kushnir
8e7a6a32fa refactor(platform-browser-dynamic): switching to relative imports within the platform-browser-dynamic package (#60559)
This commit updates scripts within `packages/platform-browser-dynamic` to relative imports as a prep work to the upcoming infra updates.

PR Close #60559
2025-03-27 18:31:52 +00:00
Andrew Kushnir
f4b59770e1 refactor(platform-server): switching to relative imports within the platform-server package (#60559)
This commit updates scripts within `packages/platform-server` to relative imports as a prep work to the upcoming infra updates.

PR Close #60559
2025-03-27 18:31:52 +00:00
Andrew Kushnir
c2ef28062a refactor(animations): convert scripts within packages/animations to relative imports (#60230)
This commit updates scripts within `packages/animations` to relative imports as a prep work to the upcoming infra updates.

PR Close #60230
2025-03-27 18:28:01 +00:00
Andrew Kushnir
c64956c411 refactor(benchpress): convert scripts within packages/benchpress to relative imports (#60230)
This commit updates scripts within `packages/benchpress` to relative imports as a prep work to the upcoming infra updates.

PR Close #60230
2025-03-27 18:28:01 +00:00
Jessica Janiuk
bc79985c65 fix(core): fix regexp for event types (#60592)
This regexp accidentally worked. It was splitting by individual character and putting a pipe in rather than splitting by set of event types

PR Close #60592
2025-03-27 18:27:04 +00:00
arturovt
3bc8fe40e4 refactor(service-worker): drop fromEvent (#60424)
In this commit, we remove `fromEvent` and replace it with a manually created observable to import fewer symbols from RxJS. Some codebases may not use `fromEvent` at all, but using it in a single place would still include it in the initial bundle.

PR Close #60424
2025-03-27 18:17:22 +00:00
Paul Gschwendtner
22a0e54ac4 fix(compiler-cli): support relative imports to symbols outside rootDir (#60555)
By default, the compiler-cli uses the relative import strategy when
there is no `rootDir` or `rootDirs`. This is expected as everything is
assumed to be somehow reachable through relative imports.

With `rootDirs` that allow for a "virtual file system"-like environment,
the compiler is not necessarily able to always construct proper relative
imports. The compiler includes the `LogicalProjectStrategy` for this
reason. This strategy is able to respect `rootDirs` to construct
relative paths when possible.

This logic currently accidentally triggers when there is a `rootDir`
set. This option is not to be confused with the virtual directory
option called `rootDirs`. The compiler currently confuses this and
accidentally enters this mode when there is just a `rootDir`— breaking
in monorepos that imports can point outside the `rootDir` to e.g. other
compilation unit's `.d.ts` (which is valid; just not `.ts` sources can
live outside the root dir).

This is necessary for our Bazel toolchain migration.

PR Close #60555
2025-03-26 20:45:56 -07:00
Pawel Kozlowski
5a59af0ef8 refactor(core): simplify signature of listenToDirectiveOutput (#60514) (#60547)
We can simplify signature of listenToDirectiveOutput by passing less
arguments (some of them can be derived from already passed arguments).

PR Close #60547
2025-03-26 20:43:13 -07:00
Andrew Kushnir
ee46567475 refactor(language-service): convert scripts within packages/language-service to relative imports (#60540)
This commit updates scripts within `packages/language-service` to relative imports as a prep work to the upcoming infra updates.

PR Close #60540
2025-03-26 20:40:02 -07:00
Andrew Kushnir
c9562ac2cc refactor(localize): convert scripts within packages/localize to relative imports (#60540)
This commit updates scripts within `packages/localize` to relative imports as a prep work to the upcoming infra updates.

PR Close #60540
2025-03-26 20:40:02 -07:00
Andrew Kushnir
650c179371 refactor(upgrade): convert scripts within packages/upgrade to relative imports (#60238)
This commit updates scripts within `packages/upgrade` to relative imports as a prep work to the upcoming infra updates.

PR Close #60238
2025-03-26 20:35:12 -07:00
Andrew Kushnir
1b576ee5f5 refactor(service-worker): convert scripts within packages/service-worker to relative imports (#60238)
This commit updates scripts within `packages/service-worker` to relative imports as a prep work to the upcoming infra updates.

PR Close #60238
2025-03-26 20:35:11 -07:00
Andrew Kushnir
d6d3a87c72 refactor(core): convert scripts within packages/core/test to relative imports (#60227) (#60556)
This commit updates scripts within `packages/core/test` to relative imports as a prep work to the
upcoming infra updates.

PR Close #60227

PR Close #60556
2025-03-26 07:05:23 -07:00
Andrew Kushnir
854a66d8ee refactor(core): convert scripts within packages/core/src to relative imports (#60227) (#60556)
This commit updates scripts within `packages/core/src` to relative imports as a prep work to the upcoming infra updates.

PR Close #60227

PR Close #60556
2025-03-26 07:05:23 -07:00