build: update npm dependencies
This commit is contained in:
parent
2d5ef15e08
commit
df91fd032d
2
modules/angular1_router/build.js
vendored
2
modules/angular1_router/build.js
vendored
@ -103,6 +103,7 @@ if (require.main === module) {
|
||||
args.shift(); // node
|
||||
args.shift(); // scriptfile.js
|
||||
if (args.length < 2) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log("usage: $0 outFile path/to/modules");
|
||||
process.exit(1);
|
||||
}
|
||||
@ -110,6 +111,7 @@ if (require.main === module) {
|
||||
var directory = args.shift();
|
||||
fs.writeFileSync(outfile, main(directory));
|
||||
} catch (e) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log(e.message);
|
||||
process.exit(1);
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ function $locationHashPrefixProvider($locationProvider) {
|
||||
hashPrefix = prefix;
|
||||
}
|
||||
return hashPrefixFn(prefix);
|
||||
}
|
||||
};
|
||||
|
||||
// Return the final hashPrefix as the value of this service
|
||||
this.$get = function() { return hashPrefix; };
|
||||
@ -110,7 +110,7 @@ function routerFactory($q, $location, $browser, $rootScope, $injector, $routerRo
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
var registry = new RouteRegistry($routerRootComponent);
|
||||
var location = new Location();
|
||||
|
@ -32,11 +32,11 @@ describe('Navigation lifecycle', function () {
|
||||
|
||||
registerComponent('oneCmp', {
|
||||
template: '<div>{{oneCmp.number}}</div>',
|
||||
controller: function () {this.number = 'one'}
|
||||
controller: function () {this.number = 'one';}
|
||||
});
|
||||
registerComponent('twoCmp', {
|
||||
template: '<div><a ng-link="[\'/Two\']">{{twoCmp.number}}</a></div>',
|
||||
controller: function () {this.number = 'two'}
|
||||
controller: function () {this.number = 'two';}
|
||||
});
|
||||
});
|
||||
|
||||
|
@ -37,15 +37,15 @@ describe('navigation', function () {
|
||||
});
|
||||
registerDirective('oneCmp', {
|
||||
template: '<div>{{oneCmp.number}}</div>',
|
||||
controller: function () {this.number = 'one'}
|
||||
controller: function () {this.number = 'one';}
|
||||
});
|
||||
registerDirective('twoCmp', {
|
||||
template: '<div>{{twoCmp.number}}</div>',
|
||||
controller: function () {this.number = 'two'}
|
||||
controller: function () {this.number = 'two';}
|
||||
});
|
||||
registerComponent('threeCmp', {
|
||||
template: '<div>{{$ctrl.number}}</div>',
|
||||
controller: function () {this.number = 'three'}
|
||||
controller: function () {this.number = 'three';}
|
||||
});
|
||||
registerComponent('getParams', {
|
||||
template: '<div>{{$ctrl.params.x}}</div>',
|
||||
@ -54,7 +54,7 @@ describe('navigation', function () {
|
||||
this.params = next.params;
|
||||
};
|
||||
}
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
it('should work in a simple case', function () {
|
||||
@ -331,7 +331,7 @@ describe('navigation', function () {
|
||||
var definition = {
|
||||
template: options.template || '',
|
||||
controller: getController(options),
|
||||
}
|
||||
};
|
||||
applyStaticProperties(definition.controller, options);
|
||||
$compileProvider.component(name, definition);
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ describe('router', function () {
|
||||
expect(homeElement.text()).toBe('Home');
|
||||
expect(homeElement.isolateScope().$ctrl.$router).toBeDefined();
|
||||
expect(router).toBeDefined();
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
it('should work when an async route is provided route data', function() {
|
||||
@ -126,7 +126,7 @@ describe('router', function () {
|
||||
var homeElement = elt.find('home-cmp');
|
||||
expect(homeElement.text()).toBe('Home');
|
||||
expect($routerOnActivate).toHaveBeenCalled();
|
||||
})
|
||||
});
|
||||
});
|
||||
|
||||
it('should provide the current instruction', function() {
|
||||
|
8
modules/angular1_router/test/ng_link_spec.js
vendored
8
modules/angular1_router/test/ng_link_spec.js
vendored
@ -64,7 +64,7 @@ describe('ngLink', function () {
|
||||
|
||||
it('should allow params in routerLink directive', function () {
|
||||
setup({baseHref: baseHref, html5Mode: html5Mode, hashPrefix: hashPrefix});
|
||||
registerComponent('twoLinkCmp', '<div><a ng-link="[\'/Two\', {param: \'lol\'}]">{{twoLinkCmp.number}}</a></div>', function () {this.number = 'two'});
|
||||
registerComponent('twoLinkCmp', '<div><a ng-link="[\'/Two\', {param: \'lol\'}]">{{twoLinkCmp.number}}</a></div>', function () {this.number = 'two';});
|
||||
configureRouter([
|
||||
{ path: '/a', component: 'twoLinkCmp' },
|
||||
{ path: '/b/:param', component: 'twoCmp', name: 'Two' }
|
||||
@ -78,7 +78,7 @@ describe('ngLink', function () {
|
||||
|
||||
it('should update the href of links with bound params', function () {
|
||||
setup({baseHref: baseHref, html5Mode: html5Mode, hashPrefix: hashPrefix});
|
||||
registerComponent('twoLinkCmp', '<div><a ng-link="[\'/Two\', {param: $ctrl.number}]">{{$ctrl.number}}</a></div>', function () {this.number = 43});
|
||||
registerComponent('twoLinkCmp', '<div><a ng-link="[\'/Two\', {param: $ctrl.number}]">{{$ctrl.number}}</a></div>', function () {this.number = 43;});
|
||||
configureRouter([
|
||||
{ path: '/a', component: 'twoLinkCmp' },
|
||||
{ path: '/b/:param', component: 'twoCmp', name: 'Two' }
|
||||
@ -184,8 +184,8 @@ describe('ngLink', function () {
|
||||
$locationProvider.hashPrefix(config.hashPrefix);
|
||||
});
|
||||
registerComponent('userCmp', '<div>hello {{$ctrl.$routeParams.name}}</div>', function () {});
|
||||
registerComponent('oneCmp', '<div>{{$ctrl.number}}</div>', function () {this.number = 'one'});
|
||||
registerComponent('twoCmp', '<div><a ng-link="[\'/Two\']">{{$ctrl.number}}</a></div>', function () {this.number = 'two'});
|
||||
registerComponent('oneCmp', '<div>{{$ctrl.number}}</div>', function () {this.number = 'one';});
|
||||
registerComponent('twoCmp', '<div><a ng-link="[\'/Two\']">{{$ctrl.number}}</a></div>', function () {this.number = 'two';});
|
||||
}
|
||||
|
||||
function configureRouter(routeConfig) {
|
||||
|
@ -83,6 +83,6 @@ function provideHelpers(fn, preInject) {
|
||||
$rootRouter: $rootRouter,
|
||||
put: put,
|
||||
compile: compile
|
||||
})
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -7,7 +7,6 @@
|
||||
*/
|
||||
export {verifyNoBrowserErrors} from './e2e_util';
|
||||
|
||||
const yargs = require('yargs');
|
||||
const nodeUuid = require('node-uuid');
|
||||
import * as fs from 'fs-extra';
|
||||
|
||||
|
@ -25,9 +25,6 @@ describe('Model-Driven Forms', function() {
|
||||
input.sendKeys('invalid');
|
||||
firstName.click();
|
||||
|
||||
// TODO: getInnerHtml has been deprecated by selenium-webdriver in the
|
||||
// upcoming release of 3.0.0. Protractor has removed this method from
|
||||
// ElementFinder but can still be accessed via WebElement.
|
||||
expect(form.getWebElement().getInnerHtml()).toContain('is invalid credit card number');
|
||||
expect(form.getAttribute('innerHTML')).toContain('is invalid credit card number');
|
||||
});
|
||||
});
|
||||
|
@ -25,9 +25,6 @@ describe('Template-Driven Forms', function() {
|
||||
input.sendKeys('invalid');
|
||||
firstName.click();
|
||||
|
||||
// TODO: getInnerHtml has been deprecated by selenium-webdriver in the
|
||||
// upcoming release of 3.0.0. Protractor has removed this method from
|
||||
// ElementFinder but can still be accessed via WebElement.
|
||||
expect(form.getWebElement().getInnerHtml()).toContain('is invalid credit card number');
|
||||
expect(form.getAttribute('innerHTML')).toContain('is invalid credit card number');
|
||||
});
|
||||
});
|
||||
|
@ -43,7 +43,7 @@ class AsyncApplication {
|
||||
multiTimeoutId: any = null;
|
||||
intervalId: any = null;
|
||||
|
||||
increment(): void { this.val1++; };
|
||||
increment(): void { this.val1++; }
|
||||
|
||||
delayedIncrement(): void {
|
||||
this.cancelDelayedIncrement();
|
||||
@ -51,7 +51,7 @@ class AsyncApplication {
|
||||
this.val2++;
|
||||
this.timeoutId = null;
|
||||
}, 2000);
|
||||
};
|
||||
}
|
||||
|
||||
multiDelayedIncrements(i: number): void {
|
||||
this.cancelMultiDelayedIncrements();
|
||||
@ -69,33 +69,33 @@ class AsyncApplication {
|
||||
}, 500);
|
||||
}
|
||||
helper(i);
|
||||
};
|
||||
}
|
||||
|
||||
periodicIncrement(): void {
|
||||
this.cancelPeriodicIncrement();
|
||||
this.intervalId = setInterval(() => this.val4++, 2000);
|
||||
};
|
||||
}
|
||||
|
||||
cancelDelayedIncrement(): void {
|
||||
if (this.timeoutId != null) {
|
||||
clearTimeout(this.timeoutId);
|
||||
this.timeoutId = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
cancelMultiDelayedIncrements(): void {
|
||||
if (this.multiTimeoutId != null) {
|
||||
clearTimeout(this.multiTimeoutId);
|
||||
this.multiTimeoutId = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
cancelPeriodicIncrement(): void {
|
||||
if (this.intervalId != null) {
|
||||
clearInterval(this.intervalId);
|
||||
this.intervalId = null;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@NgModule(
|
||||
|
@ -39,4 +39,4 @@ export default {
|
||||
rollupNG2(),
|
||||
nodeResolve({ jsnext: true, main: true }),
|
||||
]
|
||||
}
|
||||
};
|
||||
|
59
package.json
59
package.json
@ -29,43 +29,43 @@
|
||||
"zone.js": "^0.8.12"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"fsevents": "1.0.17"
|
||||
"fsevents": "1.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/angularjs": "1.5.13-alpha",
|
||||
"@types/angularjs": "1.5.14-alpha",
|
||||
"@types/base64-js": "1.2.5",
|
||||
"@types/fs-extra": "0.0.22-alpha",
|
||||
"@types/hammerjs": "2.0.33",
|
||||
"@types/fs-extra": "4.0.2",
|
||||
"@types/hammerjs": "2.0.35",
|
||||
"@types/jasmine": "2.2.22-alpha",
|
||||
"@types/node": "6.0.88",
|
||||
"@types/selenium-webdriver": "2.53.35",
|
||||
"@types/selenium-webdriver": "3.0.7",
|
||||
"@types/systemjs": "0.19.32",
|
||||
"angular": "1.5.0",
|
||||
"angular-animate": "1.5.0",
|
||||
"angular-mocks": "1.5.0",
|
||||
"base64-js": "1.2.0",
|
||||
"bower": "1.7.2",
|
||||
"browserstacktunnel-wrapper": "1.4.2",
|
||||
"base64-js": "1.2.1",
|
||||
"bower": "1.8.2",
|
||||
"browserstacktunnel-wrapper": "2.0.1",
|
||||
"canonical-path": "0.0.2",
|
||||
"chokidar": "1.4.2",
|
||||
"chokidar": "1.7.0",
|
||||
"clang-format": "1.0.41",
|
||||
"cldr": "3.5.2",
|
||||
"conventional-changelog": "1.1.0",
|
||||
"cors": "2.7.1",
|
||||
"cors": "2.8.4",
|
||||
"entities": "1.1.1",
|
||||
"firefox-profile": "0.3.11",
|
||||
"fs-extra": "0.26.3",
|
||||
"glob": "4.5.3",
|
||||
"firefox-profile": "1.0.3",
|
||||
"fs-extra": "4.0.2",
|
||||
"glob": "7.1.2",
|
||||
"gulp": "3.9.1",
|
||||
"gulp-clang-format": "1.0.23",
|
||||
"gulp-connect": "2.3.1",
|
||||
"gulp-connect": "5.0.0",
|
||||
"gulp-conventional-changelog": "1.1.0",
|
||||
"gulp-tslint": "7.0.1",
|
||||
"gulp-tslint": "8.1.2",
|
||||
"hammerjs": "2.0.8",
|
||||
"incremental-dom": "0.4.1",
|
||||
"jasmine": "2.4.1",
|
||||
"jasmine-core": "2.4.1",
|
||||
"jpm": "1.0.0",
|
||||
"jpm": "1.3.1",
|
||||
"karma": "0.13.20",
|
||||
"karma-browserstack-launcher": "0.1.9",
|
||||
"karma-chrome-launcher": "0.2.0",
|
||||
@ -74,32 +74,31 @@
|
||||
"karma-sourcemap-loader": "0.3.6",
|
||||
"madge": "0.5.0",
|
||||
"minimist": "1.2.0",
|
||||
"nan": "2.4.0",
|
||||
"node-uuid": "1.4.8",
|
||||
"parse5": "3.0.1",
|
||||
"parse5": "3.0.2",
|
||||
"protobufjs": "5.0.0",
|
||||
"protractor": "4.0.14",
|
||||
"rewire": "2.5.1",
|
||||
"rho": "0.3.0",
|
||||
"protractor": "5.1.2",
|
||||
"rewire": "2.5.2",
|
||||
"rollup": "0.41.6",
|
||||
"rollup-plugin-commonjs": "5.0.5",
|
||||
"rollup-plugin-node-resolve": "3.0.0",
|
||||
"selenium-webdriver": "2.53.3",
|
||||
"semver": "5.1.0",
|
||||
"selenium-webdriver": "3.5.0",
|
||||
"semver": "5.4.1",
|
||||
"sorcery": "0.10.0",
|
||||
"source-map": "0.5.6",
|
||||
"source-map-support": "0.4.2",
|
||||
"source-map": "0.5.7",
|
||||
"source-map-support": "0.4.18",
|
||||
"systemjs": "0.18.10",
|
||||
"ts-api-guardian": "0.2.2",
|
||||
"tsickle": "0.21.6",
|
||||
"tslint": "4.1.1",
|
||||
"tslint-eslint-rules": "3.1.0",
|
||||
"tslint": "5.7.0",
|
||||
"tslint-eslint-rules": "4.1.1",
|
||||
"typescript": "2.3.2",
|
||||
"universal-analytics": "0.3.10",
|
||||
"vrsource-tslint-rules": "4.0.0",
|
||||
"uglify-js": "2.8.29",
|
||||
"universal-analytics": "0.4.15",
|
||||
"vrsource-tslint-rules": "5.1.1",
|
||||
"webpack": "1.12.9",
|
||||
"xhr2": "0.1.4",
|
||||
"yargs": "3.31.0",
|
||||
"yargs": "9.0.1",
|
||||
"yarn": "1.1.0"
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ class Profiler {
|
||||
function forceGC() {
|
||||
Cu.forceGC();
|
||||
os.notifyObservers(null, 'child-gc-request', null);
|
||||
};
|
||||
}
|
||||
|
||||
const mod = require('sdk/page-mod');
|
||||
const data = require('sdk/self').data;
|
||||
|
@ -28,7 +28,7 @@ exports.getFirefoxProfile = function(extensionPath: string) {
|
||||
|
||||
const firefoxProfile = new FirefoxProfile();
|
||||
firefoxProfile.addExtensions([extensionPath], () => {
|
||||
firefoxProfile.encoded((encodedProfile: any) => {
|
||||
firefoxProfile.encoded((err: any, encodedProfile: string) => {
|
||||
const multiCapabilities = [{browserName: 'firefox', firefox_profile: encodedProfile}];
|
||||
deferred.resolve(multiCapabilities);
|
||||
});
|
||||
|
@ -17,7 +17,7 @@ function assertEventsEqual(actualEvents: any[], expectedEvents: any[]) {
|
||||
expect(actualEvent[key]).toEqual(expectedEvent[key]);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
export function main() {
|
||||
describe('convertPerfProfileToEvents', function() {
|
||||
@ -97,4 +97,4 @@ export function main() {
|
||||
assertEventsEqual(perfEvents, [{ph: 'X', ts: 1, name: 'script'}]);
|
||||
});
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -76,4 +76,4 @@ export default {
|
||||
},
|
||||
banner: banner,
|
||||
plugins: [{resolveId: resolve}, commonjs()]
|
||||
}
|
||||
};
|
||||
|
@ -6,7 +6,6 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
/* tslint:disable:no-console */
|
||||
|
||||
// Must be imported first, because Angular decorators throw on load.
|
||||
import 'reflect-metadata';
|
||||
@ -19,6 +18,7 @@ import {__NGTOOLS_PRIVATE_API_2} from '@angular/compiler-cli';
|
||||
|
||||
const glob = require('glob');
|
||||
|
||||
/* tslint:disable:no-console */
|
||||
/**
|
||||
* Main method.
|
||||
* Standalone program that executes codegen using the ngtools API and tests that files were
|
||||
|
@ -6,7 +6,6 @@
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
/* tslint:disable:no-console */
|
||||
|
||||
// Must be imported first, because Angular decorators throw on load.
|
||||
import 'reflect-metadata';
|
||||
@ -17,6 +16,7 @@ import * as assert from 'assert';
|
||||
import {tsc} from '@angular/tsc-wrapped/src/tsc';
|
||||
import {AngularCompilerOptions, CodeGenerator, CompilerHostContext, NodeCompilerHostContext} from '@angular/compiler-cli';
|
||||
|
||||
/* tslint:disable:no-console */
|
||||
/**
|
||||
* Main method.
|
||||
* Standalone program that executes the real codegen and tests that
|
||||
|
@ -90,7 +90,7 @@ export class CompilerHost implements AotCompilerHost {
|
||||
this.moduleFileNames.set(key, result);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* We want a moduleId that will appear in import statements in the generated code.
|
||||
|
@ -203,9 +203,11 @@ class TypeCheckingHost implements ts.CompilerHost {
|
||||
}
|
||||
|
||||
writeFile: ts.WriteFileCallback =
|
||||
() => { throw new Error('Unexpected write in diagnostic program'); };
|
||||
() => { throw new Error('Unexpected write in diagnostic program'); }
|
||||
|
||||
getCurrentDirectory(): string { return this.host.getCurrentDirectory(); }
|
||||
getCurrentDirectory(): string {
|
||||
return this.host.getCurrentDirectory();
|
||||
}
|
||||
|
||||
getDirectories(path: string): string[] { return this.host.getDirectories(path); }
|
||||
|
||||
|
@ -302,7 +302,6 @@ class _NodeEmitterVisitor implements StatementVisitor, ExpressionVisitor {
|
||||
ts.createConditional(
|
||||
expr.condition.visitExpression(this, null), expr.trueCase.visitExpression(this, null),
|
||||
expr.falseCase !.visitExpression(this, null)));
|
||||
;
|
||||
}
|
||||
|
||||
visitNotExpr(expr: NotExpr): RecordedNode<ts.PrefixUnaryExpression> {
|
||||
|
@ -378,14 +378,15 @@ function createProgramWithStubsHost(
|
||||
}
|
||||
return originalHost.readFile(fileName);
|
||||
}
|
||||
|
||||
getDefaultLibFileName = (options: ts.CompilerOptions) =>
|
||||
originalHost.getDefaultLibFileName(options);
|
||||
originalHost.getDefaultLibFileName(options)
|
||||
getCurrentDirectory = () => originalHost.getCurrentDirectory();
|
||||
getCanonicalFileName = (fileName: string) => originalHost.getCanonicalFileName(fileName);
|
||||
useCaseSensitiveFileNames = () => originalHost.useCaseSensitiveFileNames();
|
||||
getNewLine = () => originalHost.getNewLine();
|
||||
realPath = (p: string) => p;
|
||||
fileExists = (fileName: string) =>
|
||||
this.generatedFiles.has(fileName) || originalHost.fileExists(fileName);
|
||||
this.generatedFiles.has(fileName) || originalHost.fileExists(fileName)
|
||||
};
|
||||
}
|
||||
|
@ -247,7 +247,7 @@ export class AotCompiler {
|
||||
const summaryJson = new GeneratedFile(srcFileUrl, summaryFileName(srcFileUrl), json);
|
||||
if (this._enableSummariesForJit) {
|
||||
return [summaryJson, this._codegenSourceModule(srcFileUrl, forJitOutputCtx)];
|
||||
};
|
||||
}
|
||||
|
||||
return [summaryJson];
|
||||
}
|
||||
|
@ -137,7 +137,7 @@ export class CloneVisitor implements Visitor {
|
||||
|
||||
// Visit all the nodes recursively
|
||||
export class RecurseVisitor implements Visitor {
|
||||
visitText(text: Text, context?: any): any{};
|
||||
visitText(text: Text, context?: any): any {}
|
||||
|
||||
visitContainer(container: Container, context?: any): any {
|
||||
container.children.forEach(child => child.visit(this));
|
||||
@ -151,7 +151,7 @@ export class RecurseVisitor implements Visitor {
|
||||
ph.children.forEach(child => child.visit(this));
|
||||
}
|
||||
|
||||
visitPlaceholder(ph: Placeholder, context?: any): any{};
|
||||
visitPlaceholder(ph: Placeholder, context?: any): any {}
|
||||
|
||||
visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any{};
|
||||
visitIcuPlaceholder(ph: IcuPlaceholder, context?: any): any {}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export class Declaration implements Node {
|
||||
}
|
||||
|
||||
export class Doctype implements Node {
|
||||
constructor(public rootTag: string, public dtd: string){};
|
||||
constructor(public rootTag: string, public dtd: string) {}
|
||||
|
||||
visit(visitor: IVisitor): any { return visitor.visitDoctype(this); }
|
||||
}
|
||||
@ -83,7 +83,7 @@ export class Tag implements Node {
|
||||
|
||||
export class Text implements Node {
|
||||
value: string;
|
||||
constructor(unescapedValue: string) { this.value = _escapeXml(unescapedValue); };
|
||||
constructor(unescapedValue: string) { this.value = _escapeXml(unescapedValue); }
|
||||
|
||||
visit(visitor: IVisitor): any { return visitor.visitText(this); }
|
||||
}
|
||||
|
@ -18,7 +18,7 @@ export class InterpolationConfig {
|
||||
return new InterpolationConfig(markers[0], markers[1]);
|
||||
}
|
||||
|
||||
constructor(public start: string, public end: string){};
|
||||
constructor(public start: string, public end: string) {}
|
||||
}
|
||||
|
||||
export const DEFAULT_INTERPOLATION_CONFIG: InterpolationConfig =
|
||||
|
@ -482,7 +482,7 @@ class SafeSelector {
|
||||
this.index++;
|
||||
return pseudo + replaceBy;
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
restore(content: string): string {
|
||||
return content.replace(/__ph-(\d+)__/g, (ph, index) => this.placeholders[+index]);
|
||||
|
@ -28,12 +28,12 @@ export abstract class SummaryResolver<T> {
|
||||
export class JitSummaryResolver implements SummaryResolver<Type<any>> {
|
||||
private _summaries = new Map<Type<any>, Summary<Type<any>>>();
|
||||
|
||||
isLibraryFile(fileName: string): boolean { return false; };
|
||||
isLibraryFile(fileName: string): boolean { return false; }
|
||||
getLibraryFileName(fileName: string): string|null { return null; }
|
||||
resolveSummary(reference: Type<any>): Summary<Type<any>>|null {
|
||||
return this._summaries.get(reference) || null;
|
||||
};
|
||||
}
|
||||
getSymbolsOf(filePath: string): Type<any>[] { return []; }
|
||||
getImportAs(reference: Type<any>): Type<any> { return reference; }
|
||||
addSummary(summary: Summary<Type<any>>) { this._summaries.set(summary.symbol, summary); };
|
||||
addSummary(summary: Summary<Type<any>>) { this._summaries.set(summary.symbol, summary); }
|
||||
}
|
||||
|
@ -372,10 +372,10 @@ export class MockSummaryResolver implements SummaryResolver<StaticSymbol> {
|
||||
symbol: StaticSymbol,
|
||||
importAs: StaticSymbol
|
||||
}[] = []) {}
|
||||
addSummary(summary: Summary<StaticSymbol>) { this.summaries.push(summary); };
|
||||
addSummary(summary: Summary<StaticSymbol>) { this.summaries.push(summary); }
|
||||
resolveSummary(reference: StaticSymbol): Summary<StaticSymbol> {
|
||||
return this.summaries.find(summary => summary.symbol === reference);
|
||||
};
|
||||
}
|
||||
getSymbolsOf(filePath: string): StaticSymbol[] {
|
||||
return this.summaries.filter(summary => summary.symbol.filePath === filePath)
|
||||
.map(summary => summary.symbol);
|
||||
|
@ -37,7 +37,7 @@ class _Humanizer implements html.Visitor {
|
||||
result: any[] = [];
|
||||
elDepth: number = 0;
|
||||
|
||||
constructor(private includeSourceSpan: boolean){};
|
||||
constructor(private includeSourceSpan: boolean) {}
|
||||
|
||||
visitElement(element: html.Element, context: any): any {
|
||||
const res = this._appendContext(element, [html.Element, element.name, this.elDepth++]);
|
||||
|
@ -2222,7 +2222,7 @@ class TemplateHumanizer implements TemplateAstVisitor {
|
||||
|
||||
constructor(
|
||||
private includeSourceSpan: boolean,
|
||||
private interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG){};
|
||||
private interpolationConfig: InterpolationConfig = DEFAULT_INTERPOLATION_CONFIG) {}
|
||||
|
||||
visitNgContent(ast: NgContentAst, context: any): any {
|
||||
const res = [NgContentAst];
|
||||
|
@ -143,8 +143,8 @@ export class KeyValueDiffers {
|
||||
* {@link KeyValueDiffers} instance.
|
||||
*
|
||||
* The following example shows how to extend an existing list of factories,
|
||||
* which will only be applied to the injector for this component and its children.
|
||||
* This step is all that's required to make a new {@link KeyValueDiffer} available.
|
||||
* which will only be applied to the injector for this component and its children.
|
||||
* This step is all that's required to make a new {@link KeyValueDiffer} available.
|
||||
*
|
||||
* ### Example
|
||||
*
|
||||
|
@ -9,7 +9,9 @@
|
||||
import {Injector} from '../di';
|
||||
import {DebugContext} from '../view/index';
|
||||
|
||||
export class EventListener { constructor(public name: string, public callback: Function){}; }
|
||||
export class EventListener {
|
||||
constructor(public name: string, public callback: Function) {}
|
||||
}
|
||||
|
||||
/**
|
||||
* @experimental All debugging apis are currently experimental.
|
||||
|
@ -110,9 +110,9 @@ class ComponentRef_ extends ComponentRef<any> {
|
||||
return new ElementRef(asElementData(this._view, this._elDef.index).renderElement);
|
||||
}
|
||||
get injector(): Injector { return new Injector_(this._view, this._elDef); }
|
||||
get instance(): any { return this._component; };
|
||||
get hostView(): ViewRef { return this._viewRef; };
|
||||
get changeDetectorRef(): ChangeDetectorRef { return this._viewRef; };
|
||||
get instance(): any { return this._component; }
|
||||
get hostView(): ViewRef { return this._viewRef; }
|
||||
get changeDetectorRef(): ChangeDetectorRef { return this._viewRef; }
|
||||
get componentType(): Type<any> { return <any>this._component.constructor; }
|
||||
|
||||
destroy(): void { this._viewRef.destroy(); }
|
||||
@ -164,7 +164,7 @@ class ViewContainerRef_ implements ViewContainerData {
|
||||
return null;
|
||||
}
|
||||
|
||||
get length(): number { return this._embeddedViews.length; };
|
||||
get length(): number { return this._embeddedViews.length; }
|
||||
|
||||
createEmbeddedView<C>(templateRef: TemplateRef<C>, context?: C, index?: number):
|
||||
EmbeddedViewRef<C> {
|
||||
|
@ -43,7 +43,6 @@ export interface NgModuleDefinition extends Definition<NgModuleDefinitionFactory
|
||||
}
|
||||
|
||||
export interface NgModuleDefinitionFactory extends DefinitionFactory<NgModuleDefinition> {}
|
||||
;
|
||||
|
||||
export interface ViewDefinition extends Definition<ViewDefinitionFactory> {
|
||||
flags: ViewFlags;
|
||||
|
@ -1960,7 +1960,9 @@ export function main() {
|
||||
exp2: any = false;
|
||||
event1: AnimationEvent;
|
||||
event2: AnimationEvent;
|
||||
// tslint:disable:semicolon
|
||||
callback1 = (event: any) => { this.event1 = event; };
|
||||
// tslint:disable:semicolon
|
||||
callback2 = (event: any) => { this.event2 = event; };
|
||||
}
|
||||
|
||||
@ -2069,7 +2071,7 @@ export function main() {
|
||||
exp: any = false;
|
||||
|
||||
@HostListener('@myAnimation2.start', ['$event'])
|
||||
callback = (event: any) => { this.event = event; };
|
||||
callback = (event: any) => { this.event = event; }
|
||||
}
|
||||
|
||||
TestBed.configureTestingModule({declarations: [Cmp]});
|
||||
|
@ -13,7 +13,7 @@ export function main() {
|
||||
|
||||
it('should provide correct function.name ', () => {
|
||||
const functionWithoutName = identity(() => function(_: any /** TODO #9100 */) {});
|
||||
function foo(_: any /** TODO #9100 */){};
|
||||
function foo(_: any /** TODO #9100 */) {}
|
||||
|
||||
expect((<any>functionWithoutName).name).toBeFalsy();
|
||||
expect((<any>foo).name).toEqual('foo');
|
||||
|
@ -1531,13 +1531,13 @@ class DirectiveLog {
|
||||
@Pipe({name: 'countingPipe'})
|
||||
class CountingPipe implements PipeTransform {
|
||||
state: number = 0;
|
||||
transform(value: any) { return `${value} state:${this.state ++}`; }
|
||||
transform(value: any) { return `${value} state:${this.state++}`; }
|
||||
}
|
||||
|
||||
@Pipe({name: 'countingImpurePipe', pure: false})
|
||||
class CountingImpurePipe implements PipeTransform {
|
||||
state: number = 0;
|
||||
transform(value: any) { return `${value} state:${this.state ++}`; }
|
||||
transform(value: any) { return `${value} state:${this.state++}`; }
|
||||
}
|
||||
|
||||
@Pipe({name: 'pipeWithOnDestroy'})
|
||||
|
@ -53,4 +53,4 @@ export function main() {
|
||||
});
|
||||
}));
|
||||
});
|
||||
};
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ export function main() {
|
||||
});
|
||||
|
||||
it('should create type in ES5', () => {
|
||||
class MyComponent {};
|
||||
class MyComponent {}
|
||||
let as: any /** TODO #9100 */;
|
||||
(<any>MyComponent).annotations = as = Component({});
|
||||
expect(reflector.annotations(MyComponent)).toEqual(as.annotations);
|
||||
|
@ -383,7 +383,7 @@ export function main() {
|
||||
|
||||
class ChildWithCtor extends Parent {
|
||||
static ctorParameters =
|
||||
() => [{type: C, decorators: [{type: ParamDecorator, args: ['c']}]}, ];
|
||||
() => [{type: C, decorators: [{type: ParamDecorator, args: ['c']}]}, ]
|
||||
constructor() { super(); }
|
||||
}
|
||||
|
||||
|
@ -268,7 +268,7 @@ export function main() {
|
||||
class AComp {}
|
||||
|
||||
class ChildProvider {
|
||||
ngOnDestroy() { log.push('ngOnDestroy'); };
|
||||
ngOnDestroy() { log.push('ngOnDestroy'); }
|
||||
}
|
||||
|
||||
const {view, rootNodes} = createAndGetRootNodes(compViewDef([
|
||||
|
@ -171,7 +171,7 @@ export function main() {
|
||||
const log: string[] = [];
|
||||
|
||||
class ChildProvider {
|
||||
ngOnDestroy() { log.push('ngOnDestroy'); };
|
||||
ngOnDestroy() { log.push('ngOnDestroy'); }
|
||||
}
|
||||
|
||||
const {view: parentView} = createAndGetRootNodes(compViewDef([
|
||||
|
@ -37,7 +37,7 @@ export class TestingCompiler extends Compiler {
|
||||
* Allows to pass the compile summary from AOT compilation to the JIT compiler,
|
||||
* so that it can use the code generated by AOT.
|
||||
*/
|
||||
loadAotSummaries(summaries: () => any[]) { throw unimplemented(); };
|
||||
loadAotSummaries(summaries: () => any[]) { throw unimplemented(); }
|
||||
|
||||
/**
|
||||
* Gets the component factory for the given component.
|
||||
|
@ -6,7 +6,7 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
import {browser, by, element, protractor} from 'protractor';
|
||||
import {$, browser, by, element, protractor} from 'protractor';
|
||||
|
||||
import {verifyNoBrowserErrors} from '../../../../_common/e2e_util';
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
import {Attribute, Component, Directive, Pipe} from '@angular/core';
|
||||
|
||||
class CustomDirective {};
|
||||
class CustomDirective {}
|
||||
|
||||
// #docregion component
|
||||
@Component({selector: 'greet', template: 'Hello {{name}}!'})
|
||||
|
@ -2214,7 +2214,7 @@ class FormControlSelectNgValue {
|
||||
})
|
||||
class FormControlSelectWithCompareFn {
|
||||
compareFn:
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2;
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2
|
||||
cities = [{id: 1, name: 'SF'}, {id: 2, name: 'NY'}];
|
||||
form = new FormGroup({city: new FormControl({id: 1, name: 'SF'})});
|
||||
}
|
||||
@ -2258,7 +2258,7 @@ class FormControlSelectMultipleNgValue {
|
||||
})
|
||||
class FormControlSelectMultipleWithCompareFn {
|
||||
compareFn:
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2;
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2
|
||||
cities = [{id: 1, name: 'SF'}, {id: 2, name: 'NY'}];
|
||||
form = new FormGroup({city: new FormControl([{id: 1, name: 'SF'}])});
|
||||
}
|
||||
|
@ -1440,7 +1440,7 @@ class NgModelSelectWithNullForm {
|
||||
})
|
||||
class NgModelSelectWithCustomCompareFnForm {
|
||||
compareFn:
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2;
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2
|
||||
selectedCity: any = {};
|
||||
cities: any[] = [];
|
||||
}
|
||||
@ -1455,7 +1455,7 @@ class NgModelSelectWithCustomCompareFnForm {
|
||||
})
|
||||
class NgModelSelectMultipleWithCustomCompareFnForm {
|
||||
compareFn:
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2;
|
||||
(o1: any, o2: any) => boolean = (o1: any, o2: any) => o1 && o2? o1.id === o2.id: o1 === o2
|
||||
selectedCities: any[] = [];
|
||||
cities: any[] = [];
|
||||
}
|
||||
|
@ -86,4 +86,4 @@ export default {
|
||||
},
|
||||
banner: banner,
|
||||
plugins: [{resolveId: resolve}, commonjs()]
|
||||
}
|
||||
};
|
||||
|
@ -14,7 +14,7 @@ import {BrowserTestingModule} from '@angular/platform-browser/testing';
|
||||
|
||||
import {DOMTestComponentRenderer} from './dom_test_component_renderer';
|
||||
|
||||
export * from './private_export_testing'
|
||||
export * from './private_export_testing';
|
||||
|
||||
/**
|
||||
* @stable
|
||||
|
@ -47,8 +47,8 @@ export abstract class DomAdapter {
|
||||
* Maps attribute names to their corresponding property names for cases
|
||||
* where attribute name doesn't match property name.
|
||||
*/
|
||||
get attrToPropMap(): {[key: string]: string} { return this._attrToPropMap; };
|
||||
set attrToPropMap(value: {[key: string]: string}) { this._attrToPropMap = value; };
|
||||
get attrToPropMap(): {[key: string]: string} { return this._attrToPropMap; }
|
||||
set attrToPropMap(value: {[key: string]: string}) { this._attrToPropMap = value; }
|
||||
/** @internal */
|
||||
_attrToPropMap: {[key: string]: string};
|
||||
|
||||
|
@ -65,7 +65,7 @@ export class DomRendererFactory2 implements RendererFactory2 {
|
||||
|
||||
constructor(private eventManager: EventManager, private sharedStylesHost: DomSharedStylesHost) {
|
||||
this.defaultRenderer = new DefaultDomRenderer2(eventManager);
|
||||
};
|
||||
}
|
||||
|
||||
createRenderer(element: any, type: RendererType2|null): Renderer2 {
|
||||
if (!element || !type) {
|
||||
|
@ -75,5 +75,5 @@ export abstract class EventManagerPlugin {
|
||||
throw new Error(`Unsupported event target ${target} for event ${eventName}`);
|
||||
}
|
||||
return this.addEventListener(target, eventName, handler);
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ export class ServerRendererFactory2 implements RendererFactory2 {
|
||||
private ngZone: NgZone, @Inject(DOCUMENT) private document: any,
|
||||
private sharedStylesHost: SharedStylesHost) {
|
||||
this.defaultRenderer = new DefaultServerRenderer2(document, ngZone, this.schema);
|
||||
};
|
||||
}
|
||||
|
||||
createRenderer(element: any, type: RendererType2|null): Renderer2 {
|
||||
if (!element || !type) {
|
||||
|
@ -25,8 +25,10 @@ export class WorkerDomAdapter extends DomAdapter {
|
||||
}
|
||||
}
|
||||
|
||||
// tslint:disable-next-line:no-console
|
||||
log(error: any) { console.log(error); }
|
||||
log(error: any) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
logGroup(error: any) {
|
||||
if (console.group) {
|
||||
|
@ -25,4 +25,4 @@ export {UrlHandlingStrategy} from './url_handling_strategy';
|
||||
export {DefaultUrlSerializer, UrlSegment, UrlSegmentGroup, UrlSerializer, UrlTree} from './url_tree';
|
||||
export {VERSION} from './version';
|
||||
|
||||
export * from './private_export'
|
||||
export * from './private_export';
|
||||
|
@ -84,7 +84,7 @@ export class RouterPreloader implements OnDestroy {
|
||||
const onEndLoad = (r: Route) => router.triggerEvent(new RouteConfigLoadEnd(r));
|
||||
|
||||
this.loader = new RouterConfigLoader(moduleLoader, compiler, onStartLoad, onEndLoad);
|
||||
};
|
||||
}
|
||||
|
||||
setUpPreloading(): void {
|
||||
const navigations$ = filter.call(this.router.events, (e: Event) => e instanceof NavigationEnd);
|
||||
|
@ -105,7 +105,7 @@ export function main() {
|
||||
default:
|
||||
throw new Error('Called too many times! ' + JSON.stringify(changes));
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
ng1Module.directive('ng2', downgradeComponent({
|
||||
@ -440,7 +440,7 @@ export function main() {
|
||||
|
||||
@Component({template: ''})
|
||||
class LazyLoadedComponent {
|
||||
constructor(public module: NgModuleRef<any>){};
|
||||
constructor(public module: NgModuleRef<any>) {}
|
||||
}
|
||||
|
||||
@NgModule({
|
||||
|
@ -27,6 +27,7 @@ export function formatDiagnostics(d: ts.Diagnostic[]): string {
|
||||
* Implementation of CompilerHost that forwards all methods to another instance.
|
||||
* Useful for partial implementations to override only methods they care about.
|
||||
*/
|
||||
// tslint:disable:semicolon
|
||||
export abstract class DelegatingHost implements ts.CompilerHost {
|
||||
constructor(protected delegate: ts.CompilerHost) {}
|
||||
getSourceFile =
|
||||
@ -166,4 +167,4 @@ export class SyntheticIndexHost extends DelegatingHost {
|
||||
writeFileSync(metadataName, this.indexMetadata, 'utf8');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,6 +9,7 @@
|
||||
var fs = require('fs');
|
||||
var path = require('path');
|
||||
|
||||
// tslint:disable:no-console
|
||||
module.exports = function(gulp, plugins, config) {
|
||||
function symlink(relativeFolder, linkDir) {
|
||||
var sourceDir = path.join('..', relativeFolder);
|
||||
@ -17,7 +18,7 @@ module.exports = function(gulp, plugins, config) {
|
||||
try {
|
||||
fs.symlinkSync(sourceDir, linkDir, 'dir');
|
||||
} catch (e) {
|
||||
var sourceDir = path.join(config.dir, relativeFolder);
|
||||
sourceDir = path.join(config.dir, relativeFolder);
|
||||
console.log('linking failed: trying to hard copy', linkDir, sourceDir);
|
||||
copyRecursiveSync(sourceDir, linkDir);
|
||||
}
|
||||
|
@ -1 +1,9 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
System.import('index').catch(console.error.bind(console));
|
||||
|
@ -34,7 +34,7 @@ function watch(globs, opts, tasks) {
|
||||
} catch (e) {
|
||||
return tasksDone(e);
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
var events = opts.events = opts.events || ['add', 'change', 'unlink'];
|
||||
@ -51,8 +51,7 @@ function watch(globs, opts, tasks) {
|
||||
var watcher =
|
||||
chokidar.watch(globs, opts).on('all', handleEvent).on('error', function(err) { throw err; });
|
||||
|
||||
var log =
|
||||
function watchLogger(triggerCount) {
|
||||
var log = function watchLogger(triggerCount) {
|
||||
// Don't report change for initial event
|
||||
if (!ignoreInitial && !--triggerCount) return;
|
||||
|
||||
@ -68,10 +67,10 @@ function watch(globs, opts, tasks) {
|
||||
var now = new Date();
|
||||
return now.toLocaleDateString() + ' at ' + now.toLocaleTimeString();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (opts.log !== undefined && !opts.log) {
|
||||
log = function noopLog(triggerCount) {}
|
||||
log = function noopLog(triggerCount) {};
|
||||
}
|
||||
|
||||
var close = watcher.close.bind(watcher);
|
||||
@ -116,6 +115,7 @@ function watch(globs, opts, tasks) {
|
||||
timeoutId = null;
|
||||
}
|
||||
if (!useRunSequence && err) {
|
||||
// tslint:disable-next-line:no-console
|
||||
console.log('Watch task error:', err.toString());
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
// build everything and generate bundles
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
module.exports = (gulp) => () => {
|
||||
const conventionalChangelog = require('gulp-conventional-changelog');
|
||||
return gulp.src('CHANGELOG.md')
|
||||
|
@ -1,3 +1,12 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// tslint:disable:no-console
|
||||
module.exports = (gulp) => (done) => {
|
||||
const madge = require('madge');
|
||||
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// clang-format entry points
|
||||
const srcsToFmt = [
|
||||
'packages/**/*.{js,ts}',
|
||||
|
@ -1,16 +1,26 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// Check the coding standards and programming errors
|
||||
module.exports = (gulp) => () => {
|
||||
const tslint = require('gulp-tslint');
|
||||
// Built-in rules are at
|
||||
// https://palantir.github.io/tslint/rules/
|
||||
const tslintConfig = require('../../tslint.json');
|
||||
// Built-in rules are at https://palantir.github.io/tslint/rules/
|
||||
const path = require('path');
|
||||
return gulp
|
||||
.src([
|
||||
// todo(vicb): add .js files when supported
|
||||
// see https://github.com/palantir/tslint/pull/1515
|
||||
'./modules/**/*.ts',
|
||||
'./modules/**/*.js',
|
||||
'./packages/**/*.ts',
|
||||
'./packages/**/*.js',
|
||||
'./tools/**/*.ts',
|
||||
'./tools/**/*.js',
|
||||
'./*.ts',
|
||||
|
||||
// Ignore node_modules directories
|
||||
@ -19,14 +29,20 @@ module.exports = (gulp) => () => {
|
||||
// Ignore TypeScript mocks because it's not managed by us
|
||||
'!./tools/@angular/tsc-wrapped/test/typescript.mocks.ts',
|
||||
|
||||
// Ignore built files directories
|
||||
'!**/built/**',
|
||||
'!**/dist/**',
|
||||
|
||||
// Ignore special files
|
||||
'!**/*.externs.js',
|
||||
|
||||
// Ignore generated files due to lack of copyright header
|
||||
// todo(alfaproject): make generated files lintable
|
||||
'!**/*.d.ts',
|
||||
'!**/*.ngfactory.ts',
|
||||
])
|
||||
.pipe(tslint({
|
||||
tslint: require('tslint').default,
|
||||
configuration: tslintConfig,
|
||||
configuration: path.resolve(__dirname, '../../tslint.json'),
|
||||
formatter: 'prose',
|
||||
}))
|
||||
.pipe(tslint.report({emitError: true}));
|
||||
|
@ -1,3 +1,10 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// returns the script path for the current platform
|
||||
module.exports = function platformScriptPath(path) {
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
const entrypoints = [
|
||||
'dist/packages-dist/core/core.d.ts', 'dist/packages-dist/core/testing.d.ts',
|
||||
'dist/packages-dist/common/common.d.ts', 'dist/packages-dist/common/testing.d.ts',
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
module.exports = {
|
||||
|
||||
// Serve the built files
|
||||
|
@ -1,3 +1,11 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
function tsc(projectPath, done) {
|
||||
const path = require('path');
|
||||
const platformScriptPath = require('./platform-script-path');
|
||||
|
@ -1,3 +1,12 @@
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// tslint:disable:no-console
|
||||
module.exports = (gulp) => () => {
|
||||
const validateCommitMessage = require('../validate-commit-message');
|
||||
const childProcess = require('child_process');
|
||||
|
@ -11,7 +11,7 @@ var DotsReporter = require('karma/lib/reporters/dots_color');
|
||||
|
||||
var createErrorFormatter = function(basePath, emitter, SourceMapConsumer) {
|
||||
var lastServedFiles = [];
|
||||
emitter.on('file_list_modified', function(files) { lastServedFiles = files.served });
|
||||
emitter.on('file_list_modified', function(files) { lastServedFiles = files.served; });
|
||||
function findFile(path) { return lastServedFiles.filter(_ => _.path === path)[0]; }
|
||||
|
||||
var URL_REGEXP = new RegExp(
|
||||
@ -48,16 +48,16 @@ var createErrorFormatter = function(basePath, emitter, SourceMapConsumer) {
|
||||
|
||||
// indent every line
|
||||
if (indentation) {
|
||||
msg = indentation + msg.replace(/\n/g, '\n' + indentation)
|
||||
msg = indentation + msg.replace(/\n/g, '\n' + indentation);
|
||||
}
|
||||
return msg + '\n';
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
var InternalAngularReporter = function(config, emitter) {
|
||||
var formatter = createErrorFormatter(config.basePath, emitter, SourceMapConsumer);
|
||||
DotsReporter.call(this, formatter, false, config.colors)
|
||||
DotsReporter.call(this, formatter, false, config.colors);
|
||||
};
|
||||
|
||||
InternalAngularReporter.$inject = ['config', 'emitter'];
|
||||
|
@ -14,7 +14,7 @@ var childProcess = require('child_process');
|
||||
|
||||
var PROJECT_ROOT = path.join(__dirname, '../../');
|
||||
|
||||
|
||||
// tslint:disable:no-console
|
||||
function checkNodeModules(logOutput, purgeIfStale) {
|
||||
var yarnCheck = childProcess.spawnSync(
|
||||
'./node_modules/.bin/yarn check --integrity',
|
||||
|
@ -6,12 +6,13 @@
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
// tslint:disable:no-console
|
||||
module.exports = function travisFoldStart(name) {
|
||||
if (process.env.TRAVIS) console.log('travis_fold:start:' + encode(name));
|
||||
|
||||
return function travisFoldEnd() {
|
||||
if (process.env.TRAVIS) console.log('travis_fold:end:' + encode(name));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
@ -1,4 +1,10 @@
|
||||
'use strict';
|
||||
/**
|
||||
* @license
|
||||
* Copyright Google Inc. All Rights Reserved.
|
||||
*
|
||||
* Use of this source code is governed by an MIT-style license that can be
|
||||
* found in the LICENSE file at https://angular.io/license
|
||||
*/
|
||||
|
||||
describe('validate-commit-message.js', function() {
|
||||
var validateMessage = require('./validate-commit-message');
|
||||
@ -112,4 +118,4 @@ describe('validate-commit-message.js', function() {
|
||||
it('should not ignore msg prefixed with "WIP: "',
|
||||
function() { expect(validateMessage('WIP: bullshit')).toBe(INVALID); });
|
||||
});
|
||||
});
|
||||
});
|
||||
|
11
tslint.json
11
tslint.json
@ -15,5 +15,16 @@
|
||||
"semicolon": [true],
|
||||
"variable-name": [true, "ban-keywords"],
|
||||
"no-inner-declarations": [true, "function"]
|
||||
},
|
||||
"jsRules": {
|
||||
"file-header": [true, "Copyright Google Inc\\."],
|
||||
"no-console": [true, "log"],
|
||||
"no-duplicate-imports": true,
|
||||
"no-duplicate-variable": true,
|
||||
"no-jasmine-focus": true,
|
||||
"require-internal-with-underscore": true,
|
||||
"semicolon": [true],
|
||||
"variable-name": [true, "ban-keywords"],
|
||||
"no-inner-declarations": [true, "function"]
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user