1779 Commits

Author SHA1 Message Date
Alan Agius
6677994235 fix(@angular-devkit/build-angular): fix incorrect glob cwd in karma when using --include option
Previously, we amended the project source root to the source root which resulted in an invalid path.

Closes #23396
2022-06-21 11:34:36 -07:00
Alan Agius
0f02b0011b fix(@angular-devkit/build-angular): handle codeCoverageExclude correctly in Windows
Previously, `codeCoverageExclude` didn't work correct on Windows

Closes #23403
2022-06-21 11:26:59 -07:00
Alan Agius
fd92eaa865 fix(@angular/cli): provide an actionable error when using --configuration with ng run
With this commit we issue a more actionable error message when using the unsupported
`--configuration` option with the`ng run` command.

Closes #23385
2022-06-17 16:25:54 +02:00
Renovate Bot
268ccd5c5f build: update angular 2022-06-16 13:53:49 +02:00
Renovate Bot
01e71dd9c8 build: update angular to a98d0ec 2022-06-15 11:06:16 +02:00
Alan Agius
d1e3d98b81 build: remove env logging in exec method
This adds a lot of noise and very rare proved to be useful.

Envs are also printed as part of step 300.
2022-06-14 19:46:08 +02:00
Alan Agius
e8470ed391 test: renove npm/node version from step 300
These will be displayed in `ng version`.
2022-06-14 19:46:08 +02:00
Alan Agius
6d7ecb81e6 test: remove legacy project structure handling
This is no longer needed as this is legacy
2022-06-14 19:46:08 +02:00
Alan Agius
2c95ea7415 test: couple of clean ups in e2e tests
Split tests and remove disabled tests
2022-06-14 19:46:08 +02:00
Charles Lyding
4c3a956c1a test: assert catch clause variable type before usage in E2E tests
Prepares the E2E tests for the eventual change of enabling the
TypeScript `useUnknownInCatchVariables` option. This option provides additional
code safety by ensuring that the catch clause variable is the proper type before
attempting to access its properties. Similar changes will be needed in the other
packages in the repository prior to enabling `useUnknownInCatchVariables`.
2022-06-14 11:28:21 +02:00
Alan Agius
9b1a36a9d6 test: delete styles test which is in build-angular 2022-06-13 21:45:16 +02:00
Alan Agius
59fe830d18 test: simplify test sourcemaps e2e test 2022-06-13 21:45:16 +02:00
Alan Agius
82ec1af4e1 fix(@angular/cli): show more actionable error when command is ran in wrong scope
Currently, we don't register all available commands. For instance, when the CLI is ran inside a workspace the `new` command is not registered. Thus, this will cause a confusing error message when `ng new` is ran inside a workspace.

Example:
```
$ ng new
Error: Unknown command. Did you mean e?
```

With this commit we change this by registering all the commands and valid the command scope during the command building phase which is only triggered once the command is invoked but prior to the execution phase.
2022-06-13 19:22:56 +02:00
Alan Agius
c3b5b72162 ci: ignore all Windows process kill errors
When using ramdisk we now get different errors some times

```
ERROR: The process with PID 3804 (child process of PID 7516) could not be terminated.
Reason: The operation attempted is not supported.
```
2022-06-13 16:20:12 +02:00
Renovate Bot
85913b5092 build: update angular to b730f3b 2022-06-13 09:44:11 +02:00
Alan Agius
789d78fa91 test: delete local VE library E2E test
Local libraries are no longer built in VE
2022-06-10 16:37:37 -04:00
Alan Agius
1643686d5d test: delete tests which are no longer relevant
These tests are either no longer relavant or they are present as specs in build-angular.
2022-06-10 16:37:37 -04:00
Alan Agius
6e1cf8ff06 test: move build related tests under build directory 2022-06-10 16:37:37 -04:00
Alan Agius
3da6c62fee test: remove old no longer relevant tests 2022-06-10 16:37:37 -04:00
Alan Agius
d827e84d96 test: re-enable i18n app-shell tests
No reason for this to be kept disabled since the missing functionality has been now added.
2022-06-10 16:37:37 -04:00
Alan Agius
dc544d9d98 test: delete disable ivy i18n server test
Server i18n is testing in the app-shell test.
2022-06-10 16:37:37 -04:00
Alan Agius
7f4612db43 test: always install a compatible version of @angular/material-moment-adapter
When not install a compatible version tests can fail due example https://app.circleci.com/pipelines/github/angular/angular-cli/23342/workflows/77ac48f1-1445-4722-9294-7841afc0b2cc/jobs/309894
2022-06-10 15:59:32 -04:00
Alan Agius
e73c968b3d test: reduce disk-cache E2E tests duration
We don't need to include all applications code to verify disk cache existence.

This reduces the test duration of `disk-cache.ts` by a whopping `~65s` since this tests runs `ng build` 5 times and `disk-cache-purge.ts` by `~13s`.

These timings were gathered using gLinux and is expected that the gain is more significant on Circle CI Linux and Windows executors.
2022-06-10 15:58:26 -04:00
Jason Bedard
58c2c09506 test: use random port for e2e express http server tests 2022-06-10 09:41:28 -04:00
Jason Bedard
581602e8e7 test: use random port for ng serve e2e tests 2022-06-10 09:41:28 -04:00
Alan Agius
e2c7502730 test: split module resolutions E2E in multiple tests
This test does a large number of builds by spliting the tests, in CI we can reduce the blocking time for other tests. Locally this tests take ~3 mins in CI.
2022-06-10 09:27:19 -04:00
Jason Bedard
7ce88c74ed test: ensure test registry is used by default 2022-06-09 12:16:28 -04:00
Alan Agius
1f66edebcc fix(@angular-devkit/build-angular): replace fallback locale for en-US
Pre version 14, the locale for `en-US` was `en-US-POSIX`. now in version 14, this has changed to `en-US`.

List of all available locales 7033ea9b03/cldr-json/cldr-core/availableLocales.json (L64)

Closes #23334
2022-06-09 10:41:27 -04:00
Alan Agius
2d13c1cd9e test: remove tailwind CJS E2E test workaround
This workaround is no longer needed since tailwinds now handles creating cjs configuration.
2022-06-09 09:28:59 -04:00
Renovate Bot
df9ce71362 build: update angular 2022-06-09 09:23:45 -04:00
Doug Parker
f1dbdb95e0 fix(@angular/cli): correctly print package manager name when an install is needed
This was printing "Try installing with '[object Object] install'".
2022-06-08 15:31:22 -04:00
Alan Agius
b9a822e24d test: avoid process kill race conditions
When using `waitForMatch` the promise is resolved prior to the process being killed which in some cases caused a race condition because `treekill` would to be invoked for a process which in the meantime will be killed gracefully.
2022-06-08 12:37:17 -04:00
Alan Agius
d02c4e29b3 build: add tsconfig config in e2e folder
This is picked up by the TS language server which improves DX when writing and debugging tests. Previously, the default TS options were used which results in discrepancies such as strict mode is not enabled.
2022-06-08 12:08:34 -04:00
Alan Agius
b764ecb1fa test: minor clean up of runSteps logic
Remove redundant vars and imports
2022-06-08 12:08:34 -04:00
Alan Agius
b4767ae296 test: change git utils to async/await
Minor cleanups in git utils code
2022-06-08 12:08:34 -04:00
Alan Agius
5321b3dfcf test: remove redundant killAllProcesses call
`killAllProcesses` is called post test execution there it is not needed to be run after tests.
2022-06-08 12:08:34 -04:00
Alan Agius
f6e8ce2af1 fix(@angular/cli): handle project being passed as a flag
Yargs allows passing using positional arguments as flags. This we should handle this when retrieving the project.

Closes #23291
2022-06-08 10:03:50 -04:00
Alan Agius
79ea0f3ae3 fix(@angular/cli): provide actionable error when project cannot be determined
When the workspace has multiple projects and we the project to use cannot be determined from the current working directory, we now issue an actionable error message.
2022-06-08 10:03:50 -04:00
Alan Agius
373d380597 test(@angular/cli): move completion command test in own directory
Just re-organizing a bit
2022-06-08 09:13:14 -04:00
Charles Lyding
ffa9a0612b test: ensure legacy peer dependency mode for E2E snapshot tests
Snapshot builds may contain versions that are not yet released (e.g., RC phase main branch).
In this case peer dependency ranges may not resolve causing npm 7+ to fail during tests.
To support this case, legacy peer dependency mode is enabled for snapshot builds.
2022-06-07 16:33:08 -04:00
Charles Lyding
d78826353b fix(@angular/cli): ensure full process exit with older local CLI versions
Angular CLI versions prior to v14 may not exit correctly if not forcibly exited
via `process.exit`. When the local CLI version is less than v14, the CLI will now
use `process.exit` to ensure the process exits with these older CLI versions.

Fixes #23289
2022-06-07 16:22:38 -04:00
Jason Bedard
edc6afb5f1 test: wait for killAllProcesses() to complete before proceeding 2022-06-07 16:21:21 -04:00
Jason Bedard
9c26e2850c test: run tests in isolated subprocess 2022-06-07 11:38:58 -04:00
Jason Bedard
a6faf972ec test: separate test vs test setup execution 2022-06-07 11:38:58 -04:00
Jason Bedard
c74bb5652c test: extract test runner method 2022-06-07 11:38:58 -04:00
Charles Lyding
f6f37821c8 fix(@angular/cli): improve resilience of logging during process exit
In certain situations the existing console logger created via `@angular-devkit/core` `createConsoleLogger`
could try to write to a closed stdout pipe stream. This would result in an error during
execution. For cases such as the completion script command, this would also prevent the
command from functioning. To mitigate these cases, `createConsoleLogger` is no longer used
and instead a logger instance is directly created within the CLI that uses `Console.log`
and `Console.error` to write output. Exiting the CLI also now waits for messages to be
logged before proceeding with the exit.
2022-06-06 15:42:12 -04:00
Jason Bedard
9efa38106d build: add legaci-cli e2e bazel build 2022-06-06 15:38:01 -04:00
Jason Bedard
59a1502272 build: fix typescript compilation errors 2022-06-06 15:38:01 -04:00
Renovate Bot
32855b9c9d build: update angular to 1bb83af 2022-06-06 09:29:23 -04:00
Renovate Bot
45b6954174 build: update angular 2022-06-03 15:15:13 -04:00