This change ensures that both the global version and the project version Node.js version requirements are met before the CLI executes a command. Previously an older global version of the CLI would allow a newer project version to execute even if the project version had more strict Node.js version requirements. The Node.js version is now checked twice. Once in an ES5 safe script to ensure that ancient Node.js versions are not in use. And secondly in the CLI entry code that is executed after global/project bootstrapping.
We don't actually know for certain that the migration was successful, only that it finished. This updates the messaging to be more clear about this distinction. I also removed the check mark and green coloring which implied success.
Explained here: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
Current change affects reading of global config from `.angular-config.json`. By default it will be created in user's home directory. If user moves it manually to `$HOME/.config/angular/.angular-config.json`, it will be subsequently read from new location.
Previously we passed `--no-bin-links` because we used to install packages globally in some cases. But now this is no longer needed as we should now have permissions to generate "local" bin links even during a temp installations as these will no longer generate bin links in the global context.
Fixes#16133
Fixes#16060.
Any time a `git commit` is made, the CLI now prints out the hash and short message. For migrations, the message is simply the first line of the commit. For schematics, the commit message isn't all that helpful, so I used the list of packages instead.
With this change we improve the log messages of migration;
> the migration description
> the outcome of the migration
> we also remove the version of the migration which was misleading (Ex: 9.0.0-beta)
In the case users don't have analytics globally configured when the CLI will self update during ng update. It will prompt to configure this.
However, afterwards the update will fail with `Repository is not clean. Please commit or stash any changes before updating.` as there would be uncommited local changed.
With this change we now check if the current CLI version is the latest published version. If it is not, we install a temporary version to run the `ng update` with.
As `git status --porcelain` always shows paths relative to the top
level, fetch the top level path in `checkCleanGit` and properly
determine whether any modified files are actually within the
Angular workspace root.
It's now possible to use multiple configurations by separating them with a comma:
```
ng build --configuration=one,two,three
```
They will be applied from left to right. If `--prod` is also present, it will be considered to be the first configuration and thus able to be overriden.
You can also use it in target strings:
```
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "latest-project:build:one,two"
},
"configurations": {
"production": {
"browserTarget": "latest-project:build:production,one,two"
}
}
```
Fix https://github.com/angular/angular-cli/issues/10612
With this change the CLI offers a way for a package authors to specify if during `ng add` the package should be saved as a `dependencies`, `devDependencies` or not saved at all.
Such config needs to be specified in `package.json`
Example:
```json
"ng-add": {
"save": false
}
```
Possible values are;
- false - Don't add the package to `package.json`
- true - Add the package to the `dependencies`
- `dependencies` - Add the package to the `dependencies`
- `devDependencies` - Add the package to the `devDependencies`
Closes#12003 , closes#15764 and closes#13237
Version 10.13.0 was the first version of 10.x that was considered LTS. This also provides an improved performance baseline as well as access to newer Node.js APIs and Javascript language features which the Angular CLI will now be able to leverage.
* feat(@angular-devkit/core): update schema to support new i18n options
"projects": {
"my-app": {
"projectType": "application",
"schematics": {},
"root": "",
"i18n": {
"sourceLocale": "en-US",
"locales": {
"fr": "src/locale/messages.fr.xlf"
}
},
"sourceRoot": "src",
...
}
}
* feat(@angular-devkit/build-angular): add new i18n options to browser and server builders
With this change we add `translateLocales` as new options for i18n in browser and server builders.
We also deprecate the following options;
* i18nLocale
* i18nFormat
* i18nFile
* feat(@angular-devkit/build-angular): deprecate `i18nFormat` and `i18nLocale` options of `extract-i18n` builder
Option `i18nFormat` has been deprecated in favor of `format` and `i18nLocale` option has been deprecated in favor of the `sourceLocale` sub option of the `i18n` project level option.
* feat(@angular/cli): add alias of `i18n-extract` for `x18n` command
* refactor: rename `translateLocales` to `localize`