16325 Commits

Author SHA1 Message Date
Charles Lyding
23fc8e1e17 fix(@schematics/angular): generate components without a .component extension/type
To align with the updated style guide, Angular v20 will generate components
without a `.component` file extension type for all component related
files by default. Projects will automatically use this naming convention.
Projects can however opt-out by setting the `type` option to `Component`
for the component schematic. This can be done as a default in the `angular.json`
or directly on the commandline via `--type=Component` when executing `ng generate`.
As an example, `app.component.css` will now be named `app.css`. Additionally,
the TypeScript class name will be `App` instead of the previous `AppComponent`.
2025-03-14 11:27:43 -07:00
Charles Lyding
f126f8d34b fix(@schematics/angular): ensure module discovery checks for an NgModule decorator
The Angular module discovery logic previously did not check for the presence
of a potential `@NgModule` decorator. This can cause false positive results
for files with a module-like naming pattern.
2025-03-14 11:27:43 -07:00
Charles Lyding
29a58e5bf7 build: move build-angular/build-webpack specific dependencies out of root
With the migration to `rules_js`, package specific dependencies now only
need to be referenced with the source `package.json` for each specific
package. Most of the `@angular-devkit/build-angular` and `@angular-devkit/build-webpack`
specific dependencies have now been moved. This is not exhaustive and further
changes will continue to move additional dependencies.
2025-03-14 13:18:16 -04:00
Alan Agius
f4be831197 feat(@angular/build): Support Sass package importers
Enhanced Sass integration by adding support for package importers.

See: https://sass-lang.com/blog/announcing-pkg-importers/

Closes: #29854
2025-03-14 16:02:56 +01:00
Alan Agius
27fe5dad62 docs: correct bazel e2e commands
These command are outdated and no longer work
2025-03-14 15:41:15 +01:00
Charles Lyding
318c164d1f refactor(@angular/build): define an internal ngHmrMode value
An `ngHmrMode` boolean value will now be defined within application bundles.
The value is based on the development server's `hmr` option with `true`
when HMR is enabled and `false` when disabled. For all application builds,
the value will be `false`. `ngHmrMode` is similar in behavior to `ngServeMode`
or `ngDevMode`. It will not be present in the output code unless referenced
and in those cases only the final boolean value will be present if not optimized
out of the final code.
The value is not considered part of the public API and may change in the future.
2025-03-13 19:38:14 -04:00
Charles Lyding
f780e8beb3 fix(@angular/build): ensure relative karma stack traces for test failures
The karma configuration will now automatically set the `basePath` option
to the temporary output path when using the application build system's
karma testing. This ensures that only the relative path of the test files
is represented in the stack traces of test failures.
2025-03-13 13:49:55 -04:00
Alan Agius
18e13e2cee feat(@schematics/angular): remove --server-routing option
Server-side rendering (SSR) will always enable server routing when using the application builder.

BREAKING CHANGE: `--server-routing` option has been removed from several schematics. Server routing will be used when using the application builder.
2025-03-13 17:40:26 +01:00
Alan Agius
cdfc50c29a feat(@angular/ssr): stabilize AngularNodeAppEngine, AngularAppEngine, and provideServerRouting APIs
This commit promotes the `AngularNodeAppEngine`, `AngularAppEngine`, and `provideServerRouting` APIs from dev preview to stable. These APIs enhance server-side rendering (SSR) capabilities in Angular applications, improving routing and server integration for better performance and reliability.
2025-03-13 17:40:26 +01:00
Alan Agius
b9591eb4b6 docs(@angular-devkit/build-angular): update forceEsbuild option description
Esbuild builder is stable and is no longer in developer preview.
2025-03-13 14:51:31 +01:00
Alan Agius
09d3ced9f4 docs: release notes for the v17.3.13 release 2025-03-13 13:03:45 +01:00
Alan Agius
ab68a05063 docs: release notes for the v19.2.3 release 2025-03-13 11:34:05 +01:00
Alan Agius
af829b4365 docs: release notes for the v18.2.15 release 2025-03-13 11:09:44 +01:00
Angular Robot
769480e041 build: update dependency aspect_rules_ts to v3.5.1 2025-03-13 10:51:01 +01:00
Paul Gschwendtner
ea920c35e7 release: cut the v20.0.0-next.1 release 20.0.0-next.1 2025-03-13 10:39:40 +01:00
Paul Gschwendtner
32470e6a32 build: update angular 2025-03-13 09:29:35 +01:00
Paul Gschwendtner
54c561af4a build: avoid WSL interop flake when preparing Windows CI environment
For our native Windows tests (verifying `ng` CLI outside WSL), we
currently build the test binaries inside WSL, leveraging bazel remote
execution.

The scripts involved in moving the built binaries to outside WSL rarely
flake due to a WSL interop bug when we invoke Windows commands from inside
WSL (which is an untypical thing to do; but a needed trick given some WSL limitation).

This commit tries to stabilize/avoid this flake by retrying if we
recognize this.
2025-03-13 09:11:26 +01:00
Angular Robot
2d9735d5d2 build: update devinfra digest to 47572ab 2025-03-12 22:46:21 -04:00
Angular Robot
0c720655ea build: update all non-major dependencies 2025-03-12 15:39:24 -04:00
Paul Gschwendtner
3f2e18dd10 docs: release notes for the v19.2.2 release 2025-03-12 18:29:26 +01:00
Charles Lyding
a7db68d2e2 test: remove E2E test for ngrx Effect decorator usage
The `misc/third-party-decorators` E2E test has been
deleted as its purpose was to test the usage of the
now removed `Effect` decorator from `ngrx`.
2025-03-12 13:27:03 -04:00
Alan Agius
79de7e0bda ci: update matchCurrentVersion RegExp
The previous regexp also matches `20.0.0-next` which causes Angular FW packages not to be updated.
2025-03-12 18:23:48 +01:00
Paul Gschwendtner
d35363985c build: update ng-dev
Updates `ng-dev` again as we made another release-tool fix for pnpm.
See: 9fd3adb2e8
2025-03-12 18:23:17 +01:00
Paul Gschwendtner
6136c6a5d2 build: update ng-dev to include latest pnpm release tool fixes
The release tool did check for a `yarn.lock` file. This check was
updated to also work with pnpm.
2025-03-12 17:38:11 +01:00
Paul Gschwendtner
23829b0ed2 docs: improve developer guide for pnpm and windows
Improves the developer guide for pnpm and Windows.

See for the Windows change:
https://github.com/angular/angular-cli/pull/29705.
2025-03-12 12:13:28 +01:00
Charles Lyding
20c64ba8fb build: remove dev-infra @angular/build-tooling package
With the migration to use `rules_js` with Bazel,
this package should no longer be needed.
2025-03-11 13:51:33 -04:00
Alan Agius
ee8466de52 fix(@angular/ssr): prevent stream draining if write does not return a boolean
Implements a workaround for https://github.com/CodeGenieApp/serverless-express/issues/683

Closes #29801
2025-03-11 15:24:54 +01:00
Alan Agius
2d03d8f113 fix(@angular/cli): record analytics for nested schematics
Prior to this commit, analytics were not recorded for nested schematics. This caused certain data to be incomplete. For example, when running `ng new` and selecting "yes" for SSR in the prompt, this choice was not recorded because the prompt exists within the `application` schematic.
2025-03-11 15:24:41 +01:00
Angular Robot
e8958e363b build: lock file maintenance 2025-03-11 15:23:46 +01:00
Alan Agius
5bea3de4cb fix(@angular/build): invalidate com.chrome.devtools.json if project is moved
Ensure that when a project is relocated, the `com.chrome.devtools.json` file is properly invalidated by checking the `root` path.
2025-03-11 15:23:37 +01:00
Alan Agius
5ff4c28e7b build: ensure that tools/legacy-rnjs/node_modules is ignored 2025-03-11 14:17:40 +01:00
Angular Robot
f79ab12b0d build: update all non-major dependencies to v8.26.1 2025-03-11 13:16:38 +01:00
Paul Gschwendtner
9dd3f0344f
Further clean-up rules_nodejs npm workspace and remove yarn.lock (#29779)
* build: disconnect `@npm` workspace from main project

This will speed up significantly as we don't need to fetch all
dependencies again just for the `@npm` repository that is at this point
only leveraged by the `ng_package` rule for some of its dependencies.

This commit allows us to drop the `yarn.lock` and Aspect lock files, and
allows us to independently migrate `ng_package` to `rules_js`.

It also allows us to drop the `_rjs` TS interop layer in follow-up commits.

* build: drop `_rjs` suffix from `ts_project` targets

We don't need the `ts_project` interop in principle
at this point. We only have one remaining instance left for the SSR
`ng_package` integration. This commit cleans up all usages.

* build: remove yarn

* build: avoid duplicated dependencies at top-level

`rules_js` seems to be sensitive if there are similar versions of the same
package installed, but with differently matched peer dependencies. This
is fine because we can (and should long-term) move those dependencies to
their package-local `package.json` files. This commit unblocks the
migration and highlights how we can move deps to the individual packages
in the future.

* build: update checkout github action

This will allow us to use pnpm.

* build: update node to avoid strict-engines error caused by `npm`

Avoids:

```
Lockfile is up to date, resolution step is skipped
 ERR_PNPM_UNSUPPORTED_ENGINE  Unsupported environment (bad pnpm and/or Node.js version)

Your Node version is incompatible with "npm@11.2.0".

Expected version: ^20.17.0 || >=22.9.0
Got: v20.11.1
```

Note that we won't update the WORKSPACE test version as that would mean
we need to update the Node engines for shipped packages; and we can't do
this right now without introducing a breaking change.

* build: fix missing dependency for spec bundling

The beasties JS sources weren't available for bundling in the
`bazel-bin`, and this surfaced in RBE. This commit fixes this.
2025-03-11 10:05:52 +01:00
Angular Robot
a05d93a3f8 build: update devinfra digest to 04132c6 2025-03-10 10:22:30 -07:00
Angular Robot
9041f6d6a4 build: lock file maintenance 2025-03-10 10:22:16 -07:00
Alan Agius
3e35167855 fix(@angular/build): handle postcss compilation errors gracefully
Improves error handling in the PostCSS compilation process to prevent crashes and allow recovery.

Closes #29789
2025-03-10 14:41:59 +01:00
Alan Agius
596b9ae60c refactor(@angular/build): remove esbuild sourcemap workarounds
These are no longer requires since 0.25.1
2025-03-10 13:33:16 +01:00
Angular Robot
97ed10b964 build: update github/codeql-action action to v3.28.11 2025-03-10 11:38:23 +01:00
Alan Agius
4c85ca11a4 build: update angular 2025-03-10 11:34:25 +01:00
Charles Lyding
770b993c56 test: update E2E tests to account for .ng.html template extension 2025-03-10 09:43:21 +01:00
Charles Lyding
dc2f65999a fix(@schematics/angular): generate component templates with a .ng.html file extension
To align with the updated style guide, Angular v20 will generate
component templates with a `.ng.html` file extension instead of
the previous `.html` by default. Projects will automatically
use this new template extension. Projects can however opt-out of
component generation using `.ng.html` by setting the `ngHtml`
option to false for the component schematic. This can be done as
a default in the `angular.json` or directly on the commandline
via `--no-ng-html` when executing `ng generate`.
2025-03-10 09:43:21 +01:00
Angular Robot
312cc72192 build: lock file maintenance 2025-03-10 09:29:46 +01:00
Angular Robot
65a5ff49f1 build: update all non-major dependencies 2025-03-10 08:48:23 +01:00
Alan Agius
beab546bf2 fix(@angular/build): remove duplicate prebundling warning
This warning is already displayed during the normalization of options. See: b5a86709b7/packages/angular/build/src/builders/dev-server/options.ts (L56)
2025-03-07 15:33:19 +01:00
Alan Agius
dd7fe11f4b refactor(@schematics/angular): remove v19 migrations
These migrations are no longer executed.
2025-03-07 15:32:52 +01:00
Angular Robot
b5a86709b7 build: update all non-major dependencies 2025-03-07 11:23:08 +01:00
Alan Agius
41f2821a6b build: update angular 2025-03-07 09:51:12 +01:00
Angular Robot
956e806841 build: update devinfra digest to 60ad70b 2025-03-07 08:53:05 +01:00
Alan Agius
f0dd60be1e fix(@angular/build): exclude all entrypoints of a library from prebundling
The configuration now ensures that when a package is listed for exclusion, all paths within that package including sub-paths like `@foo/bar/baz`  are marked as external and not prebundled by the development server.

For example, specifying `@foo/bar` in the exclude list will prevent the development server from bundling any files from the `@foo/bar` package, including its sub-paths such as `@foo/bar/baz`.

This aligns with esbuild external option behaviour https://esbuild.github.io/api/#external

Closes #29170
2025-03-06 19:12:05 +01:00
Charles Lyding
03180fe035 feat(@schematics/angular): use TypeScript module preserve option for new projects
Newly generated projects will now use the `preserve` value for the `module` option
within the TypeScript configuration for the workspace (`tsconfig.json`). This value
was added in TypeScript 5.4 and is intended to model the behavior of modern bundlers
such as used in the default `application` builder.
This option value also has the advantage of automatically enabling `esModuleInterop`
and setting `moduleResolution` to `bundler` which are the currently generated values
for new projects. This allows explicit use of these options to be removed from the generated
file. The `resolveJsonModule` option is also enabled with `preserve` which removes
the need for developers to manually add it if JSON files are imported. JSON file imports
are fully support including unused property treeshaking with named imports in the
`application` builder.
Additional details on the option can be found here:
https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-4.html#support-for-require-calls-in---moduleresolution-bundler-and---module-preserve
2025-03-06 17:55:28 +01:00