256 Commits

Author SHA1 Message Date
Charles Lyding
f4127b5b43 fix(@angular/cli): fully use add command registry option when installing packages
Fixes: #16766
2020-02-10 16:02:05 -08:00
John Papa
5f3ff00dd8 fix(@angular/cli): added clarity on angular cli version issues
fixes #16888
2020-02-10 16:01:49 -08:00
George Kalpakas
1beb582050 fix(@angular/cli): fix the URL for doc search
In #16846, the URL for docs search was updated to point to the
corresponding vX.angular.io website (with an appropriate query for the
search). However, on the archive versions of the website (i.e. versions
older than the current stable), non-docs pages (including the home page)
are redirected to `/docs` (losing the query params).

This commit fixes the URL to include `/docs`, so that it is not
redirected (and preserve the query params that will trigger the search).
2020-02-07 08:28:56 -08:00
Santosh Yadav
688db35589 fix(@angular/cli): change the url for doc search
Fixes #16840
2020-02-06 09:09:11 -08:00
Charles
835100c908 refactor(@angular/cli): allow update version check to be disabled (#16543)
This allows the CLI version check during update bootstrapping to be disabled via the `NG_DISABLE_VERSION_CHECK` environment variable.  This is not considered an officially supported option and is intended mainly for testing/troubleshooting scenarios.
2020-01-04 11:13:53 -08:00
Alan Agius
23589ed00e fix(@angular/cli): inform user and error if schematics package is in unreachable location (#16466)
This is a workaround for the schematics runtime to support the requirement of packages containing migrations (or other schematics) to not have a direct/runtime dependency on the schematics package.

Closes: #16392
2020-01-02 11:27:04 -08:00
Charles
d9d233e39a fix(@angular/cli): inform user and error if schematics package is in unreachable location (#16466)
This is a workaround for the schematics runtime to support the requirement of packages containing migrations (or other schematics) to not have a direct/runtime dependency on the schematics package.

Closes: #16392
2019-12-20 16:34:05 -08:00
Wataru.Kasahara
b6863b6a30 fix(@angular/cli): remove alias for deploy command 2019-12-05 18:57:02 -08:00
Alan Agius
35ca3901ac refactor: strip leading slash to prevent confusion 2019-12-02 10:10:34 -08:00
Alan Agius
4bc0ec39b1 fix(@angular/cli): ng version should report if ivy is enabled
Closes: #14491
2019-11-27 13:41:57 -08:00
Alan Agius
0ee5f2fdb9 fix(@angular/cli): support running a single migration from a package 2019-11-15 10:43:07 -08:00
Doug Parker
823c6589ae fix(@angular/cli): Renames final message to "Migration completed". (#16016)
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.
2019-11-13 11:11:14 -08:00
Alan Agius
a6f3d14c08 fix(@angular/cli): clarify ng update outdated message 2019-11-12 11:46:07 -08:00
Doug Parker
208a7008b0 fix(@angular/cli): Prints out when a commit is made in ng update.
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.
2019-11-11 16:51:44 -08:00
Alan Agius
524bff6f43 fix(@angular/cli): add link to update guide post running Angular migrations 2019-11-09 11:52:42 -08:00
Alan Agius
bd840b2ea5 fix(@schematics/angular): improve cli migration name and description (#16093) 2019-11-07 16:41:56 -08:00
Charles Lyding
7735516949 fix(@angular/cli): disable update commit creation by default
Closes #16013
2019-11-07 11:32:52 -08:00
Charles Lyding
6f3d162e41 fix(@angular/cli): remove unneeded git HEAD update message
Closes #16031
2019-11-05 16:29:19 -08:00
Alan Agius
2d66fecee8 fix(@angular/cli): add migration name to commit header
Closes: #16030
2019-11-04 13:27:48 -08:00
Charles Lyding
98bc458480 fix(@angular/cli): pass next option to all update logic
Fixes #16015
2019-11-04 13:27:17 -08:00
Charles Lyding
3f57956c32 fix(@angular/cli): verify package specifier when adding a package
Fixes #16029
2019-11-04 13:26:07 -08:00
Alan Agius
1c855b2365 style(@angular/cli): fix alignment of messages
Before
```
>  NGCC postinstall migration.
   Adds an ngcc invocation to npm/yarn's postinstall script.
   Read more about this here: https://v9.angular.io/guide/migration-ngcc
UPDATE package.json (1490 bytes)
√ Packages installed successfully.
√  Migration succeeded.
```

After
```

> NGCC postinstall migration.
  Adds an ngcc invocation to npm/yarn's postinstall script.
  Read more about this here: https://v9.angular.io/guide/migration-ngcc
UPDATE package.json (1490 bytes)
√ Packages installed successfully.
√ Migration succeeded.

```
2019-11-04 13:23:24 -08:00
Alan Agius
94b48d734f fix(@angular/cli): improve statues and description logs during update
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)
2019-10-30 13:38:53 -07:00
Charles Lyding
5df776780d fix(@angular-devkit/schematics): use NodeWorkflow root to resolve collections 2019-10-28 17:48:08 -07:00
Charles Lyding
dfc3b74665 fix(@angular/cli): return success in update execute migrations function 2019-10-27 12:08:53 -07:00
Charles Lyding
d4dc16fa28 fix(@angular/cli): support prerelease CLI versions when bootstrapping update 2019-10-27 12:08:53 -07:00
Alan Agius
70e460d656 refactor: use require.resolve instead of custom resolve (#15906) 2019-10-23 09:59:36 -07:00
Judy Bogart
98e0ca4542 docs: include major-verson update advice 2019-10-22 13:25:42 -07:00
Alan Agius
b0dcfd08a0 fix(@angular/cli): logic to determine if the installed CLI is out of date
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.
2019-10-22 13:13:54 -07:00
Tom Sullivan
6c6ae08ec7 fix(@angular/cli): Determine relative paths correctly
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.
2019-10-17 14:14:07 -07:00
Alan Agius
cf349433ab fix(@angular/cli): ng update log messages printed twice
After the logs are printing to console clean the logs queue.

Fixes #15839
2019-10-15 11:23:16 -07:00
Alan Agius
d133ba68c0 feat(@angular/cli): add support for ng-add packages that should not be saved as dependencies
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
2019-10-14 13:40:31 -07:00
Alan Agius
c3169ae7d2 New i18n schema (#15760)
* 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`
2019-10-10 12:39:00 -07:00
Keen Yee Liau
ebc92c2125 refactor(@angular/cli): Simplify retrival of collection name 2019-10-03 14:42:35 -07:00
Keen Yee Liau
0662a8d774 build: g3 sync for packages/schematics and packages/angular
Fix all build errors in g3
2019-10-03 14:29:07 -07:00
Charles Lyding
0abeadbc10 refactor(@angular/cli): use canonical npm logic to determine update package version 2019-09-19 14:41:04 -07:00
Charles
ace02f6c2a feat(@angular/cli): create commits per migration during update (#15611) 2019-09-17 08:35:18 -07:00
Charles Lyding
2565077dbe fix(@angular/cli): correctly account for linked packages in update
Fixes #15511
Fixes #15294
2019-09-11 10:10:48 -07:00
Alan Agius
26dd51221a style: collapse if statements (#15449) 2019-08-27 10:25:14 -07:00
Charles
891fe527d7 feat(@angular/cli): update with migrate only creates commit per migration (#15414)
* feat(@angular/cli): update with migrate only creates commit per migration

* refactor(@angular/cli): simplify update command schematic execution
2019-08-26 11:48:43 -07:00
Judy Bogart
fe3d597c0e Add deploy command doc (#15402)
* docs: add deploy command doc

* docs: fix json example

* docs: add link to cli builder doc

* docs: remove link

* docs: restore link
2019-08-22 10:14:38 -07:00
Judy Bogart
08d7d0298c docs: remove app from app project 2019-08-21 15:21:49 -07:00
Judy Bogart
3c69e34b2f docs: ng add configures project in cwd 2019-08-21 15:21:49 -07:00
Charles Lyding
b630317b4b refactor(@angular/cli): convert workspace access to async
This is in preparation for conversion from the experimental workspace API to the stable workspace API.
2019-08-16 09:32:04 -07:00
mgechev
5df50bacbe feat(@angular/cli): implement deploy command 2019-07-30 21:07:50 -07:00
Judy Bogart
b5924febb2 Document possible values of analytics command (#15039)
* docs: add possible values to ref doc for analytics command

* docs: add ci value
2019-07-15 16:31:08 -07:00
Alan
3d1d225dd2 fix(@angular/cli): add verbose option to update and add
At the moment there is no way to turn on the verbose logging for `ng update` and `ng add`. This is useful for use so that when users report issues such as npmrc is not read we can see the lookup locations.

This also removes some reduncant that were being provided in `executeSchematic`.

Related to https://github.com/angular/angular-cli/issues/14993
2019-07-10 04:15:05 +08:00
Alan
70a4cbe306 style: enable no-debugger and no-console tslint rules 2019-06-27 09:28:35 -07:00
cexbrayat
3e95474d1f feat(@angular/cli): ng doc uses angular core version by default
Follow-up to #14788 that allowed `ng doc --version 6`.
This commit enhances the doc command to use the current Angular version of the project by default, if no version is provided explicitely.

Fixes #12365
2019-06-27 09:18:32 -07:00
cexbrayat
371bd6194a fix(@angular/cli): validate version in doc command
As the JSON Schema validation is minimum in the CLI, we have to also validate in code.
This PR:
- updates the JSON Schema to use `number` and `enum` instead of `integer` and `const` that are not supported.
- adds validation in the doc command implementation
- adds error reporting if the version is not valid
- fixes a typo in an error message in the parser
2019-06-24 17:30:44 -07:00