Compare commits
3 Commits
creating-l
...
5.0.0-rc.5
Author | SHA1 | Date | |
---|---|---|---|
f1108fea76 | |||
64b3e3e41a | |||
a82f863e24 |
10
CHANGELOG.md
10
CHANGELOG.md
@ -1,3 +1,13 @@
|
|||||||
|
<a name="5.0.0-rc.5"></a>
|
||||||
|
# [5.0.0-rc.5](https://github.com/angular/angular/compare/5.0.0-rc.4...5.0.0-rc.5) (2017-10-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **compiler-cli:** report all diagnostic error messages ([#19886](https://github.com/angular/angular/issues/19886)) ([a82f863](https://github.com/angular/angular/commit/a82f863))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a name="5.0.0-rc.4"></a>
|
<a name="5.0.0-rc.4"></a>
|
||||||
# [5.0.0-rc.4](https://github.com/angular/angular/compare/5.0.0-rc.3...5.0.0-rc.4) (2017-10-24)
|
# [5.0.0-rc.4](https://github.com/angular/angular/compare/5.0.0-rc.3...5.0.0-rc.4) (2017-10-24)
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "angular-srcs",
|
"name": "angular-srcs",
|
||||||
"version": "5.0.0-rc.4",
|
"version": "5.0.0-rc.5",
|
||||||
"private": true,
|
"private": true,
|
||||||
"branchPattern": "2.0.*",
|
"branchPattern": "2.0.*",
|
||||||
"description": "Angular - a web framework for modern web apps",
|
"description": "Angular - a web framework for modern web apps",
|
||||||
|
@ -510,21 +510,25 @@ class AngularCompilerProgram implements Program {
|
|||||||
if (isSyntaxError(e)) {
|
if (isSyntaxError(e)) {
|
||||||
const parserErrors = getParseErrors(e);
|
const parserErrors = getParseErrors(e);
|
||||||
if (parserErrors && parserErrors.length) {
|
if (parserErrors && parserErrors.length) {
|
||||||
this._structuralDiagnostics =
|
this._structuralDiagnostics = [
|
||||||
parserErrors.map<Diagnostic>(e => ({
|
...(this._structuralDiagnostics || []),
|
||||||
messageText: e.contextualMessage(),
|
...parserErrors.map<Diagnostic>(e => ({
|
||||||
category: ts.DiagnosticCategory.Error,
|
messageText: e.contextualMessage(),
|
||||||
span: e.span,
|
category: ts.DiagnosticCategory.Error,
|
||||||
source: SOURCE,
|
span: e.span,
|
||||||
code: DEFAULT_ERROR_CODE
|
source: SOURCE,
|
||||||
}));
|
code: DEFAULT_ERROR_CODE
|
||||||
|
}))
|
||||||
|
];
|
||||||
} else {
|
} else {
|
||||||
this._structuralDiagnostics = [{
|
this._structuralDiagnostics = [
|
||||||
messageText: e.message,
|
...(this._structuralDiagnostics || []), {
|
||||||
category: ts.DiagnosticCategory.Error,
|
messageText: e.message,
|
||||||
source: SOURCE,
|
category: ts.DiagnosticCategory.Error,
|
||||||
code: DEFAULT_ERROR_CODE
|
source: SOURCE,
|
||||||
}];
|
code: DEFAULT_ERROR_CODE
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -1391,5 +1391,44 @@ describe('ngc transformer command-line', () => {
|
|||||||
main(['-p', path.join(basePath, 'src/tsconfig.json')], message => messages.push(message));
|
main(['-p', path.join(basePath, 'src/tsconfig.json')], message => messages.push(message));
|
||||||
expect(exitCode).toBe(0, 'Compile failed unexpectedly.\n ' + messages.join('\n '));
|
expect(exitCode).toBe(0, 'Compile failed unexpectedly.\n ' + messages.join('\n '));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should emit all structural errors', () => {
|
||||||
|
write('src/tsconfig.json', `{
|
||||||
|
"extends": "../tsconfig-base.json",
|
||||||
|
"files": ["test-module.ts"]
|
||||||
|
}`);
|
||||||
|
write('src/lib/indirect2.ts', `
|
||||||
|
declare var f: any;
|
||||||
|
export const t2 = f\`<p>hello</p>\`;
|
||||||
|
`);
|
||||||
|
write('src/lib/indirect1.ts', `
|
||||||
|
import {t2} from './indirect2';
|
||||||
|
export const t1 = t2 + ' ';
|
||||||
|
`);
|
||||||
|
write('src/lib/test.component.ts', `
|
||||||
|
import {Component} from '@angular/core';
|
||||||
|
import {t1} from './indirect1';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
template: t1
|
||||||
|
})
|
||||||
|
export class TestComponent {}
|
||||||
|
`);
|
||||||
|
write('src/test-module.ts', `
|
||||||
|
import {NgModule} from '@angular/core';
|
||||||
|
import {TestComponent} from './lib/test.component';
|
||||||
|
|
||||||
|
@NgModule({declarations: [TestComponent]})
|
||||||
|
export class TestModule {}
|
||||||
|
`);
|
||||||
|
const messages: string[] = [];
|
||||||
|
const exitCode =
|
||||||
|
main(['-p', path.join(basePath, 'src/tsconfig.json')], message => messages.push(message));
|
||||||
|
expect(exitCode).toBe(1, 'Compile was expected to fail');
|
||||||
|
expect(messages).toEqual([
|
||||||
|
'Error: Error: Error encountered resolving symbol values statically. Tagged template expressions are not supported in metadata (position 3:27 in the original .ts file)\n' +
|
||||||
|
'Error: No template specified for component TestComponent\n'
|
||||||
|
]);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user