483 Commits

Author SHA1 Message Date
Alan Agius
08c3959ee4 fix(@angular/cli): remove no-bin-links during npm/yarn install
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
2019-11-11 16:52:46 -08:00
Renovate Bot
150d0f6d6e build: update npm-pick-manifest to version 4.0.0 2019-11-11 16:52:36 -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
Renovate Bot
febc35c211 build: update npm-package-arg to version 7.0.0 2019-11-11 09:14:05 -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
Charles
b8257e276e fix(@angular/cli): re-introduce install package using shell spawn (#16112)
This works around a Windows CI failure that related to the PATH environment variable and a failure to located the `npm` command.
2019-11-08 07:54:47 -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
Alan Agius
f35b80ebaf fix(@angular/cli): use spawned process error when it's available
In some cases when an error occurs in the spawned process the `error` property will be populated instead of `stderr` or `stdout`.

See: https://nodejs.org/api/child_process.html#child_process_child_process_spawnsync_command_args_options
2019-11-07 10:07:10 -08:00
Alan Agius
e8135babd4 refactor: update pacote to version 10 2019-11-06 10:51:35 -08:00
Alan Agius
c5ab958eb3 fix(@angular/cli): handle null stderr during npm install 2019-11-06 10:50:47 -08:00
Charles Lyding
84ba5d55f0 fix(@angular/cli): only show add/update package install output on errors
Closes #16014
Closes #16027
2019-11-05 16:30:14 -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
Charles Lyding
e7bf105214 fix(@angular/cli): skip project analytics prompt when using update
The prompt will cause the workspace configuration file to be updated which can result in an unclean repository.

Fixes #16012
2019-11-04 13:25:13 -08:00
Alan Agius
8820093b7f fix(@angular/cli): don't install using global command but rather install in a different folder
Fixes: #16010
2019-11-04 13:24:57 -08:00
Kayla Altepeter
3100182ab1 fix(@angular/cli): change analytics type to boolean or string 2019-11-04 13:24:15 -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
Alan Agius
548617ca4c fix(@angular/cli): updated CLI should not have analytics enabled
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.
2019-10-29 20:21:51 -07:00
Charles Lyding
5df776780d fix(@angular-devkit/schematics): use NodeWorkflow root to resolve collections 2019-10-28 17:48:08 -07:00
Eusen
31a35ae060 fix(@angular/cli): scoped project names
change projects.patternProperties to npm.name.pattern

Closes #14797
2019-10-28 10:05:43 -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
936a9512ae refactor(@angular-devkit/build-angular): move around i18n methods to make them re-usable 2019-10-25 09:52:56 -07:00
Alan Agius
e31d5d89b7 build: update bazel packages 2019-10-24 12:05:25 -07:00
Alan Agius
70e460d656 refactor: use require.resolve instead of custom resolve (#15906) 2019-10-23 09:59:36 -07:00
Noopur
e7bc27056d docs: corrected spelling of Globally under Installation section (#15905) 2019-10-23 09:58:51 -07:00
Alan Agius
e92c46a3cf refactor(@schematics/angular): remove deprecated spec and styleext options
BREAKING CHANGE:

Deprecated `styleext` and `spec` options have been removed.  Use `style` and `skipTests` options instead.
2019-10-22 13:27:08 -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
Renovate Bot
1c5e3586ca build: update open to version 7.0.0 2019-10-21 13:03:55 -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
Filipe Silva
65c2a1965f feat(@angular/cli): support using multiple configurations
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
2019-10-14 13:40:48 -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
Charles
33e9039219 build: set minimum Node.js version to 10.13 (#15756)
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.
2019-10-10 12:39:28 -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
825b4bb139 build: update BUILD files for g3 sync
Removing @typings allows us to use a single transform rule: @node_module
2019-10-07 11:27:35 -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
7e1e8adf7a feat(@angular/cli): allow subclass to override default collection name
This PR provides a way for subclass that extends `SchematicCommand` to
provide a different default collection name.
This is needed in g3 where the collection name is different from
external.
2019-10-03 14:42:20 -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
225ff385ac fix(@angular/cli): do not warn on multiple array option use
Fixes #15630
2019-09-19 14:42:52 -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 Lyding
9deaf87754 fix(@angular/cli): add browser builder index option longhand form to schema 2019-09-19 14:39:51 -07:00
Charles
ace02f6c2a feat(@angular/cli): create commits per migration during update (#15611) 2019-09-17 08:35:18 -07:00
Charles
a1487b3e9e feat(@angular/cli): check/prompt for workspace level analytics configuration (#14264) 2019-09-12 11:45:59 -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