1153 Commits

Author SHA1 Message Date
Doug Parker
5ad8d15177 refactor: bump @angular/pwa peer dep for 17.0.0-next 2023-11-29 13:52:02 -08:00
Charles Lyding
9e356754ce build: update Angular version to v17.1 prerelease
Angular package dependency versions and the version used to generate a new project have been updated to use 17.1.0-next.0.
2023-11-17 12:34:39 -05:00
Alan Agius
bec9458b6e fix(@angular/cli): handle packages with no version
In some cases pacote will return undefined as `version` which resulted in `Cannot convert undefined or null to object`.

Closes #26337
2023-11-15 16:47:42 +01:00
Angular Robot
cb0c22ee9b build: update all non-major dependencies 2023-11-08 15:04:56 +01: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
水上 皓登
fac706047a docs: the node.js's link fix. 2023-11-04 11:35:21 +01:00
Alan Agius
0f5fb09852 refactor(@angular/ssr): guard against potential path traversals
This change updates to code to guard against a potential path traversal.

More context about the reasoning behind this change can be found in https://buganizer.corp.google.com/issues/299878755#comment26
2023-11-03 14:50:43 +01:00
Charles Lyding
6d8d948ad0 refactor(@angular-devkit/build-angular): cache compiled load ESM file helper
The dynamically compiled ESM import helper is now cached to prevent the need
to recompile the helper function everytime a load ESM helper call is made.
This helper is currently used to workaround dynamic import limitations with
the TypeScript compilation output. Once the build process is updated, it will
no longer be required.
2023-11-03 10:36:27 +01:00
cexbrayat
de1ec9da3b fix(@angular/ssr): enable performance profiler option name 2023-11-03 10:35:19 +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
91dcae16d1 fix(@angular/cli): add Node.js 20 as supported version
Prior to this Node.js 20 was incorrectly being listed as unsupported.

Closes #26114
2023-10-30 12:28:00 +01:00
Charles Lyding
6161e3e031 fix(@angular/cli): ignore peer mismatch when updating @nguniversal/builders
When updating to v17, the `@nguniversal/builders` is now ignored when checking peer
dependency ranges. The `@nguniversal/builders` is no longer used and will be removed
in a migration during the update process.
2023-10-30 09:00:31 +01:00
Alan Agius
a0f8fac4b3 refactor: update inquirer to version 9.0.6
Update the mentioned package.
2023-10-26 16:11:36 +02:00
Alan Agius
842c2045d1 fix(@angular/cli): remove Node.js 16 from supported checks
Node.js support was removed, but it appears that this got through the cracks.
2023-10-24 16:12:09 +02:00
Alan Agius
f6a088bc18 fix(@angular/ssr): correctly set config URL
When calling `renderApplication` or `renderModule` the URL would be overridden to undefined as the `url` option was not provided as an option.
2023-10-24 16:11:45 +02:00
Alan Agius
2c1c676245 fix(@angular/cli): remove the need to specify --migrate-only when --name is used during ng update
This commit updates the behaviour of `ng update --migrate-only` to remove the need for `--migrate-only` option to be specified. `--migrate-only` will be set internally.

Before
```
ng update @angular/cli --migrate-only --name=migration-name
```

Now
```
ng update @angular/cli --name=migration-name
```
2023-10-20 23:11:50 +02:00
Alan Agius
70099af5be docs(@angular/cli): update build description
Replace webpack with esbuild.
2023-10-19 18:15:23 +02:00
Angular Robot
bcdfe534bd build: update dependency resolve to v1.22.8 2023-10-11 09:37:37 +02:00
Alan Agius
dcf3fddff2 feat(@angular/ssr): add performance profiler to CommonEngine
This commit adds an option to the `CommonEngine` to enable performance profiling. When enabled, timings of a number of steps will be outputted in the server console.

Example:
```
********** Performance results **********
Retrieve SSG Page:       0.3ms
Render Page:             25.4ms
Inline Critical CSS:     2.3ms
*****************************************
```

To enable profiling set `enablePeformanceProfiler: true` in the `CommonEngine` options.

```ts
const commonEngine = new CommonEngine({
  enablePeformanceProfiler: true
});
```
2023-09-28 17:32:29 +02:00
Alan Agius
6b5c469a42 build: update all non-major dependencies 2023-09-27 14:08:41 +02:00
Alan Agius
741cca73c1 feat(@schematics/angular): add ng new --ssr
This commit enabled users to opt-in adding SSR and SSG to their application during the `ng new` experience. This can be done either by using the `--ssr` option or answer `Yes` when prompted.
2023-09-25 20:17:01 +02:00
Alan Agius
6a85b13b1f refactor(@angular/ssr): move ng-add schematic to @schematics/angular
This move is in preparation to enable `ng new --ssr`.
2023-09-25 20:17:01 +02:00
Alan Agius
f4e7fa8735 fix(@angular/cli): add @angular/ssr as part of the ng update packageGroup
This ensures that when the CLI is updates so is `@angular/ssr`
2023-09-22 19:56:32 +02:00
Alan Agius
8d033841d1 fix(@angular/ssr): enable prerender and ssr for all build configuration
This commit configures both `ssr` and `prerender` both both development and production configurations. This is needed to improve DX and allow for a better debugging.
2023-09-22 17:34:45 +02:00
Alan Agius
fc68dcaa0d refactor(@angular/ssr): remove code that sets initialNavigation: enabledBlocking
This removes that code that was used to set `initialNavigation: enabledBlocking` as this is no longer needed to reduce flickering. This is because `initialNavigation: enabledBlocking` is not needed when enabling hydration via `provideClientHydration` which is done in the internal server schematic.
2023-09-22 17:34:20 +02:00
Alan Agius
8f9a0d70cd feat(@angular-devkit/build-angular): support standalone apps route discovery during prerendering
This fixes an issue were routes could not be discovered automatically in a standalone application.

This is a total overhaul of the route extraction process as instead of using `guess-parser` NPM package, we now use the Angular Router. This enables a number of exciting possibilities for the future which were not possible before.

# How it works?
The application is bootstrapped and through DI injection we get the injector and router config instance and recursively build the routes tree.
2023-09-18 22:26:06 +02:00
Alan Agius
5a204b81c7 refactor(@angular-devkit/build-angular): accept boolean and string in ssr option
This is to align with the `serviceWorker` option.
2023-09-15 22:12:34 +02: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
Nikolay Vitkov
6eee74c8f5 docs(@angular/cli): Add Puppeteer schematics to e2e command 2023-09-11 09:13:04 +02:00
HamdaanAliQuatil
05b9ce5099 docs: update @angular/pwa readme 2023-09-11 09:12:49 +02:00
Charles Lyding
0811f641b3 build: update package output to use ES2022
The JavaScript generated for the published packages is now using ES2022.
This removes additional downleveling of code that was previously necessary
to use newer features.
The minimum Node.js version of 18.13 provides support for the needed features.
While this change does require a patch to `@bazel/concatjs` to allow the target
to be set to `ES2022`, this patch is now already required by the migration of
the universal repository into the CLI repository.
2023-09-08 10:19:37 -07:00
Doug Parker
cb66c3d445 build: add repository field to @angular/ssr package
This is necessary for Wombat publishing. Normally most packages have this generated at build time through `pkg_npm`, however we need to use `ng_package` in this case which does not do this by default.
2023-09-06 14:01:08 -07:00
Angular Robot
1cdbf5db4f build: update all non-major dependencies 2023-09-06 09:05:33 -07:00
Alan Agius
99e153ada7 docs(@angular/cli): update outdated statement about CLI accepting camelCase
The Angular CLI does not accept camelCase args.
2023-09-05 10:02:36 -07:00
Alan Agius
17ffedc3ec refactor(@angular/cli): remove legacy NPM compatibility check
This check should no longer be needed as on supported versions of Node.js NPM 7.5 is no longer installed by default.
2023-09-01 15:17:52 +02:00
Angular Robot
04f61aa7ef build: update all non-major dependencies 2023-08-31 09:04:29 +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
f917b67e75 refactor: remove polynomial regular expression
This change updates the critical css processor to remove the need for a Polynomial regular expression.

Addresses: https://github.com/angular/angular-cli/security/code-scanning/51
Closes #25742
2023-08-30 17:02:10 +02:00
Alan Agius
c30e3692b3 refactor(@angular/ssr): remove express engine
This removes the util function for express, instead the "CommonEngine" is called directly infuture before this package is final we might rename the "CommonEngine" to something else.
2023-08-30 09:53:57 +02:00
Charles Lyding
a00b21afdf build: use bazel ts_library rule to build @angular/ssr
The `@angular/ssr` package does not require the Angular compiler and can instead use the
`ts_library` to compile the TypeScript code.  The `@angular/bazel` package has also been
update and a more limited patch is now used due to only needing the `ng_package` rule.
The continued use of the `ng_package` rule maintains the existing output structure for the
`@angular/ssr` package.
2023-08-30 09:08:18 +02:00
Angular Robot
d8d815bd36 build: update dependency npm-pick-manifest to v9 2023-08-29 06:44:58 -07:00
Angular Robot
4785dd7d3c build: update dependency pacote to v17 2023-08-29 05:11:44 -07:00
Angular Robot
fd5591d527 build: update dependency npm-package-arg to v11 2023-08-29 05:11:22 -07:00
Alan Agius
297cdab413 build: update Angular version to v17 prerelease
Update package peer deps to version 17
2023-08-29 03:53:23 -07:00
Angular Robot
8330914e50 build: update dependency critters to v0.0.20 [security] 2023-08-29 00:39:05 -07:00
Alan Agius
3fe432c71b refactor: update code to integrate universal repo
This commit updates the moved universal code into the cli pipeline
2023-08-22 20:44:53 +00:00
Alan Agius
8fe8cdf05a refactor: move universal code into CLI repo
Merge remote-tracking branch 'universal/move-to-cli' into universal-merge
2023-08-16 11:34:47 +00:00
Alan Agius
e6ce7f8414 refactor: prepare code for CLI move 2023-08-16 09:55:58 +00:00
Angular Robot
2f77234725 build: update dependency pacote to v16 2023-08-14 10:58:17 +02:00