Commit graph

48 commits

Author SHA1 Message Date
Andrew Scott
0c925af2dd test(router): This commit removes ZoneJS from the router tests (#61078)
There is nothing in the Router that requires ZoneJS and we do not need
`fakeAsync` as a mock clock. We can instead use any mock clock implementation
to speed up test execution.

This removes ZoneJS completely from the bundle of the Router tests.
ZoneJS causes the stacks to be unreadable when combined with the massive
rxjs stack in the router transition.

PR Close #61078
2025-05-05 08:55:01 -07:00
Matthieu Riegler
8f803aa81a build: Run browsers tests without platform-browser-dynamic (#60937) (#61060)
Use the regular `platform-browser` providers instead.

PR Close #61060
2025-04-30 08:21:02 -07:00
Jessica Janiuk
867f389a98 Revert "build: Run browsers tests without platform-browser-dynamic (#60937)" (#61059)
This reverts commit b896ca8ed5.

PR Close #61059
2025-04-30 12:21:01 +02:00
Matthieu Riegler
b896ca8ed5 build: Run browsers tests without platform-browser-dynamic (#60937)
Use the regular `platform-browser` providers instead.

PR Close #60937
2025-04-29 12:10:53 -07:00
Joey Perrott
9dbe6fc18b refactor: update license text to point to angular.dev (#57901)
Update license text to point to angular.dev instead of angular.io

PR Close #57901
2024-09-24 15:33:00 +02:00
Doug Parker
cc1b0f4e8e refactor(zone.js): update imports for Zone setup to invoke patches (#53443)
I initially tried switching to use public entry points under `zone.js/plugins/*`, however this file is both manually compiled for Saucelabs and also built with Bazel for a number of tests. The Bazel integration doesn't work well with depending on real NPM packages, so importing `zone.js/plugins/*` in that context doesn't really work. Instead we need to depend on the internals and manually call the `patch*` functions.

PR Close #53443
2024-03-15 18:11:34 -07:00
Angular Robot
ee68df9be9 build: update all non-major dependencies (#53979)
See associated pull request for more information.

PR Close #53979
2024-01-19 10:11:29 +01:00
Joey Perrott
dc62446ef7 refactor: migrate tools to prettier formatting (#53947)
Migrate formatting to prettier for tools directory from clang-format

PR Close #53947
2024-01-16 19:17:49 -08:00
Alan Agius
0ee0f780e4 build: update dependency jasmine to v5 (#51820)
The patch is to fix upstream bug in `@bazel/jasmine`. See: bazelbuild/rules_nodejs#3691

PR Close #51820
2023-09-19 18:40:16 +02:00
Jessica Janiuk
a08a8ff108 fix(platform-server): bundle @angular/domino in via esbuild (#49229)
This removes one line that should effectively bundle the
angular fork of domino in via esbuild.

PR Close #49229
2023-02-28 13:34:50 -08:00
Paul Gschwendtner
b96545ecd4 build: add missing dependencies to platform-server and tools/testing (#48521)
There are two build targets which never had all its runtime dependencies
properly specified. This wasn't noticed because there were macros in
`defaults.bzl` that automatically included these deps.

In a follow-up we will clean-up this legacy auto-deps feature in
`defaults.bzl`.

PR Close #48521
2022-12-19 19:50:43 +00:00
Paul Gschwendtner
57a0499529 build: bundle tests for karma web test suites (#48521)
Since Karma with Bazel does not support ESM natively, we bundle the
tests using ESBuild into a single AMD file. This not only solves the
ESM issue until we can run browser ESM tests natively (also pending
in the components repo - the esbuild generation follows ESM semantics
but since collapsed we don't rely on the real module system).

A benefit of bundling is also faster and more reliable Karma browser
tests since only a single file needs to be loaded- compared to hundreds
of individual files.

PR Close #48521
2022-12-19 19:50:42 +00:00
Paul Gschwendtner
211d178f0d refactor(platform-server): use proper ESM-compatible import to domino (#48521)
Now that everything runs from within ESM, we need to use the proper
default-import variant to be able to load `domino` from ESM.

PR Close #48521
2022-12-19 19:50:41 +00:00
Paul Gschwendtner
985dbdb511 build: remove unnecessary import to @bazel/jasmine (#48521)
Since we no properly initialize as part of the spec-entrypoint
the hacky logic starting Jasmine can be removed. The init
file now runs before tests run, but after Jasmine is initialized.

Calling `boot` while Jasmine is already initialized results in
tests executing in a different context and before other
initialization work completes.

PR Close #48521
2022-12-19 19:50:41 +00:00
Paul Gschwendtner
c9415e4d75 build: ensure bootstrap transitive runfiles are made available (#48521)
Since we generate a `.mjs` file as entry-point for jasmine tests,
a couple of issues prevented the transitive dependencies from
bootstrap targets to be brought in (causing resolution errors):

1. The `_files` (previously `_esm2015`) targets are no longer needed,
   and they also miss all the information on runfiles.
2. The aspect for computing linker mappings does not respect the
   `bootstrap` attribute from the `spec_entrypoint` so we manually
   add the extract ESM output targets (this rule works with the aspect
   and forwards linker mappings).

PR Close #48521
2022-12-19 19:50:41 +00:00
Paul Gschwendtner
4b2cbc0334 build: update jasmine_node_test macro to support ESM (#48521)
Note: `--require` does not work for ESM. `--import` does not exist
in the current Node versions. Started being available in NodeJS v19.

A custom entry-point script, already supported by dev-infra, simplifies
the whole logic and solves the ESM case.

PR Close #48521
2022-12-19 19:50:41 +00:00
Paul Gschwendtner
20551503fa build: replace _es2015 shorthand with more flexible _files suffix (#48521)
For every `ts_library` target we expose a shorthand that grants
access to the JS files because `DefaultInfo` of a ts library
only exposes the `.d.ts` files.

We rename this away from `es2015` since in practice it's a much
higher target these days. Additionally we no longer use the devmode
output but rather use the prodmode output which has the explicit
`.mjs` output- compatible with ESM.

PR Close #48521
2022-12-19 19:50:41 +00:00
Derek Cormier
2c8fd2b57b build(bazel): enable runfiles (#46313)
Patches are required for tsec and rules_webtesting. The fix for
rules_webtesting was merged to that repo
(581b1557e3)
but it's unclear when a release will be cut.

PR Close #46313
2022-06-14 16:58:19 +00:00
Paul Gschwendtner
c46d533b22 build: switch devmode output to es2015 (#44505)
To make our test output i.e. devmode output more aligned
with what we produce in the NPM packages, or to be more
aligned with what Angular applications will usually consume,
the devmode output is switched from ES5 to ES2015.

Additionally various tsconfigs (outside of Bazel) have been
updated to match with the other parts of the build. The rules
are:

ES2015 for test configurations, ES2020 for actual code that will
end up being shipped (this includes the IDE-only tsconfigs).

PR Close #44505
2022-01-05 23:20:20 +00:00
JiaLiPassion
1cba56e11f refactor(core): remove unused fakeAsyncFallback and asyncFallback (#37879)
`zone.js` 0.8.25 introduces `zone-testing` bundle and move all `fakeAsync/async` logic
from `@angular/core/testing` to `zone.js` package. But in case some user still using the old
version of `zone.js`, an old version of `fakeAsync/async` logic were still kept inside `@angular/core/testing`
package as `fallback` logic. Since now `Angular8+` already use `zone.js 0.9+`, so
those fallback logic is removed.

PR Close #37879
2020-11-20 08:34:59 -08:00
Joey Perrott
d1ea1f4c7f build: update license headers to reference Google LLC (#37205)
Update the license headers throughout the repository to reference Google LLC
rather than Google Inc, for the required license headers.

PR Close #37205
2020-05-26 14:26:58 -04:00
Greg Magolan
436e7388c3 build: update to rules_nodejs 1.1.0 (#34736)
This release resolves the bootstrap require patching issue with jasmine_node_test. Require patches are now included before any bootstrap scripts.

PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan
6174dffc2a test: test for regression where jasmine_node_test passes silently (#34736)
Adds tests to verify that jasmine_node_test targets fail as expected.
This is to catch any future regressions to jasmine_node_test where tests pass silently without executing.
See https://github.com/bazelbuild/rules_nodejs/pull/1540 for an example of a potential regression.

PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan
81f6da173b build: add a before-all-other bootstrap script that patches require (#34736)
This removes the churn in the existing bootstrap scripts.

PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan
a4bbc35005 build: update to rules nodejs 1.0.1 (#34736)
This brings in a few minor fixes including a better way to patch require for bootstrap scripts

Also remove install_source_map_support attribute from nodejs_binary targets This attribute will be removed from nodejs_binary in the future

PR Close #34736
2020-01-15 14:58:07 -05:00
Greg Magolan
dcff76e8b9 refactor: handle breaking changes in rules_nodejs 1.0.0 (#34736)
The major one that affects the angular repo is the removal of the bootstrap attribute in nodejs_binary, nodejs_test and jasmine_node_test in favor of using templated_args --node_options=--require=/path/to/script. The side-effect of this is that the bootstrap script does not get the require.resolve patches with explicitly loading the targets _loader.js file.

PR Close #34736
2020-01-15 14:58:07 -05:00
atscott
538d0446b5 Revert "refactor: handle breaking changes in rules_nodejs 1.0.0 (#34589)" (#34730)
This reverts commit 9bb349e1c8.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
6e5774b9a0 Revert "build: update to rules nodejs 1.0.1 (#34589)" (#34730)
This reverts commit 8042433cb0.

PR Close #34730
2020-01-10 14:12:15 -08:00
atscott
b788c36909 Revert "build: add a before-all-other bootstrap script that patches require (#34589)" (#34730)
This reverts commit c3e8439954.

PR Close #34730
2020-01-10 14:12:14 -08:00
Greg Magolan
c3e8439954 build: add a before-all-other bootstrap script that patches require (#34589)
This removes the churn in the existing bootstrap scripts.

PR Close #34589
2020-01-10 08:32:00 -08:00
Greg Magolan
8042433cb0 build: update to rules nodejs 1.0.1 (#34589)
This brings in a few minor fixes including a better way to patch require for bootstrap scripts.

PR Close #34589
2020-01-10 08:31:59 -08:00
Greg Magolan
9bb349e1c8 refactor: handle breaking changes in rules_nodejs 1.0.0 (#34589)
The major one that affects the angular repo is the removal of the bootstrap attribute in nodejs_binary, nodejs_test and jasmine_node_test in favor of using templated_args --node_options=--require=/path/to/script. The side-effect of this is that the bootstrap script does not get the require.resolve patches with explicitly loading the targets _loader.js file.

PR Close #34589
2020-01-10 08:31:59 -08:00
JiaLiPassion
8c6fb17d29 build: reference zone.js from source directly instead of npm. (#33046)
Close #32482

PR Close #33046
2019-11-06 00:48:34 +00:00
Greg Magolan
7c1f73ac7b build(bazel): update to nodejs rules 0.27.9 (#29647)
PR Close #29647
2019-04-02 10:27:14 -07:00
Greg Magolan
0b27c09b51 build(bazel): also back out of jasmine bootstrap simplification (#29444)
PR Close #29444
2019-03-21 09:59:13 -07:00
Greg Magolan
ea0e832e5f build(bazel): update to nodejs rules 0.27.6 (#29375)
PR Close #29375
2019-03-19 23:39:36 -04:00
Greg Magolan
603df13b14 build(bazel): update to @bazel/jasmine 0.27.4 (#29375)
PR Close #29375
2019-03-19 23:39:36 -04:00
Greg Magolan
ea09430039 build: rules_nodejs 0.26.0 & use @npm instead of @ngdeps now that downstream angular build uses angular bundles (#28871)
PR Close #28871
2019-02-28 12:06:36 -08:00
Wassim Chegham
ce68b4d839 style: enforce buildifier lint on CI (#28186)
PR Close #28186
2019-02-26 16:57:41 -08:00
Greg Magolan
9defc00b14 build(bazel): cleanup the jasmine bootstrap code (#28906)
PR Close #28906
2019-02-21 17:59:17 -08:00
Misko Hevery
d042c4afe0 fix(core): Remove static dependency from @angular/core to @angular/compiler (#26734)
PR Close #26734
2018-10-31 14:15:06 -04:00
Greg Magolan
dc7349915d build(bazel): fix //tools/testing:node target deps (#26629)
PR Close #26629
2018-10-20 21:03:46 -07:00
Miško Hevery
213c25fb08 build: remove manual tags from platform jasmine tests (#26606)
PR Close #26606
2018-10-19 22:52:12 -07:00
Greg Magolan
1f3331f5e6 build(bazel): use fine-grained npm deps (#26111) (#26488)
PR Close #26488
2018-10-19 20:59:29 -07:00
Alex Rickabaugh
ab5bc42da0 feat(ivy): first steps towards ngtsc mode (#23455)
This commit adds a new compiler pipeline that isn't dependent on global
analysis, referred to as 'ngtsc'. This new compiler is accessed by
running ngc with "enableIvy" set to "ngtsc". It reuses the same initialization
logic but creates a new implementation of Program which does not perform the
global-level analysis that AngularCompilerProgram does. It will be the
foundation for the production Ivy compiler.

PR Close #23455
2018-04-25 13:25:33 -07:00
Michael Giambalvo
37fedd001c feat(core): add task tracking to Testability (#16863)
Allow passing an optional timeout to Testability's whenStable(). If
specified, if Angular is not stable before the timeout is hit, the
done callback will be invoked with a list of pending macrotasks.

Also, allows an optional update callback, which will be invoked whenever
the set of pending macrotasks changes. If this callback returns true,
the timeout will be cancelled and the done callback will not be invoked.

If the optional parameters are not passed, whenStable() will work
as it did before, whether or not the task tracking zone spec is
available.

This change also migrates the Testability unit tests off the deprecated
AsyncTestCompleter.

PR Close #16863
2018-03-14 08:48:48 -07:00
Alex Eagle
c4f02e21dd build: move repeated tsconfig attributes to a macro (#20964)
This helps ensure we use the same tsconfig.json file for all compilations.
Next steps are to make it the same tsconfig.json file used by the editor

PR Close #20964
2018-01-10 12:30:19 -08:00
Miško Hevery
ae97920fe2 build: move _testing_init into tools; limit web_test concurrency (#21053)
PR Close #21053
2017-12-22 13:10:51 -08:00