2396 Commits

Author SHA1 Message Date
Alan Agius
fac9cca66b fix(@angular-devkit/build-angular): don't override asset info when updating assets
Currently, we are overriding asset info instead of appending additional data to it.
2022-03-30 15:20:03 +02:00
Alan Agius
2ab77429bb fix(@angular-devkit/build-angular): allow Workers in Stackblitz
This is no longer needed as Stackblitz implemented the missing Node.Js worker APIs.
2022-03-29 13:35:13 +02:00
Renovate Bot
17a7fdcd68 build: update all non-major dependencies 2022-03-26 08:25:40 +01:00
Alan Agius
cea83b2289 build: update build_angular_test_lib to include all non builders spec files 2022-03-24 14:41:26 +01:00
Alan Agius
4b4cecf88f test: update tests to work with Jasmine version 4
These changes include fixes to tests, timeout and stop of architect to make tests work with Jasmine 4.

One noticeable change that when we didn't stop architect through `run.stop()` this causes Bazel to timeout now.

Example
```
-- Test timed out at 2022-03-24 12:07:07 UTC --
/private/var/tmp/_bazel_alanagius/5168427e57f204ca069c602aa7ed1931/sandbox/darwin-sandbox/398/execroot/angular_cli/bazel-out/darwin-fastbuild/bin/packages/angular_devkit/build_angular/build_angular_browser_test.sh.runfiles/angular_cli/packages/angular_devkit/build_angular/build_angular_browser_test.sh: line 424: 41835 Terminated: 15          "${node}" ${LAUNCHER_NODE_OPTIONS[@]+"${LAUNCHER_NODE_OPTIONS[@]}"} ${USER_NODE_OPTIONS[@]+"${USER_NODE_OPTIONS[@]}"} "${MAIN}" ${ARGS[@]+"${ARGS[@]}"} 0<&0
```
2022-03-24 14:41:26 +01:00
Alan Agius
56b44aba74 refactor(@angular-devkit/build-angular): remove types for @discoveryjs/json-ext
This package now ships TypeScript declaration files.
2022-03-24 08:53:24 +01:00
Alan Agius
455aeea12d fix(@angular-devkit/core): add Angular CLI major version as analytics dimension
With this change we replace the custom dimension 8 `AOT Enabled`, with `Angular CLI Major Version`. The motivation behind replacing this dimension is that the there is already an `aot` dimension with id 13 which serves for the same purpose.

More information to why we need a new dimension for the Angular CLI major version can be found #22130

Closes #22130
2022-03-24 08:53:10 +01:00
Renovate Bot
c315b47068 build: update all non-major dependencies 2022-03-23 12:59:21 -07:00
Charles Lyding
966d25b55e fix(@angular-devkit/build-angular): remove unneeded JIT reflect metadata polyfill
Since Angular 8, the CLI has transformed decorator metadata to a form that can be used by the Angular dependency injector without the TDZ limitations of Typescript's decorator metadata emit feature.
As a result, a JIT application compiled with the CLI no longer requires the reflect metadata polyfill that was provided by `core-js`.
This polyfill was also the last remaining usage of the `core-js` package within `@angular-devkit/build-angular` which allows the `core-js` package to also be removed.

Refs: https://github.com/angular/angular-cli/pull/14473 & https://github.com/angular/angular/pull/37382

BREAKING CHANGE: Reflect metadata polyfill is no longer automatically provided in JIT mode
Reflect metadata support is not required by Angular in JIT applications compiled by the CLI.
Applications built in AOT mode did not and will continue to not provide the polyfill.
For the majority of applications, the reflect metadata polyfill removal should have no effect.
However, if an application uses JIT mode and also uses the previously polyfilled reflect metadata JavaScript APIs, the polyfill will need to be manually added to the application after updating.
To replicate the previous behavior, the `core-js` package should be manually installed and the `import 'core-js/proposals/reflect-metadata';` statement should be added to the application's `polyfills.ts` file.
2022-03-23 12:58:55 -07:00
Alan Agius
861ec0f7d0 refactor(@angular-devkit/build-angular): lazy import inquirer
`inquirer` has a number of depedencies which slow down module resolution when importing (~138ms) by lazy loading this module we remove this overhead when prompts are not needed.
2022-03-23 12:58:35 -07:00
Paul Gschwendtner
0c344259dc fix(@ngtools/webpack): update peer dependency to reflect TS 4.6 support
Updates the peer dependency to reflect the TS 4.6 support, avoiding
warnings like:

```
warning "@angular-devkit/build-angular > @ngtools/webpack@14.0.0-next.6" has incorrect peer dependency "typescript@>=4.4.3 <4.6".

```
2022-03-23 12:58:17 -07:00
Renovate Bot
e5a7bb17d8 build: update all non-major dependencies 2022-03-21 12:28:37 -07:00
Tobias Speicher
137651645c refactor: replace deprecated String.prototype.substr()
.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
2022-03-21 12:27:52 -07:00
Renovate Bot
becd7b6ed9 build: update all non-major dependencies 2022-03-18 11:45:03 -07:00
Renovate Bot
1a36fd94a8 build: update all non-major dependencies 2022-03-16 14:15:50 -04:00
Alan Agius
b8564a638d refactor(@angular-devkit/build-angular): remove deprecated NG_BUILD_CACHE environment variable
BREAKING CHANGE:

`NG_BUILD_CACHE` environment variable has been removed. `cli.cache` in the workspace configuration should be used instead.
2022-03-15 16:30:35 -04:00
Renovate Bot
455c6bc679 build: update dependency cacache to v16 2022-03-15 12:17:23 -04:00
Renovate Bot
9c8b3a16f6 build: update all non-major dependencies 2022-03-15 11:06:45 -04:00
Renovate Bot
e873cd1050 build: update all non-major dependencies 2022-03-14 10:07:40 -04:00
Alan Agius
9ddb220c3d docs: replace app with application 2022-03-14 10:03:06 -04:00
Alan Agius
7fa3e65879 feat(@angular/cli): support TypeScript 4.6.2
BREAKING CHANGE:

Support for TypeScript 4.4 and 4.5 has been removed. Please update to TypeScript 4.6.
2022-03-10 15:36:19 -05:00
Renovate Bot
8673e3d36b build: update all non-major dependencies 2022-03-09 17:43:38 +01:00
Alan Agius
2e0493130a refactor(@angular/cli): replace command line arguments parser
With this change we refactor the Angular CLI and replace the underlying args parser and command builder. We choose to use Yargs as our parser and command builder of choice. The main advantages of Yargs over other command builders are;

- Highly configurable.
- We already use it in other packages such as the compiler-cli/dev-infra etc..
- Commands and options can be added during runtime. This is a requirement that is needed to support architect and schematics commands.
- Outstanding documentation.
- The possibility to parse args without parser configuration (Free form).
- Commands are built lazily based on the arguments passed.

BREAKING CHANGE:

Several changes in the Angular CLI commands and arguments handling.

- `ng help` has been removed in favour of the `—-help` option.
- `ng —-version` has been removed in favour of `ng version` and `ng v`.
- Deprecated camel cased arguments are no longer supported. Ex. using `—-sourceMap` instead of `—-source-map` will result in an error.
- `ng update`, `—-migrate-only` option no longer accepts a string of migration name, instead use `—-migrate-only -—name <migration-name>`.
- `—-help json` help has been removed.

Closes #20976, closes #16614 and closes #16241
2022-03-09 17:18:53 +01:00
Renovate Bot
df41f2ba1e build: update all non-major dependencies 2022-03-07 09:25:06 +01:00
Alan Agius
4ebfe03415 feat(@angular/cli): drop support for Node.js 12
Node.js v12 will become EOL on 2022-04-30. As a result, Angular CLI v14 will no longer support Node.js v12.

BREAKING CHANGE:

Support for Node.js v12 has been removed as it will become EOL on 2022-04-30. Please use Node.js v14.15 or later.
2022-03-04 22:38:45 +01:00
Alan Agius
ef753628a6 refactor(@angular-devkit/build-angular): move dev-server specs into a seperate directory 2022-03-04 17:18:54 +01:00
Alan Agius
433b6b4931 docs: remove redundant default empty strings values
(cherry picked from commit 3d928c01c8196b1caba7b373eec870540ecda79e)
2022-03-04 16:58:55 +01:00
Alan Agius
d0407b3367 docs(@angular-devkit/build-angular): update link to Angular Package Format documentation
The APF spec now lives in AIO.
2022-03-04 16:58:55 +01:00
Alan Agius
e28c715972 fix(@angular-devkit/build-angular): ignore css only chunks during naming
Don't name CSS only chunks.

Closes #22769
2022-03-04 16:58:38 +01:00
Renovate Bot
a11c947c73 build: update all non-major dependencies 2022-03-04 09:56:53 +01:00
Renovate Bot
a3c0aa9f86 build: update all non-major dependencies 2022-03-03 18:53:49 +01:00
Renovate Bot
4df12dc121 build: update all non-major dependencies 2022-03-01 10:39:10 -08:00
Charles Lyding
f0daa8c3bf refactor(@angular-devkit/build-angular): remove unneeded JsonObject type casting
The use of the `@angular-devkit/core` `JsonObject` type is no longer needed to satisfy the type requirements of `@angular-devkit/architect` package builder creation functions.
2022-02-25 13:35:14 -05:00
Charles Lyding
ed67d9a362 refactor(@angular-devkit/build-angular): replace most custom path resolve usages with Node.js builtins
During the build initialization phase, many paths are converted back and forth between multiple normalized forms. These conversions involve potentially expensive string operations. The majority of the custom path `resolve` function from `@angular-devkit/core` usages have now been removed in favor of the Node.js builtin path functions. This change reduces the need to perform additional string manipulation where possible.
2022-02-25 07:46:35 -05:00
Alan Agius
de14293083 fix(@angular-devkit/build-angular): don't rename blocks which have a name
When using the unsupported `webpackChunkName` magic comment we renamed the chunk which in some cases causes a runtime error.

Closes #22525
2022-02-22 16:30:59 -05:00
Renovate Bot
748d3ab2e5 build: update all non-major dependencies 2022-02-22 10:19:13 -05:00
Renovate Bot
e0e4cd6231 build: update dependency sass to v1.49.8 2022-02-18 12:39:58 -05:00
Renovate Bot
3c31c22ba6 build: update all non-major dependencies 2022-02-17 19:02:19 +01:00
Alan Agius
ee95366ea3 build: rollback @babel/generator to 7.17.0
This is a fix to avoid hosting issues which causes bazel test to fail.
2022-02-16 18:51:33 +01:00
Alan Agius
40301a2174 build: revert to @babel/core version 7.17.2
7.17.3 is breaking vendor sourcemaps in windows.

See: https://app.circleci.com/pipelines/github/angular/angular-cli/20692/workflows/9fc4f39e-d2f2-47c3-af01-f3a01c1bf542/jobs/288690

Related to https://github.com/babel/babel/issues/14277
2022-02-16 18:51:33 +01:00
Renovate Bot
d79f2b7c1c build: update dependency minimatch to v5 2022-02-16 12:21:12 +01:00
Renovate Bot
65be45b4b2 build: update all non-major dependencies 2022-02-16 12:19:30 +01:00
Renovate Bot
fea9984d8a build: update dependency minimatch to v4 2022-02-14 10:36:36 +01:00
Renovate Bot
3b7eec7717 build: update all non-major dependencies 2022-02-14 10:36:18 +01:00
Renovate Bot
6323e1bbcd build: update all non-major dependencies 2022-02-11 13:03:08 +01:00
Anner Visser
fafbbeab6d fix(@angular-devkit/build-angular): update license-webpack-plugin to 4.0.2
Fixes builds with extractLicenses enabled when using dynamic exports

Fixes #22662
2022-02-10 18:51:20 +01:00
Alan Agius
063acc335a test: change puppeteer imports to use primary entry-point 2022-02-10 14:16:24 +01:00
Alan Agius
561df27e36 test(@angular-devkit/build-angular): disable html karma coverage reporter
Under bazel this causes the below error.

```
Unexpected error while generating coverage report. [Error: EEXIST: file already exists, mkdir
```
2022-02-10 14:16:24 +01:00
Renovate Bot
4b529fe80c build: update all non-major dependencies 2022-02-10 14:16:24 +01:00
Renovate Bot
61898a9a63 build: update all non-major dependencies 2022-02-09 11:15:55 +00:00