18 Commits

Author SHA1 Message Date
Paul Gschwendtner
4fee94a96c build: rename //:root_modules to //:node_modules.
This is necessary as `rules_js` requires this "common name" when dealing
with Yarn workspaces, linking first party dependencies automatically.

In the future, we may be able to send a PR to `rules_js` to support a
custom name somehow.
2025-01-15 19:20:40 +01:00
Charles Lyding
2888673ca2 build: migrate modules/testing to ts_project
The `modules/testing/builder` target used for builder integration testing
has been migrated to the `rules_js` ts_project rule.
2024-12-23 10:09:26 -05:00
Alan Agius
0718e1b70c test: add --disable-dev-shm-usage to address WebDriverError: unknown error: Chrome failed to start: crashed
This fixes an issue where protractor integration tests are failing with

```
[07:38:37] I/direct - Using ChromeDriver directly...
[07:38:39] E/launcher - unknown error: Chrome failed to start: crashed.
  (unknown error: DevToolsActivePort file doesn't exist)
```
2024-12-19 10:20:53 +01:00
Jan Krems
fb41d182ee fix(@angular-devkit/build-angular): fix webpack config transform for karma 2024-12-05 11:24:29 -08:00
Doug Parker
03d4bd2b09 test: rename @angular-devkit/build-angular:protractor usages to :private-protractor 2024-10-21 14:50:18 -07:00
Alan Agius
3cbbf456c1 refactor: handle standalone by default change
In tests, add `standalone: false` where it's missing.

Note: In the future, we should update our integration tests to use a standalone app.
2024-10-17 14:20:52 +00:00
Charles Lyding
af52fb49bd fix(@angular/build): synchronize import/export conditions between bundler and TypeScript
To improve type-checking and reduce hard to diagnose errors when using the new
`production`/`development` conditions, the set of conditions used by the bundler
are now also synchronized with those used by TypeScript. This helps ensure
that type mismatches are avoided by type-checking against the actual file that
will be bundled into the output.
2024-10-15 09:37:55 -07:00
Jithil P Ponnan
67d153242f docs(@schematics/angular): update code scaffolding doc to with ng generate --help 2024-10-14 10:31:27 +02:00
Jan Martin
c48d6947ed feat(@angular/build): set development/production condition
Ensures that we consistently set "development" for non-optimized and
"production" for optimized builds. This is consistent with other
bundlers (Vite/webpack/parcel/...).
2024-10-09 11:47:55 -07:00
Charles Lyding
3264c1763c test(@angular/build): add test harness rebuild case helper function
To reduce duplicate code within tests for rebuild/watch scenarios, a new
helper has been added to the builder test harness.  This helper allows
passing in an array of test case functions that are executed in order per
rebuild. The development server's watch option tests have been updated to
use the new helper.
2024-10-04 09:58:24 +02:00
Jan Martin
3020571b68 test: allow Chrome sandbox opt-out (--no-sandbox)
In some environments, e.g. containers or in some cases macOS,
headless Chrome may not work with the sandbox enabled. This exposes
an escape hatch to run tests in those environments.

Example use:

```sh
yarn bazel test \
  //packages/angular_devkit/build_angular:build_angular_karma_test \
  --test_env=PUPPETEER_EXECUTABLE_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" \
  --test_env=CHROME_NO_SANDBOX=1
```
2024-09-26 09:35:18 -07:00
Alan Agius
e40384e637 refactor(@angular-devkit/build-angular): remove deprecated browserTarget
The `browserTarget` option has been removed as part of the refactoring process. This option was part of a private API and is no longer used. Projects relying on this option should migrate to using the `buildTarget` option.

BREAKING CHANGE: The `browserTarget` option has been removed from the DevServer and ExtractI18n builders. `buildTarget` is to be used instead.
2024-08-21 19:53:04 +02:00
Charles Lyding
fa9bce0e9a test: enable @typescript-eslint/no-unnecessary-type-assertion lint rule
The `@typescript-eslint/no-unnecessary-type-assertion` rule is now enabled and all failures
have been addressed within the code.
2024-06-25 16:57:03 -04:00
Charles Lyding
39f946a848 build: enabled isolated modules TypeScript option
The TypeScript `isolatedModules` option is now enabled for all TypeScript
code within the repository. As a result, all packages will now be built
with the option enabled. This does not affect projects created with the CLI
and is only related to the building of the actual Angular CLI code.
The `isolatedModules` option ensures that code can be emitted without the
TypeScript typechecker and allows tools other than TypeScript to potentially
be used. Code was updated to correct all errors after the option was enabled.
Additionally, some early code fixes were done to add function and accessor
return types to prepare for future `isolatedDeclarations` usage. More changes
would be needed to consider turning on `isolatedDeclarations`, however.
2024-06-23 15:34:49 +02:00
Ash Ramirez
434a3740f0 refactor(@angular/cli): update aio links -> adev links
Updates for all angular.io links to the new angular.dev domain. Additionally, adjustment to new resources where the equivalent does not exist on the new site (e.g. Tour of Heroes tutorial)
2024-06-06 11:12:06 +02:00
Charles Lyding
22e05dcb4a fix(@schematics/angular): generate new projects with ECMAScript standard class field behavior
Newly generated projects will now use ECMAScript standard class field behavior by default.
If the legacy TypeScript behavior is required for a new project the `useDefineForClassFields`
TypeScript option can be set to `false` within the application's `tsconfig`. This should
be uncommon, and if needed, it is recommended to adjust code to match standard behavior where
possible.
2024-05-31 15:24:59 -04:00
David LJ
d24b087eff docs: update browser support links aio->adev 2024-05-27 08:31:53 +02:00
Charles Lyding
631303664e test: move builder testing infrastructure to separate bazel target module
The builder testing infrastructure and harness has been moved out of the
`@angular-devkit/build-angular` package and into a separate bazel only
module.  This allows the testing code to be shared with other packages
within the repository. It also removes test only code from within
the package that is not specific any of the included builders.
2024-04-17 10:23:50 +02:00