Commit graph

913 commits

Author SHA1 Message Date
Joey Perrott
894c1c5f10 refactor: apply prettier formatting to integration (#54653)
Apply prettier formatting to integration directories

PR Close #54653
2024-04-02 20:42:04 +00:00
Kristiyan Kostadinov
b02b31a915 feat(compiler-cli): drop support for TypeScript older than 5.4 (#54961)
Drops support for TypeScript versions older than 5.4.

BREAKING CHANGE:
* Angular no longer supports TypeScript versions older than 5.4.

PR Close #54961
2024-03-21 22:07:45 -07:00
Kristiyan Kostadinov
5b927c094d build: update to TypeScript 5.4 stable (#54743)
Updates the repo to the stable version of TypeScript 5.4.

PR Close #54743
2024-03-11 09:16:55 -07:00
Paul Gschwendtner
8a8b682d05 test: integration test for output() api (#54650)
Adds an integration test for `output()` and `outputFromObservable()`.
The test verifies the JIT transform as well.

PR Close #54650
2024-03-06 12:34:39 +01:00
Kristiyan Kostadinov
d7c686537a build: update to the TypeScript 5.4 RC (#54643)
Updates the repor to the release candidate of the TypeScript 5.4.

PR Close #54643
2024-02-28 17:43:17 +01:00
Kristiyan Kostadinov
974958913c feat(core): support TypeScript 5.4 (#54414)
Adds support for TypeScript 5.4 to the project.

PR Close #54414
2024-02-26 18:29:09 -08:00
Paul Gschwendtner
38c0084ed2 test: verify signal-based queries in CLI integration test (#54314)
Adds usages of signal-based queries into the signal integration test to
verify queries can be used in production, and testing environments as
expected (i.e. the transform works as expected).

PR Close #54314
2024-02-07 18:56:04 +00:00
Paul Gschwendtner
6cb47a7c9d test: verify output() in signals integration test (#54217)
Adds `output()` to the signal inputs integration test to verify
full integration with the Angular CLI. In the future we may
consider renaming the test to something less specific to signal inputs,
but for now this serves the purpose and `output()` is a closely related
part to signal-based inputs.

it doesn't warrant creating another new integration test, as those are
quite expensive to maintain and run.

PR Close #54217
2024-02-05 15:08:35 +00:00
Mateusz Daniluk
de777afbc5 refactor: standardize doctype declaration to <!DOCTYPE html> (#51052)
This commit standardizes the doctype declaration across all HTML files in the project to use `<!DOCTYPE html>`

PR Close #51052
2024-02-01 19:29:46 +00:00
Paul Gschwendtner
863be4b698 feat(core): expose new input API for signal-based inputs (#53872)
Enables signal inputs for existing Zone based components.
This is a next step we are taking to bring signal inputs earlier to the Angular community.

The goal is to enable early access for the ecosystem to signal inputs, while we are continuing
development of full signal components as outlined in the RFC. This will allow the ecosystem
to start integrating signals more deeply, prepare for future migrations, and improves code quality
and DX for existing components (especially for OnPush).

Based on our work on full signal components, we've gathered more information and learned
new things. We've improved the API by introducing a way to intuitively declare required inputs,
as well as improved the API around initial values. We even support non-primitive initial values
as the first argument to the `input` function now.

```ts
@Directive({..})
export class MyDir {
  firstName = input<string>();            // string|undefined
  lastName = input.required<string>();    // string
  age = input(0);                         // number
```

PR Close #53872
2024-01-10 12:33:31 -08:00
Paul Gschwendtner
eba017f8c7 refactor(compiler-cli): add transform to support signal input in JIT (#53808)
This commit adds a transform for supporting input signals in JIT
environments. The transform will be wired up for Angular CLI
applications automatically. An integration test verifies that this fixes
unit testing with signal inputs.

The transform basically will take the signal input metadata and
transform it into `@Input` decorators that can provide static
information to the Angular JIT runtime when the directive/component
definition is compiled.

PR Close #53808
2024-01-10 12:21:05 +00:00
Paul Gschwendtner
7f5ae52c02 test: add integration test for signal inputs in CLI (#53808)
This commit introduces a new integration test to ensure signal inputs
work as expected for end uses in Angular CLI applications.

PR Close #53808
2024-01-10 12:21:05 +00:00
Charles Lyding
f2245d1fd5 build: convert build/test scripts to use fast-glob (#53397)
The repository currently has two globbing packages. To minimize the number of packages in
the framework repository, the uses of the `glob` package are being converted
to `fast-glob` which is used by the tooling repository.  The change is mostly mechanical
and in this change the build and test scripts are converted.

PR Close #53397
2023-12-08 14:37:07 -08:00
Alan Agius
e8ad51aaed test: refactor platform-server integration tests to use application builder (#53205)
This commit updates the platform-server tests to use the new application builder, with this change we also have to remove the sizechecks since esbuild will do code motion and split the code into multiple chunks example `chunk-QUKLKPSE.js`.

PR Close #53205
2023-11-28 11:07:01 +01:00
Kristiyan Kostadinov
c62b2dae8c build: update to TypeScript 5.3 final (#53087)
Bumps the repo to the final version of TypeScript 5.3.

PR Close #53087
2023-11-21 10:45:00 -08:00
Kristiyan Kostadinov
94096c6ede feat(core): support TypeScript 5.3 (#52572)
Updates the repo to support TypeScript 5.3 and resolve any issues. Fixes include:
* Updating usages of TS compiler APIs to match their new signatures.
* In TS 5.3 negative numbers are represented as `PrefixUnaryExpression` instead of `NumericExpression`. These changes update all usages to account for it since passing a negative number into the old APIs results in a runtime error.

PR Close #52572
2023-11-09 22:56:41 +00:00
Susheel Thapa
31c7bc1cf4 docs: fixed typos (#52297)
PR Close #52297
2023-10-25 16:39:04 -07:00
Alan Agius
405ec8c796 fix(platform-server): resolve relative requests URL (#52326)
Prior to this commit relative HTTP requests were not being resolved to absolute even thought the behaviour is documented in https://angular.io/guide/universal#using-absolute-urls-for-http-data-requests-on-the-server.

This caused relative HTTP requests to fail when done on the server because of missing request context. This change is also required to eventually support HTTP requests handled during prerendering (SSG).

Closes #51626

PR Close #52326
2023-10-23 12:02:21 -07:00
cexbrayat
7ba5dc87ed refactor(core): remove test.ts files in integration tests (#52109)
These files are not necessary since CLI v15+

PR Close #52109
2023-10-18 11:52:55 -07:00
Matthieu Riegler
c2f270cf14 refactor(compiler): Delete the @angular/compiler/testing module. (#49872)
The package was removed in components, it can now be deleted here also.

PR Close #49872
2023-10-09 15:58:25 -07:00
Andrew Kushnir
db3a90191f test(core): add an integration app for @defer feature (#52065)
This integration app also contains the size-tracking build setup to measure the payload size of `@defer` feature.

PR Close #52065
2023-10-06 12:11:29 -07:00
Kristiyan Kostadinov
43e6fb0606 feat(core): enable block syntax (#51994)
Enables the new `@` block syntax by default by removing the `enabledBlockTypes` flags. There are still some internal flags that allow special use cases to opt out of the block syntax, like during XML parsing and when compiling older libraries (see #51979).

PR Close #51994
2023-10-03 15:26:05 -07:00
Matthieu Riegler
81e7f5be03 test(animations): update the integration test (#50738)
Let's have the same test app for async and eagerly loaded animations.

PR Close #50738
2023-09-29 10:49:41 -07:00
Matthieu Riegler
2c2ccf76e2 refactor(animations): Add integration test for animations/async. (#50738)
This integration test aims to cover that we do not break the code splitting of the animation module when we use `provideAnimationsAsync()`.

PR Close #50738
2023-09-29 10:49:40 -07:00
Kristiyan Kostadinov
e23aaa7d75 feat(core): drop support for older TypeScript versions (#51792)
Drops support for versions of TypeScript older than 5.2

BREAKING CHANGE:
Versions of TypeScript older than 5.2 are no longer supported.

PR Close #51792
2023-09-19 12:04:09 +02:00
Alan Agius
4798ec4166 fix(zone.js): add conditional exports to zone.js package (#51652)
This is needed to better support native ESM modules and avoid the otherwise necessary deep imports like `zone.js/fesm2015/zone-node.js` due to disallowed directory imports.

PR Close #51652
2023-09-06 16:37:26 +00:00
Kristiyan Kostadinov
bf9663847d build: update type TypeScript 5.2 final (#51503)
Bumps up the repo to the stable version of TypeScript 5.2.

PR Close #51503
2023-08-28 17:02:30 +00:00
Kristiyan Kostadinov
9cc52b9b85 feat(core): support TypeScript 5.2 (#51334)
Updates the project to support TypeScript 5.2.

PR Close #51334
2023-08-18 07:55:16 -07:00
Paul Gschwendtner
552ea77854 refactor(compiler-cli): drop tsickle code paths (#50602)
`tsickle` is not used in any code paths in 3P and we can remove
this complexity. The `tsickle` npm package has not been released
in a while and we are risking breakages with e.g. future TypeScript
versions.

Note that the `ng_module` rule was updated to not emit through
tsickle at all. The tsickle in 1P is done directly by `tsc_wrapped`
and our code path in `compiler-cli` is not needed at all.

PR Close #50602
2023-08-17 10:23:49 -07:00
aanchal
6691c497e2 docs: add lang attributes to the files (#51200)
PR Close #51200
2023-08-01 11:58:44 -07:00
Matthieu Riegler
fa80975832 refactor(core): use globalThis for global (#50063)
`globalThis` is now available on every runtime supported by Angular

PR Close #50063
2023-07-14 18:32:01 +00:00
Matthieu Riegler
5d11844a7c docs: update link to the TS config. (#50933)
This TS config doc is now at https://angular.io/guide/typescript-configuration

PR Close #50933
2023-07-05 13:58:35 +02:00
Paul Gschwendtner
78791cea4d build: update browserslist db for integration tests (#50772)
Since we updated the devkit dependencies, we need to update
the browserslist DB versions in integration tests to avoid
browser mismatches causing errors like the following:

```
BrowserslistError: [BABEL] /tmp/ng-integration-test-91jP3g/test-sandbox/node_modules/zone.js/fesm2015/zone.js: Unknown version 114 of edge (While processing: "base$0$0")
```

PR Close #50772
2023-06-20 17:20:50 +02:00
aanchal
d381b7479c docs: included title attribute in the iframe tag (#50698)
PR Close #50698
2023-06-20 11:03:22 +02:00
alkavats1
afb7ea4e8c refactor: removed the unused contructor in lazyModule (#50536)
empty constructor removed and reduced the codesmells

PR Close #50536
2023-06-12 15:35:35 +02:00
Alan Agius
0875b519b9 fix(platform-server): surface errors during rendering (#50587)
Prior to this change in some cases errors tht happen during routing were not being surfaced. This is due to the fact that the router has floating promises, and the platform was being destroyed prior to these being settled.

PR Close #50587
2023-06-07 12:44:08 -07:00
Alan Agius
edceb486dd fix(core): wait for HTTP in ngOnInit correctly before server render (#50573)
Previously, with `mergeMap` we did not cancel previous subscriptions to zoneIsStable which caused the application to be stablized before hand.

Closes: #50562

PR Close #50573
2023-06-06 14:12:34 -07:00
Kristiyan Kostadinov
cf15c290f0 build: update to TypeScript 5.1 final (#50548)
Bumps us up to the final version of TypeScript 5.1 which dropped overnight.

PR Close #50548
2023-06-02 14:06:46 -07:00
alkavats1
25b6b9788d docs: improved code quality (#50443)
PR Close #50443
2023-05-30 13:00:39 -07:00
alkavats1
178ece4dfb docs: correcting existing import for the commonHttpTesting (#50473)
PR Close #50473
2023-05-30 12:59:53 -07:00
Kristiyan Kostadinov
69dadd2502 feat(core): support TypeScript 5.1 (#50156)
Updates the project to support building with TypeScript 5.1.

PR Close #50156
2023-05-09 14:44:30 -07:00
Andrew Kushnir
59837f4749 refactor(platform-server): import xhr2 dynamically in the ServerXhr class (#50095)
This commit updates the `@angular/common/http` and `@angular/platform-server` packages to allow dynamic import of the `xhr2` dependency. The `xhr2` dependency has side-effects that rely on a global scope and as a result in some environments those side-effectful calls fail. With the changes from this PR, the import is delayed until it's actually needed, which gives a chance for the underlying platform to setup global scope (via shims) as needed.

Co-authored-by: alan-agius4 <17563226+alan-agius4@users.noreply.github.com>

PR Close #50095
2023-05-08 14:32:43 -07:00
Jessica Janiuk
0b23ad7f56 test(core): add size tracking test for hydration apps (#49955)
This adds test to track size regressions when
hydration is enabled.

PR Close #49955
2023-04-24 09:57:52 -07:00
Alan Agius
ce0ce4cde1 docs: remove no longer available tests from readme (#49975)
This commit removes no longer available integration tests from the readme.

PR Close #49975
2023-04-24 09:57:23 -07:00
Alan Agius
38661a6f2b test: update platform-server tests to test both ngmodule and standalone application (#49927)
This commits update the platform-server test structure to add 2 applications in the Angular CLI workspace one based on ngmodules and another standalone. The same E2E suit is ran on both apps.

PR Close #49927
2023-04-19 14:56:29 +00:00
Alan Agius
03ae094e8f test: update platform-server integration tests to use the Angular CLI (#49900)
This commit updates the platform-server integration tests to use the Angular CLI as it makes it easier to add more tests and remove the custom webpack setup.

PR Close #49900
2023-04-18 19:47:02 +00:00
Matthieu Riegler
aebf1158f6 ci: Remove environment files and EnableProdMode on integration tests (#49746)
Since v15, prod mode is handled by the CLI with the `optimization` flag. We can remove the environement files and `enableProdMode` when the tests use the CLI.

PR Close #49746
2023-04-14 14:13:33 +00:00
Alan Agius
ddf0d4eabe fix(http): HTTP cache was being disabled prematurely (#49826)
This commit fixes an issue were on the server the HTTP cache was being disabled prematurely which caused HTTP calls performed in `ngOnInit` life cycle hooks not to be cached.

PR Close #49826
2023-04-13 14:04:00 +00:00
Alan Agius
71e9532d5d test: improve testing of HTTP and transfer state cache (#49810)
This commit improves the HTTP transfer state integration test by using `provideClientHydration` method and validates that no HTTP calls are performed during the client bootstrapping.

PR Close #49810
2023-04-12 09:45:34 -07:00
Alan Agius
079f4bc1ef fix(http): wait for all XHR requests to finish before stabilizing application (#49776)
Previously, since the `HttpXhrBackend` is a singleton, the macrotask was created and completed only for the initial request since it was stored as in property in the class instance. This commit replaces this logic to create a macro task for every XHR request.

Closes #49730

PR Close #49776
2023-04-11 13:44:30 -07:00