Skip to content

Commit ee1d0c8

Browse files
authored
Merge branch 'master' into fix/check-for-old-cli-version
2 parents 6539314 + 93da512 commit ee1d0c8

File tree

8 files changed

+50
-20
lines changed

8 files changed

+50
-20
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
<a name="1.0.0-beta.15"></a>
2+
# [1.0.0-beta.15](https://github.com/angular/angular-cli/compare/v1.0.0-beta.14...v1.0.0-beta.15) (2016-09-20)
3+
4+
5+
### Bug Fixes
6+
7+
* **help:** fix a bug where help was not available inside a project. ([#2146](https://github.com/angular/angular-cli/issues/2146)) ([5b880b2](https://github.com/angular/angular-cli/commit/5b880b2))
8+
* pin beta package versions ([#2236](https://github.com/angular/angular-cli/issues/2236)) ([638a54b](https://github.com/angular/angular-cli/commit/638a54b)), closes [#2234](https://github.com/angular/angular-cli/issues/2234)
9+
10+
11+
112
<a name="1.0.0-beta.14"></a>
213
# [1.0.0-beta.14](https://github.com/angular/angular-cli/compare/v1.0.0-beta.11-webpack.2...v1.0.0-beta.14) (2016-09-15)
314

package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-cli",
3-
"version": "1.0.0-beta.14",
3+
"version": "1.0.0-beta.15",
44
"description": "CLI tool for Angular",
55
"main": "packages/angular-cli/lib/cli/index.js",
66
"trackingCode": "UA-8594346-19",
@@ -91,7 +91,7 @@
9191
"remap-istanbul": "^0.6.4",
9292
"resolve": "^1.1.7",
9393
"rimraf": "^2.5.3",
94-
"rxjs": "^5.0.0-beta.12",
94+
"rxjs": "5.0.0-beta.12",
9595
"sass-loader": "^3.2.0",
9696
"script-loader": "^0.7.0",
9797
"shelljs": "^0.7.0",
@@ -109,8 +109,8 @@
109109
"typedoc": "^0.4.2",
110110
"typescript": "2.0.2",
111111
"url-loader": "^0.5.7",
112-
"webpack": "^2.1.0-beta.22",
113-
"webpack-dev-server": "^2.1.0-beta.3",
112+
"webpack": "2.1.0-beta.22",
113+
"webpack-dev-server": "2.1.0-beta.3",
114114
"webpack-md5-hash": "0.0.5",
115115
"webpack-merge": "^0.14.0",
116116
"zone.js": "^0.6.23"

packages/angular-cli/blueprints/directive/files/__path__/__name__.directive.spec.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* tslint:disable:no-unused-variable */
22

33
import { TestBed, async } from '@angular/core/testing';
4-
import { <%= classifiedModuleName %> } from './<%= dasherizedModuleName %>.directive';
4+
import { <%= classifiedModuleName %>Directive } from './<%= dasherizedModuleName %>.directive';
55

66
describe('Directive: <%= classifiedModuleName %>', () => {
77
it('should create an instance', () => {

packages/angular-cli/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-cli",
3-
"version": "1.0.0-beta.14",
3+
"version": "1.0.0-beta.15",
44
"description": "CLI tool for Angular",
55
"main": "lib/cli/index.js",
66
"trackingCode": "UA-8594346-19",
@@ -73,7 +73,7 @@
7373
"remap-istanbul": "^0.6.4",
7474
"resolve": "^1.1.7",
7575
"rimraf": "^2.5.3",
76-
"rxjs": "^5.0.0-beta.12",
76+
"rxjs": "5.0.0-beta.12",
7777
"sass-loader": "^3.2.0",
7878
"script-loader": "^0.7.0",
7979
"shelljs": "^0.7.0",
@@ -91,8 +91,8 @@
9191
"typedoc": "^0.4.2",
9292
"typescript": "2.0.2",
9393
"url-loader": "^0.5.7",
94-
"webpack": "^2.1.0-beta.22",
95-
"webpack-dev-server": "^2.1.0-beta.3",
94+
"webpack": "2.1.0-beta.22",
95+
"webpack-dev-server": "2.1.0-beta.3",
9696
"webpack-md5-hash": "0.0.5",
9797
"webpack-merge": "^0.14.0",
9898
"zone.js": "^0.6.23"

packages/angular-cli/plugins/karma.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ const init = (config) => {
1212
const environment = config.angularCli.environment || 'dev';
1313

1414
// add webpack config
15-
config.webpack = getWebpackTestConfig(config.basePath, environment, appConfig);
16-
config.webpackMiddleware = {
15+
const webpackConfig = getWebpackTestConfig(config.basePath, environment, appConfig);
16+
const webpackMiddlewareConfig = {
1717
noInfo: true, // Hide webpack output because its noisy.
1818
stats: { // Also prevent chunk and module display output, cleaner look. Only emit errors.
1919
assets: false,
@@ -25,6 +25,8 @@ const init = (config) => {
2525
chunkModules: false
2626
}
2727
};
28+
config.webpack = Object.assign(webpackConfig, config.webpack);
29+
config.webpackMiddleware = Object.assign(webpackMiddlewareConfig, config.webpackMiddleware);
2830

2931
// replace the angular-cli preprocessor with webpack+sourcemap
3032
Object.keys(config.preprocessors)

packages/ast-tools/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"homepage": "https://github.com/angular/angular-cli",
2222
"dependencies": {
23-
"rxjs": "^5.0.0-beta.11",
23+
"rxjs": "5.0.0-beta.11",
2424
"denodeify": "^1.2.1",
2525
"typescript": "2.0.0"
2626
}

packages/ast-tools/src/route-utils.spec.ts

+22-8
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,20 @@ describe('route utils', () => {
8484
expect(newContent).toEqual(`import { Router } from '@angular/router';\n`);
8585
});
8686
});
87+
it('inserts subcomponent in win32 environment', () => {
88+
let content = './level1\\level2/level2.component';
89+
return nru.insertImport(sourceFile, 'level2', content).apply()
90+
.then(() => readFile(sourceFile, 'utf8'))
91+
.then(newContent => {
92+
if (process.platform.startsWith('win')) {
93+
expect(newContent).toEqual(
94+
`import { level2 } from './level1/level2/level2.component';\n`);
95+
} else {
96+
expect(newContent).toEqual(
97+
`import { level2 } from './level1\\level2/level2.component';\n`);
98+
}
99+
});
100+
});
87101
});
88102

89103
describe('bootstrapItem', () => {
@@ -124,7 +138,7 @@ describe('route utils', () => {
124138
.then(content => {
125139
expect(content).toEqual(
126140
`import routes from './routes';
127-
import { provideRouter } from '@angular/router';
141+
import { provideRouter } from '@angular/router';
128142
bootstrap(AppComponent, [ provideRouter(routes) ]);`);
129143
});
130144
});
@@ -299,7 +313,7 @@ export default [
299313
children: [
300314
{ path: 'about', component: AboutComponent,
301315
children: [
302-
{ path: 'details', component: DetailsComponent },
316+
{ path: 'details', component: DetailsComponent },
303317
{ path: 'more', component: MoreComponent }
304318
]
305319
}
@@ -327,7 +341,7 @@ export default [
327341
children: [
328342
{ path: 'more', component: MoreComponent,
329343
children: [
330-
{ path: 'sections', component: SectionsComponent }
344+
{ path: 'sections', component: SectionsComponent }
331345
]
332346
}
333347
]
@@ -359,7 +373,7 @@ export default [
359373
{ path: 'main', component: MainComponent }
360374
{ path: 'home', component: HomeComponent,
361375
children: [
362-
{ path: 'about/:id', component: AboutComponent_1 },
376+
{ path: 'about/:id', component: AboutComponent_1 },
363377
{ path: 'about', component: AboutComponent }
364378
]
365379
}
@@ -447,7 +461,7 @@ export default [
447461
export default [
448462
{ path: 'home', component: HomeComponent,
449463
children: [
450-
{ path: 'trap-queen', component: TrapQueenComponent },
464+
{ path: 'trap-queen', component: TrapQueenComponent },
451465
{ path: 'about', component: AboutComponent,
452466
children: [
453467
{ path: 'more', component: MoreComponent }
@@ -478,7 +492,7 @@ import { HomeComponent as HomeComponent_1 } from './app/home/home/home.component
478492
export default [
479493
{ path: 'home', component: HomeComponent,
480494
children: [
481-
{ path: 'home', component: HomeComponent_1 }
495+
{ path: 'home', component: HomeComponent_1 }
482496
]
483497
}
484498
];`;
@@ -487,7 +501,7 @@ export default [
487501
});
488502
it('throws error if components collide and there is repitition', () => {
489503
let editedFile = new InsertChange(routesFile, 16,
490-
`\n { path: 'about', component: AboutComponent,
504+
`\n { path: 'about', component: AboutComponent,
491505
children: [
492506
{ path: 'details/:id', component: DetailsComponent_1 },
493507
{ path: 'details', component: DetailsComponent }
@@ -543,7 +557,7 @@ import { DetailsComponent as DetailsComponent_1 } from './app/about/description/
543557
export default [
544558
{ path: 'home', component: HomeComponent,
545559
children: [
546-
{ path: 'more', component: MoreComponent, canDeactivate: [ MyGuard ], useAsDefault: true }
560+
{ path: 'more', component: MoreComponent, canDeactivate: [ MyGuard ], useAsDefault: true }
547561
]
548562
}
549563
];`

packages/ast-tools/src/route-utils.ts

+3
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ export function bootstrapItem(
7979

8080
export function insertImport(fileToEdit: string, symbolName: string,
8181
fileName: string, isDefault = false): Change {
82+
if (process.platform.startsWith('win')) {
83+
fileName = fileName.replace(/\\/g, '/'); // correction in windows
84+
}
8285
let rootNode = getRootNode(fileToEdit);
8386
let allImports = findNodes(rootNode, ts.SyntaxKind.ImportDeclaration);
8487

0 commit comments

Comments
 (0)