Skip to content

Commit e08c051

Browse files
Merge pull request #186 from angular/master
regression in 3.1+: mapped type cannot be used to index type
2 parents 0623f4f + 8150838 commit e08c051

File tree

82 files changed

+795
-732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+795
-732
lines changed

.monorepo.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545
"version": "0.9.0-beta.4",
4646
"hash": "a9b1f213a4069f789d20021bda616775"
4747
},
48+
"@_/builders": {
49+
"version": "0.9.0-beta.4",
50+
"hash": ""
51+
},
4852
"devkit": {
4953
"version": "0.9.0-beta.4",
5054
"hash": "30ac66398ef7b4f7a5dbd3192d24c665"

etc/cli.angular.io/cli-logo.svg

Lines changed: 0 additions & 326 deletions
This file was deleted.

etc/cli.angular.io/index.html

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<!-- Material Design icons -->
1212
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
1313
<link href='https://fonts.googleapis.com/css?family=Roboto:400,300,500,700' rel='stylesheet' type='text/css'>
14+
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:300" rel="stylesheet">
1415
<link rel="stylesheet" href="material.min.css">
1516
<link rel="stylesheet" href="main.css">
1617
<link rel="stylesheet" href="theme.css">
@@ -31,11 +32,11 @@
3132
<div class="top-nav-wrapper">
3233
<label for="site-nav-checkbox">SITE MENU</label>
3334
<nav class="mdl-navigation">
34-
35+
3536
<a class="mdl-navigation__link" href="https://github.com/angular/angular-cli/wiki">Documentation</a>
36-
37+
3738
<a class="mdl-navigation__link" href="https://github.com/angular/angular-cli">GitHub</a>
38-
39+
3940
</nav>
4041
<div class="mdl-layout-spacer"></div>
4142
<nav class="mdl-navigation">
@@ -54,7 +55,19 @@
5455
<header class="hero-background">
5556
<section class="hero-container section--center mdl-grid mdl-grid--no-spacing">
5657
<div class="logo-container mdl-cell mdl-cell--6-col-desktop mdl-cell--12-col-tablet mdl-cell--12-col-phone">
57-
<img class="hero-image" src="cli-logo.svg" alt="Mobile Toolkit">
58+
<div class="console mdl-shadow--4dp">
59+
<div class="console__head">
60+
<div class="console__dot console__dot--red"></div>
61+
<div class="console__dot console__dot--yellow"></div>
62+
<div class="console__dot console__dot--green"></div>
63+
</div>
64+
<div class="console__body">
65+
<kbd class="console__prompt">npm install -g @angular/cli</kbd>
66+
<kbd class="console__prompt">ng new my-dream-app</kbd>
67+
<kbd class="console__prompt">cd my-dream-app</kbd>
68+
<kbd class="console__prompt">ng serve</kbd>
69+
</div>
70+
</div>
5871
</div>
5972
<div class="mdl-cell mdl-cell--6-col-desktop mdl-cell--12-col-tablet mdl-cell--12-col-phone">
6073
<h4 class="">Angular CLI</h4>
@@ -71,27 +84,27 @@ <h5 class="tagline">A command line interface for Angular</h5>
7184

7285
<!-- Add as many features as needed -->
7386
<section class="features-container section--center mdl-grid mdl-grid--no-spacing">
74-
87+
7588
<div class="features-list">
7689
<h4>ng new</h4>
7790
<p>The Angular CLI makes it easy to create an application that already works, right out of the box. It already follows our best practices!</p>
7891
</div>
79-
92+
8093
<div class="features-list">
8194
<h4>ng generate</h4>
8295
<p>Generate components, routes, services and pipes with a simple command. The CLI will also create simple test shells for all of these.</p>
8396
</div>
84-
97+
8598
<div class="features-list">
8699
<h4>ng serve</h4>
87100
<p>Easily test your app locally while developing.</p>
88101
</div>
89-
102+
90103
<div class="features-list">
91104
<h4>Test, Lint, Format</h4>
92105
<p>Make your code really shine. Run your unittests or your end-to-end tests with the breeze of a command. Execute the official Angular linter and run clang format.</p>
93106
</div>
94-
107+
95108

96109
<div class="button-container mdl-cell mdl-cell--12-col-desktop center">
97110
<a href="https://github.com/angular/angular-cli/wiki" class="cta-button mdl-typography--font-regular mdl-button mdl-button--raised mdl-button--accent">

etc/cli.angular.io/main.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

etc/cli.angular.io/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,17 @@
5151
"url": "https://github.com/angular/angular-cli/issues"
5252
},
5353
"homepage": "https://github.com/angular/angular-cli",
54-
"workspaces": [
55-
"packages/angular/*",
56-
"packages/angular_devkit/*",
57-
"packages/ngtools/*",
58-
"packages/schematics/*"
59-
],
54+
"workspaces": {
55+
"packages": [
56+
"packages/angular/*",
57+
"packages/angular_devkit/*",
58+
"packages/ngtools/*",
59+
"packages/schematics/*"
60+
],
61+
"nohoist": [
62+
"@angular/compiler-cli"
63+
]
64+
},
6065
"dependencies": {
6166
"glob": "^7.0.3",
6267
"node-fetch": "^2.2.0",
@@ -66,6 +71,8 @@
6671
"typescript": "~3.0.1"
6772
},
6873
"devDependencies": {
74+
"@angular/compiler": "^7.0.0-beta.4",
75+
"@angular/compiler-cli": "^7.0.0-beta.4",
6976
"@bazel/typescript": "0.16.1",
7077
"@ngtools/json-schema": "^1.1.0",
7178
"@types/copy-webpack-plugin": "^4.4.1",
@@ -80,9 +87,9 @@
8087
"@types/request": "^2.47.1",
8188
"@types/semver": "^5.5.0",
8289
"@types/source-map": "0.5.2",
83-
"@types/webpack": "^4.4.0",
84-
"@types/webpack-dev-server": "^2.9.4",
85-
"@types/webpack-sources": "^0.1.4",
90+
"@types/webpack": "^4.4.11",
91+
"@types/webpack-dev-server": "^3.1.0",
92+
"@types/webpack-sources": "^0.1.5",
8693
"common-tags": "^1.8.0",
8794
"conventional-changelog": "^1.1.0",
8895
"conventional-commits-parser": "^3.0.0",
@@ -95,7 +102,7 @@
95102
"license-checker": "^20.1.0",
96103
"minimatch": "^3.0.4",
97104
"minimist": "^1.2.0",
98-
"rxjs": "~6.2.0",
105+
"rxjs": "~6.3.0",
99106
"semver": "^5.3.0",
100107
"source-map": "^0.5.6",
101108
"source-map-support": "^0.5.0",
@@ -105,10 +112,5 @@
105112
"ts-node": "^5.0.0",
106113
"tslint-no-circular-imports": "^0.5.0",
107114
"tslint-sonarts": "^1.7.0"
108-
},
109-
"resolutions": {
110-
"@types/webpack": "4.4.0",
111-
"@types/webpack-dev-server": "2.9.4",
112-
"rxjs": "~6.2.0"
113115
}
114116
}

packages/_/builders/builders.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"$schema": "../architect/src/builders-schema.json",
3+
"builders": {
4+
"true": {
5+
"class": "./src/true",
6+
"schema": "./src/noop-schema.json",
7+
"description": "Always succeed."
8+
}
9+
}
10+
}

packages/_/builders/package.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"name": "@_/builders",
3+
"version": "0.0.0",
4+
"description": "CLI tool for Angular",
5+
"main": "src/index.js",
6+
"typings": "src/index.d.ts",
7+
"builders": "builders.json",
8+
"private": true,
9+
"dependencies": {
10+
"rxjs": "6.3.3"
11+
}
12+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"$schema": "http://json-schema.org/schema",
3+
"type": "object"
4+
}

packages/_/builders/src/true.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/**
2+
* @license
3+
* Copyright Google Inc. All Rights Reserved.
4+
*
5+
* Use of this source code is governed by an MIT-style license that can be
6+
* found in the LICENSE file at https://angular.io/license
7+
*/
8+
import { Observable, of } from 'rxjs';
9+
10+
export class TrueBuilder {
11+
constructor() {}
12+
13+
run(): Observable<{ success: boolean }> {
14+
return of({
15+
success: true,
16+
});
17+
}
18+
}
19+
20+
export default TrueBuilder;

packages/angular/cli/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,26 @@ with NPM 5.5.1 or higher.
4242
## Installation
4343

4444
**BEFORE YOU INSTALL:** please read the [prerequisites](#prerequisites)
45+
46+
### Install Globablly
4547
```bash
4648
npm install -g @angular/cli
4749
```
4850

51+
### Install Locally
52+
```bash
53+
npm install @angular/cli
54+
```
55+
56+
To run a locally installed version of the angular-cli, you can call `ng` commands directly by adding the `.bin` folder within your local `node_modules` folder to your PATH. The `node_modules` and `.bin` folders are created in the directory where `npm install @angular/cli` was run upon completion of the install command.
57+
58+
Alternatively, you can install [npx](https://www.npmjs.com/package/npx) and run `npx ng <command>` within the local directory where `npm install @angular/cli` was run, which will use the locally installed angular-cli.
59+
60+
### Install Specific Version (Example: 6.1.1)
61+
```bash
62+
npm install -g @angular/[email protected]
63+
```
64+
4965
## Usage
5066

5167
```bash

packages/angular/cli/commands/definitions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
"type": "boolean",
5555
"default": "true",
5656
"description": "Disables interactive inputs (i.e., prompts)."
57+
},
58+
"defaults": {
59+
"type": "boolean",
60+
"default": "false",
61+
"description": "Disables interactive inputs (i.e., prompts) for options with a default."
5762
}
5863
}
5964
}

packages/angular/cli/commands/lint-impl.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Use of this source code is governed by an MIT-style license that can be
66
* found in the LICENSE file at https://angular.io/license
77
*/
8-
8+
import { TargetSpecifier } from '@angular-devkit/architect';
99
import { ArchitectCommand, ArchitectCommandOptions } from '../models/architect-command';
1010
import { Arguments } from '../models/interface';
1111
import { Schema as LintCommandSchema } from './lint';
@@ -14,6 +14,12 @@ export class LintCommand extends ArchitectCommand<LintCommandSchema> {
1414
public readonly target = 'lint';
1515
public readonly multiTarget = true;
1616

17+
protected async runSingleTarget(targetSpec: TargetSpecifier, options: string[]) {
18+
this.logger.info(`Linting ${JSON.stringify(targetSpec.project)}...`);
19+
20+
return super.runSingleTarget(targetSpec, options);
21+
}
22+
1723
public async run(options: ArchitectCommandOptions & Arguments) {
1824
return this.runArchitectTarget(options);
1925
}

packages/angular/cli/lib/config/schema.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@
141141
},
142142
"viewEncapsulation": {
143143
"description": "Specifies the view encapsulation strategy.",
144-
"enum": ["Emulated", "Native", "None"],
144+
"enum": ["Emulated", "Native", "None", "ShadowDom"],
145145
"type": "string",
146146
"alias": "v"
147147
}
@@ -1101,6 +1101,11 @@
11011101
"type": "string",
11021102
"description": "Specifies the source language of the application."
11031103
},
1104+
"progress": {
1105+
"type": "boolean",
1106+
"description": "Log progress to the console.",
1107+
"default": true
1108+
},
11041109
"outputPath": {
11051110
"type": "string",
11061111
"description": "Path where output will be placed."

0 commit comments

Comments
 (0)