24 Commits

Author SHA1 Message Date
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
0ccb4c7d0b build: update Angular packages to version 17 stable
Update all versions to stable
2023-11-08 13:56:40 +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
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
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
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
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
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
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
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
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
e6ce7f8414 refactor: prepare code for CLI move 2023-08-16 09:55:58 +00:00