118 Commits

Author SHA1 Message Date
Charles Lyding
1b43c0507f fix(@schematics/angular): add additional checks for application builder usage
The Angular schematics have been updated to perform additional checks for
both the `@angular-devkit/build-angular:application` and `@angular/build:application`
builders. This ensures that the schematics generate the appropriate output for
each of these build systems in addition to the Webpack-based `browser` builder.
2025-02-24 18:34:09 -05:00
Joey Perrott
cacb127312 refactor(@angular/pwa): fix dependencies and import paths for strict deps requirements 2025-02-20 14:18:10 -05:00
Joey Perrott
ca1e86b684 build: disable failing strict_deps targets
Disable all failing strict_deps targets with TODOs to fix them moving forward.
2025-02-19 15:22:58 -05:00
Joey Perrott
c9273f8b85 build: add @types/node to assorted locations where node types are being relied on and currently obtained transitively. 2025-02-19 12:53:55 -05:00
Joey Perrott
33ed6e875e refactor: move builtin module imports to use node: prefix imports 2025-02-14 11:09:23 -08:00
Paul Gschwendtner
e519bef788 build: migrate @angular/pwa tests to rules_js
This commit changes the execution of `@angular/pwa` tests to `rules_js`
native `jasmine_test`.

This requires setting it up in the pnpm workspace for first-party linked
dependencies. Notably it turns out the peer dependency placeholder was
incorrect, so we are fixing it here and nicely avoid a problem where
pnpm would otherwise not find a local, or external suitable version.

As we originally tried to work without the fix for the peer dependency
range, there was supported added for extra substitutions. We are keeping
that logic as it will likely be useful in the future.
2025-01-21 09:25:54 +01:00
Alan Agius
31cbf5f9ad build: replace hardcoded Angular and ng-packagr peer dependencies with Bazel stamping
Refactor the build configuration to use Bazel stamping for Angular and ng-packagr dependencies, eliminating the need for hardcoded peer dependencies.
2025-01-16 19:06:30 +01:00
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
Alan Agius
8ba6b28b43 docs: enhance descriptions for schematics options
Refined and clarified the descriptions for various schematics options to improve their readability and accuracy. These changes aim to make the documentation more user-friendly and accessible for developers.

Closes #25571
2025-01-15 17:31:06 +01:00
Joey Perrott
e182d15f00 build: migrate @angular/pwa to npm_package
This allows us to use the package in the RJS pnpm workspace.
2025-01-13 13:00:45 -08:00
Paul Gschwendtner
a8335cf950 build: never use interop targets for ts compilations
* Removes `interop_deps` from the `ts_project` interop macro.
* Keeps `_rjs` suffix for now as we still need the interop targets for
  e.g. `jasmine_node_test` and the `rules_nodejs` linker.

In follow-ups we can remove the suffix, and interop layer.
2025-01-09 09:42:06 +01:00
Charles Lyding
7348e8c2f1 build: migrate @angular/pwa to ts_project
The `@angular/pwa` package has been migrated to the `rules_js` ts_project rule.
2024-12-23 13:33:36 -05:00
Alan Agius
4e5585a27f build: update Angular packages to version 19.1.x 2024-12-02 13:12:00 +01:00
Charles Lyding
618fdea00b build: update Angular versions to 19.0.0-next.0 2024-08-14 16:15:35 -04:00
Alan Agius
01c1ec087e build: update Angular dependencies to version 18.2.0-next.0 2024-07-10 16:00:13 +02:00
Alan Agius
60b7c13bdd refactor: format bazel build files
The formatter does not automatically fix these failures.
2024-06-06 11:12:06 +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
Alan Agius
bc735c948f build: update framework packages to 18.1.0-next.0 2024-05-29 19:44:02 +02:00
Alan Agius
516ce38f6e fix(@angular/pwa): set manifest icons location to match assets builder option
This commit ensures that the `icons` option value accurately reflects the `assets` option location.
2024-05-28 11:03:46 +02:00
Alan Agius
6530aa11be feat(@schematics/angular): replace assets with public directory
The `assets` directory is confusing for the users and commonly users place "assets" which are not meant to be copied but instead processed by the build system. This causes some files both bundled and copied.

With this change we rename the `assets` directory to `public` and also move the `favicon.ico` inside this newly created directory.
2024-03-25 17:10:29 +01:00
Alan Agius
a1833c66c2 build: update Angular versions to 18.0.0-next.0 2024-03-15 10:16:11 +01:00
Miles Malerba
034639b9d3 build: update dependencies for version 18.0.0 2024-03-08 18:40:58 +01:00
Alan Agius
73e7c2b2c5 build: update dependencies for version 17.3.0
The prerelease checks are failing due to incorrect dependencies

```
Discovered errors when validating dependency ranges.
  - @angular/pwa: Unexpected peer dependency range for "@angular/cli". Expected: ^17.0.0 || ^17.3.0-next.0
  - @angular/ssr: Unexpected peer dependency range for "@angular/common". Expected: ^17.0.0 || ^17.3.0-next.0
  - @angular/ssr: Unexpected peer dependency range for "@angular/core". Expected: ^17.0.0 || ^17.3.0-next.0
  - @angular-devkit/build-angular: Unexpected peer dependency range for "@angular/compiler-cli". Expected: ^17.0.0 || ^17.3.0-next.0
  - @angular-devkit/build-angular: Unexpected peer dependency range for "@angular/localize". Expected: ^17.0.0 || ^17.3.0-next.0
  - @angular-devkit/build-angular: Unexpected peer dependency range for "@angular/platform-server". Expected: ^17.0.0 || ^17.3.0-next.0
  - @angular-devkit/build-angular: Unexpected peer dependency range for "@angular/service-worker". Expected: ^17.0.0 || ^17.3.0-next.0
  - @angular-devkit/build-angular: Unexpected peer dependency range for "ng-packagr". Expected: ^17.0.0 || ^17.3.0-next.0
  - @ngtools/webpack: Unexpected peer dependency range for "@angular/compiler-cli". Expected: ^17.0.0 || ^17.3.0-next.0
  - latest-versions: Invalid dependency range for "ng-packagr". Expected: ^17.3.0-next.0
  - latest-versions: Invalid dependency range for "Angular". Expected: ^17.3.0-next.0
```
2024-03-06 13:04:30 +01:00
Alan Agius
6c65730b60 build: update angular to 17.2.0-next 2024-01-25 09:11:51 +01:00
Charles Lyding
72cf799388 refactor(@angular/pwa): use stream pipeline operator with HTML rewriter
The index HTML augmentation within the PWA schematic now uses the Node.js
promise-based pipeline helper to reduce the complexity of the code when
using the parse5 streaming rewriter. This removes a noticeable amount of
code as well as removing the need to manually wrap the result in a Promise.
2023-12-18 07:35:14 -05:00
Doug Parker
5ad8d15177 refactor: bump @angular/pwa peer dep for 17.0.0-next 2023-11-29 13:52:02 -08:00
Alan Agius
0ccb4c7d0b build: update Angular packages to version 17 stable
Update all versions to stable
2023-11-08 13:56:40 +01:00
Alan Agius
f9a798be05 fix(@angular/pwa): replace Angular logos
This commit replaces the Angular old logo with the new one.
2023-11-07 19:14:34 +01:00
Alan Agius
11420667f9 build: use single Node.js toolchain to run unit tests
E2E tests are used to run tests on multiple platforms and node.js versions.
2023-10-30 17:50:47 +01:00
Alan Agius
3f8aa9d8c7 feat(@schematics/angular): update ng new to use the esbuild application builder based builder
This commit updates the `ng generate application` to use the esbuild `application` builder. This also updates the schematics to support both `browser` and `application` builders.

BREAKING CHANGE: `rootModuleClassName`, `rootModuleFileName` and `main` options have been removed from the public `pwa` and `app-shell` schematics.
2023-09-13 17:40:50 +02:00
HamdaanAliQuatil
05b9ce5099 docs: update @angular/pwa readme 2023-09-11 09:12:49 +02:00
Alan Agius
2702419364 build: update peer Angular peer deps
This is needed to satisfy the pre-release checks.
2023-08-30 18:28:18 +02:00
Alan Agius
08ff43b887 build: update Angular peer dependencies to ^16.0.0 || ^16.2.0-next.0
This is needed to cut the `next` prerelease.
2023-06-28 15:25:43 +02:00
Doug Parker
d4a2849010 build: bump versions for minor release 2023-06-13 09:22:39 -07:00
Charles Lyding
11e0a51b17 build: minor cleanup of bazel build rules
BUILD files for each package have had outdated glob excludes removed.
Additionally, some src args have been reduced to a single file where possible.
The root bazel ignore file has also been expanded to include all node module
directories in each package. The ignore file does not appear to currently support
globs so each path has been individually specified.
2023-05-22 09:36:44 -04:00
Alan Agius
22c1cb66c5 fix(@angular-devkit/schematics): do not generate an UpdateBuffer for created and overridden files
`UpdateBuffer` only supports UTF-8 encoded files, which causes schematics to emit corrupted binary like files such as images.

This commit also introduce an errors when the `UpdateRecorder` is used for non UTF-8 files.

Closes #25174
2023-05-10 11:20:29 +00:00
Alan Agius
7dc0049be9 fix(@angular/pwa): compress PWA icons
This commit reduces the size the generated PWA icons.
2023-05-09 15:53:06 +00:00
Doug Parker
d160856958 refactor: widen peer dependencies to ^16.0.0 || ^16.1.0-next.0 2023-05-03 19:38:47 +00:00
Alan Agius
8df900f24a build: update FW and ng-packagr dependencies to version 16
This commit update Angular and ng-packagr dependencies to version 16.
2023-02-23 10:26:07 +00:00
Alan Agius
d9fed6a517 build: update parse5-html-rewriting-stream to version 7
This fixes an issue were the HTML is truncated if it's 128Kb or greater.

Closes #24707
2023-02-14 15:23:09 +00:00
Alan Agius
ef39987e59 build: update Angular peer deps to support ^15.2.0-next.0 2023-01-12 12:24:11 +00:00
Charles Lyding
7f93735e98 build: use bazel to perform release builds
When performing a release via the dev-infra `ng-dev` tooling, the release
builds for the packages that will be published are now performed using bazel.
Prior to this, the release builds were performed using a custom build script
that programmatically invoked TypeScript APIs. The Bazel build and discovery
process for the releasable packages is performed by a script that is based on
the scripts from components and framework repositories. Several small modifications
were performed to match the behavior and structure of the cli repository:
* Use of `packages` as the source root in the bazel query
* Use of `pkg_npm` rule in the bazel query
* Partial transition to native Node.js `fs` APIs instead of `shelljs`
* Directory creation per package when copying output (supports multiple package scopes)
* Copying of archives (tgz) for each package

The snapshot and local build capabilities are not modified as part of this change
but will be merged in a followup as part of a larger transition to use bazel
throughout the package build process.
2023-01-05 03:21:58 +00:00
Kristiyan Kostadinov
ba895b1af6 build: update to TypeScript 4.9
Updates the project to TypeScript 4.9.
2023-01-03 16:46:36 +00:00
Alan Agius
207358afb8 feat(@angular-devkit/schematics): add runSchematic and runExternalSchematic methods
These async methods are a replacement for the Observable based `runSchematicAsync` and `runExternalSchematicAsync` methods.

DEPRECATED:
The Observable based `SchematicTestRunner.runSchematicAsync` and `SchematicTestRunner.runExternalSchematicAsync` method have been deprecated in favor of the Promise based `SchematicTestRunner.runSchematic` and `SchematicTestRunner.runExternalSchematic`.
2022-12-08 14:49:43 -08:00
Jason Bedard
4de9045de8 test: unit test multiple node versions in separate jobs 2022-09-14 10:43:17 -07:00
Charles Lyding
b2add316e7 build: remove unneeded BUILD file licenses rule comments 2022-09-13 10:33:49 -07:00
Charles Lyding
e402c2358c build: adjust BUILD file external comment markers
Improvements to the syncing process allow for reduced usage of the comment markers.
2022-08-31 08:37:19 -04:00
Alan Agius
2300be6a41 build: update dependencies to Angular 15.0.0-next 2022-08-30 08:53:41 -04:00
Jason Bedard
db5c1fc13c test: run tests on multiple node versions 2022-08-03 10:33:46 -07:00
Alan Agius
d59ba3110b fix(@angular/pwa): add peer dependency on Angular CLI
The peer dependency is needed so that the correct version that mathes the installed Angular CLI is installated.
2022-06-07 17:58:56 -04:00