824 Commits

Author SHA1 Message Date
Alan Agius
51a6da535e build: update angular 2021-12-10 13:01:38 +01:00
Renovate Bot
b42fa22ba1 build: update angular 2021-12-09 11:42:21 +01:00
Renovate Bot
5e7fcee0ec build: update angular 2021-12-08 10:06:40 +01:00
Alan Agius
9bacba3420 fix(@angular-devkit/build-angular): differentiate components and global styles using file query instead of filename
Previously, we introduced the `ngResource` query to Angular component resources we now use it with `resourceQuery` to differentiate between global and components styles, since in some cases while unlikely a file can be used as a component and global style.

Closes #7245
2021-12-08 08:33:18 +01:00
Alan Agius
9e22d7a215 refactor(@angular-devkit/build-angular): remove NG_BUILD_PROFILING and DEVKIT_PROFILING logic
Generating a CPU profile using Node.JS `--cpu-prof` or Chrome insector is preferred.

Closes #20336
2021-12-06 14:51:00 +00:00
Renovate Bot
0e9ef9589d build: update angular 2021-12-02 16:41:23 +00:00
Alan Agius
52c6c3df33
fix(@angular-devkit/build-angular): correctly extract messages when using cached build (#22266)
* fix(@angular-devkit/build-angular): correctly extract messages when using cached build

Extracted messages are not part of Webpack pipeline and hence they cannot be retrieved from cache. Therefore, we need to mark the extraction loader as non cacheable.

Closes #22264

* fixup! fix(@angular-devkit/build-angular): correctly extract messages when using cached build
2021-12-01 13:48:58 -08:00
Renovate Bot
41ccbfe943 build: update angular 2021-12-01 12:52:55 -08:00
Renovate Bot
504066d48b build: update angular to 0bb31f2 2021-11-30 11:28:39 -08:00
Renovate Bot
2f7d13a55e build: update angular 2021-11-29 09:49:21 -08:00
Renovate Bot
d260250c35 build: update angular to 21044c7 2021-11-24 17:12:33 +01:00
Renovate Bot
244ff98a4a build: update angular to 361f0e6 2021-11-23 07:45:12 +01:00
Alan Agius
1e9e890bb0 fix(@angular/cli): logic which determines which temp version of the CLI is to be download during ng update
Previously, when using an older version of the Angular CLI, during `ng update`, we download the temporary `latest` version to run the update. The ensured that when running that the runner used to run the update contains the latest bug fixes and improvements.

This however, can be problematic in some cases. Such as when there are API breaking changes, when running a relatively old schematic with the latest CLI can cause runtime issues, especially since those schematics were never meant to be executed on a CLI X major versions in the future.

With this change, we improve the logic to determine which version of the Angular CLI should be used to run the update.

Below is a summarization of this.

- When using the `--next` command line argument, the `@next` version of the CLI will be used to run the update.
- When updating an `@angular/` or `@nguniversal/` package, the target version will be used to run the update. Example: `ng update @angular/core@12`,  the update will run on most recent patch version of `@angular/cli` of that major version `@12.2.6`.
- When updating an `@angular/` or `@nguniversal/` and no target version is specified. Example: `ng update @angular/core` the update will run on most latest version of the `@angular/cli`.
- When updating a third-party package, the most recent patch version of the installed `@angular/cli` will be used to run the update. Example if `13.0.0` is installed and `13.1.1` is available on NPM, the latter will be used.
2021-11-23 07:44:53 +01:00
Renovate Bot
f7628da57b build: update angular 2021-11-22 08:55:58 +01:00
Renovate Bot
be32c9aa34 build: update angular 2021-11-18 21:13:31 +01:00
Charles Lyding
bc85637603 feat(@angular-devkit/build-angular): add estimated transfer size to build output report
When optimizations are enabled (either scripts or styles), an additional column will now be present in the output report shown in the console for an application build. This additonal column will display the estimated transfer size for each file as well as the total initial estimated transfer size for the initial files. The estimated transfer size is determined by calculating the compressed size of the file using brotli's default settings. In a development configuration (a configuration with optimizations disabled), the calculations are not performed to avoid any potential increase in rebuild speed due to the large size of unoptimized files.

Closes: #21394
2021-11-17 15:02:56 -08:00
Charles Lyding
ecd9fb5c77 feat(@angular/cli): provide more detailed error for not found builder
When a builder-based command is executed (build, serve, test, etc.) and the builder's node package cannot be found a more user-friendly error message is now displayed. In addition, when the builder's node package cannot be found, a check is performed to determine if the node packages for the workspace may have not been installed. Previously, a potentially long stacktrace was shown which did not provide much information regarding how to correct the issue.

Closes: #10536
2021-11-17 09:30:54 +00:00
Renovate Bot
1e81b8d472 build: update angular 2021-11-16 10:52:12 +00:00
Renovate Bot
721d5c6801 build: update angular 2021-11-08 10:20:33 -05:00
Renovate Bot
0d864a4239 build: update angular 2021-11-04 12:16:49 -04:00
Charles Lyding
e1bac5bbb3 fix(@angular-devkit/build-angular): update Angular peer dependencies to v13.1 prerelease
This change allows framework v13.1 prelease versions to be used with the Angular CLI 13.1 preleases without peer dependency warnings.
2021-11-04 12:15:13 -04:00
Renovate Bot
082b08f4f4 build: update angular 2021-11-02 08:08:24 +01:00
Renovate Bot
0998d164d5 build: update angular 2021-11-01 13:38:06 +01:00
Renovate Bot
ebccb5de4a build: update angular 2021-10-29 13:00:41 +02:00
Alan Agius
70494824df fix(@angular-devkit/build-angular): move @angular/localize detection prior to webpack initialization
Fail faster if `@angular/localize` is not installed and update the error message since now there is a single extraction mode.
2021-10-28 15:31:32 +02:00
Alan Agius
9b32066e88 fix(@angular/cli): update ng update output for Angular packages
With #21986 we now error when updating `@angular/` and `@nguniversal/` packages across multiple major versions. With this chnage we update `ng update` output to show the correct instructions.

Before
```
$ ng update --next

 We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cli                       12.2.12 -> 13.0.0-rc.2   ng update @angular/cli --next
      @angular/core                      11.2.14 -> 13.0.0-rc.2   ng update @angular/core --next
```

Now
```
$ ng update --next

 We analyzed your package.json, there are some packages to update:

      Name                               Version                  Command to update
     --------------------------------------------------------------------------------
      @angular/cli                       12.2.12 -> 13.0.0-rc.2   ng update @angular/cli --next
      @angular/core                      11.2.14 -> 12.2.9        ng update @angular/core@12
```

Closes #19381
2021-10-28 15:31:15 +02:00
Renovate Bot
9907f74b9c build: update angular 2021-10-28 10:51:28 +02:00
Renovate Bot
96f49bbfbd build: update angular 2021-10-27 04:43:56 -05:00
Alan Agius
57d7eb5b16 fix(@angular/cli): error when updating Angular packages across multi-major migrations
With this change we show an error message when users try to update `@angular/` and `@nguniversal/` packages across multiple major versions.
2021-10-26 04:45:18 -05:00
Renovate Bot
0ccc8d3ec7 build: update angular 2021-10-21 05:42:48 -05:00
Alan Agius
6944d9d795 test(@angular-devkit/build-angular): update tests to use xxhash64
`loader-utils` version 3, introduced a breaking change with uses the faster `xxhash64` hashing algo.
2021-10-21 05:41:37 -05:00
Renovate Bot
8a38e7c2cf build: update angular 2021-10-19 10:32:52 -04:00
Renovate Bot
c8d4a2e7c0 build: update angular 2021-10-13 16:27:37 -07:00
Alan Agius
3f72ccc5d2 fix(@angular/cli): generate new random user ID when passing empty string to uuid
`ng config cli.analyticsSharing.uuid ""` should generate new random user ID.

See: https://angular.io/cli/usage-analytics-gathering#per-user-tracking
2021-10-13 15:29:46 +02:00
Renovate Bot
c5f9c9adda build: update angular 2021-10-13 10:57:12 +02:00
Renovate Bot
6e6b0d8a69 build: update angular 2021-10-11 10:23:44 +02:00
Renovate Bot
8325477768 build: update angular 2021-10-08 10:56:36 +02:00
Alan Agius
94c00afbf3 fix(@schematics/angular): don't export renderModuleFactory from server file
Using `renderModuleFactory` is no longer needed since this was used for ViewEngine.
2021-10-07 18:50:54 +02:00
Renovate Bot
c44f122973 build: update angular 2021-10-07 11:41:42 +02:00
Charles Lyding
5a958884f6 build: update angular 2021-10-06 19:10:24 -04:00
Alan Agius
5904afd1de feat(@angular-devkit/build-angular): enable disk cache by default and provide configurable options
Persistent disk build cache is now enabled by default. A number of options have been added to allow fine tuning of the cache.

The options can be configuration in `cli.cache` section in the `angular.json` as shown below.

- `enabled`: Configure whether disk caching is enabled. Defaults to `true`
- `environment`: Configure in which environment disk cache is enabled. Valid values `ci`, `local` or `all`. Defaults to: `local`
- `path`: cache base path. Defaults to `.angular/cache`

DEPRECATED: `NG_BUILD_CACHE` environment variable option will be removed in the next major version. Configure `cli.cache` in the workspace configuration instead.

BREAKING CHANGE:  `NG_PERSISTENT_BUILD_CACHE` environment variable option no longer  have effect. Configure `cli.cache` in the workspace configuration instead.

```json
{
  "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
  "version": 1,
  "cli": {
    "cache": {
      "enabled": true,
      "path": ".custom-cache-path",
      "environment": "all"
    }
  }
  ...
}
```
2021-10-06 08:02:22 -05:00
Renovate Bot
0f6935f51a build: update angular 2021-10-06 06:12:52 -05:00
Charles Lyding
248ed4864e refactor(@angular-devkit/build-angular): remove unneeded @angular/core System.import workarounds
With the removal of support for the string form of `loadChildren` within the Angular router, the usage of `System.import` has also been removal from `@angular/core`. This removal allows for the additional removal of all workarounds within the Angular CLI due to the `System.import` usage. Webpack's deprecated support for `System.import` was previously required to be enabled which resulted in warnings that then needed to be suppressed. A Webpack context dependency replacement was also previously required to prevent Webpack from failing due to the otherwise unknown behavior of the `System.import` call. All of these workarounds have now been removed.
2021-10-06 06:11:36 -05:00
Charles Lyding
9287ff96d9 test: remove material-design-icons package E2E test
The `material-design-icons` package has not been updated in 5 years and is a large package (40+MB) that frequently causes CI flakes. The recommended method to including the Material design icons is with the Google Fonts API via a index HTML link element (allows for font inlining during production builds). As a result, this test has now been removed.
2021-10-06 06:11:09 -05:00
Charles Lyding
b7416d5d75 test: update E2E test utilities to support Node.js v16
Node.js v16's `fs.rmdir` will now throw an `ENOENT` error if the path does not exist. `fs.rm` is now the preferred option when using Node.js v16 but since this function is not available on Node.js v12 both are tried with `fs.rm` given preference.
2021-10-06 06:11:09 -05:00
Charles Lyding
9fe55752db feat(@angular/cli): officially support Node.js v16
Node.js v16 will be entering an LTS state prior to the release of Angular v13 which allows Node.js v16 to be marked as officially supported by the Angular CLI. The initial bootstrapping check now adds Node.js v16 to the output message in the event of an unsupported Node.js version.
NOTE: Prior to the final v13 release, the Node.js v16 minor should be updated to the actual LTS version once available.
2021-10-06 06:11:09 -05:00
Renovate Bot
4517ba016f build: update angular 2021-10-05 11:38:20 -04:00
Charles Lyding
d4eafe5851 test: workaround rxjs 6 directory imports in direct Webpack E2E test
rxjs 6 requires directory imports which are not support in ES modules. Disabling `fullySpecified` allows Webpack to ignore cases such as this until the package can be updated to use package exports.
2021-10-05 04:44:24 -05:00
Renovate Bot
1aad76f25f build: update angular 2021-10-01 10:35:24 -07:00
Charles Lyding
5b0fa75088 test: remove last string-form loadChildren usage
One E2E test was still using the deprecated string-form of the routing `loadChildren` property. The `loadChildren` usage has now been converted to use the suppported dynamic import form. The string-form has been removed from Angular v13.
2021-09-30 16:30:20 -07:00