1
0
mirror of https://github.com/angular/angular-cli.git synced 2025-05-24 08:06:17 +08:00

9232 Commits

Author SHA1 Message Date
Joey Perrott
3d76cef369 build: add caretaker configuration to ng-dev config
Add the caretaker configuration to set up being able to run both the carataker
check and the handoff commands.

The caretaker handoff command will operate using the angular-cli-caretaker group
which has already been seeded with the current information.
2022-05-23 14:53:55 -07:00
Renovate Bot
163906a0f2 build: update actions/upload-artifact action to v3.1.0 2022-05-23 10:12:23 -07:00
Renovate Bot
a7d97c2698 build: update dependency stylus-loader to v7 2022-05-23 10:12:07 -07:00
Renovate Bot
a465c5c11b build: lock file maintenance 2022-05-23 10:10:27 -07:00
Renovate Bot
f66abe7a9b build: update angular to e99c683 2022-05-23 10:10:12 -07:00
Alan Agius
076b601c23 fix(@angular-devkit/build-angular): close dev-server on error
When running protractor, previously we didn't close the dev-server correctly when there was an error which caused the process to keep running following https://github.com/angular/angular-cli/pull/23166
2022-05-23 10:09:39 -07:00
Joey Perrott
fe3d8ca0b6 build: update saucelabs key
Update the saucelabs key for the newly generated key
2022-05-21 22:41:29 +02:00
Alan Agius
6cbb9413d0 fix(@angular-devkit/build-angular): add debugging and timing information in JavaScript and CSS optimization plugins
This can be useful to debug slow builds.

Example of output
```
LOG from build-angular.JavaScriptOptimizerPlugin
<t> optimize asset: runtime.ad5c30339e926c89.js: 221.959564 ms
<t> optimize asset: polyfills.ec3ffae5bac27204.js: 1071.080092 ms
<t> optimize asset: main.aa8a15155ca2133f.js: 3391.588635 ms
<t> optimize js assets: 3483.799739 ms

LOG from build-angular.CssOptimizerPlugin
<t> optimize asset: styles.d251c5bf54715558.css: 26.569907 ms
<t> optimize css assets: 34.441737 ms
```

```
LOG from build-angular.JavaScriptOptimizerPlugin
<i> polyfills.ec3ffae5bac27204.js restored from cache.
<i> runtime.ad5c30339e926c89.js restored from cache.
<t> optimize asset: main.69fb55a243b46bfa.js: 2618.5191210000003 ms
<t> optimize js assets: 2721.226144 ms

LOG from build-angular.CssOptimizerPlugin
<i> styles.d251c5bf54715558.css restored from cache.
<t> optimize css assets: 12.149169 ms
```
2022-05-20 11:40:36 -07:00
Renovate Bot
1140d73e15 build: update dependency postcss-loader to v7 2022-05-20 11:20:58 -07:00
Renovate Bot
688e32cd3d build: update dependency sass to v1.52.0 2022-05-20 11:20:41 -07:00
Renovate Bot
469d9ec246 build: update dependency copy-webpack-plugin to v11 2022-05-20 11:20:27 -07:00
Jason Bedard
22af652083 test: do not depend on runtime resolution of @angular-devkit/core 2022-05-19 18:31:10 -07:00
Renovate Bot
6735b8372a build: update angular 2022-05-19 18:29:34 -07:00
Renovate Bot
92d365b879 build: update dependency less-loader to v11 2022-05-19 15:02:39 -07:00
Charles Lyding
aadcb8a2f9 test: update Webpack app E2E test to use Angular v14 RC 2022-05-19 15:01:42 -07:00
Charles Lyding
8dbf5af2fa test: update E2E tests to support using npm 7+
Several tests that perform package actions during the test have been updated to
function correctly when used with npm. npm 7+ performs additional resolution
on peer dependencies which can result in failures during testing.
The following tests have been updated:
* `build/material` - This test contained an actual error in that it was installing the `latest`
version of `@angular/material-moment-adapter` when testing prereleases even though
it should have been installing the `next` tag instead.
* `build/styles/tailwind-v2` - This test had to be reordered due to npm 7+ keeping the
installed `tailwindcss` peer dependency in a non-hoisted location even after the project
level package was uninstalled. The ordering also uncovered a Webpack cache key creation defect
wherein the cache key does not account for the presence of `tailwindcss`. Until this
is corrected, the test temporarily disables caching.
* `commands/add/version-specifier` - This test intentionally attempts to install package
versions that do not meet peer dependency requirements to ensure that the `ng add` command
correctly notifies the user. To allow for this to occur, the npm `force` option is used
to prevent the package install aspects of the command from failing.
2022-05-19 15:01:42 -07:00
Renovate Bot
0fc1c33a7c build: update all non-major dependencies 2022-05-19 15:00:48 -07:00
Doug Parker
0edc0e1d6d docs: release notes for the v14.0.0-rc.1 release 2022-05-18 14:57:33 -07:00
Doug Parker
56e9c56a7c docs: release notes for the v13.3.6 release 2022-05-18 12:44:18 -07:00
Doug Parker
b79b0f0aae fix(@angular/cli): skip prompt or warn when setting up autocompletion without a global CLI install
If the user does not have a global install of the Angular CLI, the autocompletion prompt is skipped and `ng completion` emits a warning. The reasoning for this is that `source <(ng completion script)` won't work without `ng` on the `$PATH`, which is only really viable with a global install. Local executions like `git clone ... && npm install && npm start` or ephemeral executions like `npx @angular/cli` don't benefit from autocompletion and unnecessarily impede users.

A global install of the Angular CLI is detected by running `which -a ng`, which appears to be a cross-platform means of listing all `ng` commands on the `$PATH`. We then look over all binaries in the list and exclude anything which is a directo child of a `node_modules/.bin/` directory. These include local executions and `npx`, so the only remaining locations should be global installs (`/usr/bin/ng`, NVM, etc.).

The tests are a little awkward since `ng` is installed globally by helper functions before tests start. These tests uninstall the global CLI and install a local, project-specific version to verify behavior, before restoring the global version. Hypothetically this could be emulated by manipulating the `$PATH` variable, but `which` needs to be available (so we can't clobber the whole `$PATH`) and `node` exists in the same directory as the global `ng` command (so we can't remove that directory anyways). There's also no good way of testing the case where `which` fails to run.

Closes .
2022-05-18 10:28:57 -07:00
Doug Parker
f6b52e47a3 docs: add Angular CLI autocompletion doc
This explains how to set up autocompletion with the Angular CLI:

1. Via the automated prompt on first execution.
2. Via `ng completion`.
3. Manually via appending `source <(ng completion script)` to the user's `~/.bashrc` file.

It also specifically calls out supported and unsupported platforms as well as the requirement for a global install of the Angular CLI.
2022-05-18 13:22:59 -04:00
Renovate Bot
516f8a87c5 build: update angular 2022-05-18 13:19:58 -04:00
Elton Coelho
d899091d5d fix(@schematics/angular): alphabetically order imports during component generation
change the order of imports during component generation using changeDetectionStrategy set to OnPush

closes angular#23156
2022-05-18 12:58:10 -04:00
Alan Agius
b71608195b fix(@angular-devkit/build-angular): close compiler on Karma exit
The webpack compiler was never closed which caused Webpack's shutdown hook c71832f3a9/packages/angular_devkit/build_angular/src/webpack/configs/styles.ts (L113-L114) to never be called and in turn caused the Sass workers never to be termined.
2022-05-18 12:46:05 -04:00
Alan Agius
f99c08ce00 fix(@angular/cli): ng doc doesn't open browser in Windows
In Windows, `process.exit` was being called prior of opening the browser which caused the browser never to open.

Closes 
2022-05-18 12:46:05 -04:00
Charles Lyding
5ad5bdad3d fix(@angular/cli): ensure all available package migrations are executed
For v14, the update command migration execution logic was incorrectly exiting after
the success of the first package's migrations. This prevented any other updated
packages from executing migrations automatically. The success check is now a failure
check and will allow the migration execution process to continue to execute migrations
until complete or a failure occurs.
2022-05-18 12:42:50 -04:00
George Kalpakas
9f5550e3a4 fix(@angular/cli): correctly handle --search option in ng doc
When the `--search` option is passed to `ng doc`, it should open a URL
that does a search across the whole website (instead of the default
behavior of limiting the search to API docs).
Fix the `ng doc` command to implement the iteded behavior (previously,
it did the opposite).
2022-05-18 12:03:10 -04:00
Charles Lyding
177fa0d8c0 test: ensure npm 7 E2E test reset global version back to the actual initial version
The `misc/npm-7` E2E test previously assumed the initial version of npm was 6.x and
would then always install 6.x after the test was complete. With newer Node.js versions
this assumption is no longer true. The test now records the initial version present
prior to starting the test and restores that recorded version at completion.
2022-05-18 09:36:39 -04:00
Charles Lyding
7c0cdbd726 build: update Angular snapshots 2022-05-18 09:36:39 -04:00
Charles Lyding
b867714c3d build: update peer dependencies to support unreleased 14.1.x prerelease snapshots 2022-05-18 09:36:39 -04:00
Charles Lyding
29a9b0f9b2 ci: use current minimum Node.js v16 version to test snapshot builds
Node.js 16.10 is currently the minimum version of v16 supported by the Angular CLI
and is now used when executing the Angular snapshot E2E test suite to ensure
that the latest snapshots of Angular continue to function at this Node.js version.
Node.js v16 is the version currently used to develop the Angular CLI.
The npm 7+ workaround of installing npm 6 is also removed to more closely track
the behavior of Node.js 16.10 as well as any other Node.js version used during
testing.
2022-05-18 09:36:39 -04:00
Renovate Bot
ff605b240b build: update github/codeql-action action to v2.1.11 2022-05-18 09:33:56 -04:00
Alan Agius
c71832f3a9 fix(@angular/cli): resolve relative schematic from angular.json instead of current working directory
Relative schematics referenced in `angular.json` `schematicCollections` and `defaultCollection` were always resolved from the current working directory, which is not correct and caused the collection not to be resolved when the this is different from the location of the workspace config.

Closes 
2022-05-17 14:00:52 -07:00
Alan Agius
f00da00e86 fix(@angular/cli): print schematic errors correctly
Previously, the errors were JSON stringified (https://github.com/angular/angular-cli/blob/main/packages/angular/cli/lib/cli/index.ts#L80) which caused them not to be displayed correctly.

Closes 
2022-05-17 14:00:20 -07:00
Renovate Bot
675a7f6c8b build: lock file maintenance 2022-05-17 10:02:43 -04:00
Renovate Bot
2b4180296f build: update github/codeql-action digest to 2f58583 2022-05-16 15:27:17 -04:00
Doug Parker
25482d72b9 docs: remove caretaker pairings
This list is out of date and not used. The calendar is listed above and is the source of truth, so there is no need for this table.
2022-05-16 09:21:14 -04:00
Doug Parker
53862e92d5 docs: update analytics approvers
Stephen and Igor are no longer the leads for DevRel and Angular respectively. Updated to use generic language so this doesn't fall out of date as easily.
2022-05-16 09:21:14 -04:00
Kristiyan Kostadinov
8ed291d0a5 build: update to TypeScript 4.7 RC
Bumps up the repo to the RC version of TypeScript 4.7.
2022-05-16 09:19:26 -04:00
Renovate Bot
9fd042dcce build: update all non-major dependencies 2022-05-16 09:13:32 -04:00
Renovate Bot
4be7cdce82 build: update all non-major dependencies 2022-05-12 09:43:13 -04:00
Alan Agius
a867aa4536 refactor(@ngtools/webpack): simplify resolution flow by using generators
With this change we refactor the paths-plugin resolution flow by using generators which makes the code more readable and easier to follow.
2022-05-12 09:32:19 -04:00
Charles Lyding
f4fed58a05 ci: remove redundant PR required statuses check from bot configuration
Required PR statuses are now exclusively handled via Github configuration.
2022-05-12 09:26:40 -04:00
Doug Parker
d00ab1c863 test: update standalone test to add Protractor testing support
After https://github.com/angular/angular/pull/45885, testability now needs to be explicitly added to `bootstrapApplication()`.

(cherry picked from commit 329a2a3798c1d5e60a7c6b165e9da2b9040c223b)
2022-05-11 16:07:57 -07:00
Doug Parker
5a53da03f0 docs: release notes for the v14.0.0-rc.0 release 2022-05-11 15:17:54 -07:00
Renovate Bot
b220f32a69 build: update github/codeql-action action to v2.1.10 2022-05-11 09:13:35 -07:00
Jason Bedard
aa30bb156d test: use random ports for local verdaccio npm servers 2022-05-11 09:12:11 -07:00
Paul Gschwendtner
ba93117e78 fix(@angular-devkit/build-angular): properly handle locally-built APF v14 libraries
Locally-built APF v14 libraries should be resolved properly. Webpack
currently does not resolve them (in e.g. `dist/`) because the local
distribution folders are not marked as module roots, causing Webpack
to never hit the `module`/`raw-module` resolution hooks and therefore
skipping package exports resolution and breaking secondary entry-points
from being resolved properly (when bundling).

We fix this by also attempting to resolve path mappings as modules,
allowing for Webpacks `resolve-in-package` hooks to be activated. These
hooks support the `exports` field and therefore APF v14 secondary
entry-points which are not necessarily inside a Webpack resolve
`modules:` root (but e.g. in `dist/`)
2022-05-11 08:59:07 -07:00
Renovate Bot
736e94511e build: update dependency puppeteer to v14 2022-05-10 12:19:40 -07:00
Jason Bedard
3acab290c1 build: replace minimist with yargs-parser 2022-05-10 12:19:18 -07:00