diff --git a/gulpfile.js b/gulpfile.js index d2deacc209..6aad26daed 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -101,6 +101,22 @@ gulp.task('lint', ['format:enforce', 'tools:build'], () => { gulp.task('tools:build', (done) => { tsc('tools/', done); }); +gulp.task('check-cycle', (done) => { + var madge = require('madge'); + + var dependencyObject = madge(['dist/all/'], { + format: 'cjs', + extensions: ['.js'], + onParseFile: function(data) { data.src = data.src.replace(/\/\* circular \*\//g, "//"); } + }); + var circularDependencies = dependencyObject.circular().getArray(); + if (circularDependencies.length > 0) { + console.log('Found circular dependencies!'); + console.log(circularDependencies); + process.exit(1); + } + done(); +}); gulp.task('serve', () => { let connect = require('gulp-connect'); @@ -132,7 +148,6 @@ gulp.task('changelog', () => { .pipe(gulp.dest('./')); }); - function tsc(projectPath, done) { let child_process = require('child_process'); diff --git a/modules/@angular/compiler/src/output/value_util.ts b/modules/@angular/compiler/src/output/value_util.ts index b09a3b1098..6a223130da 100644 --- a/modules/@angular/compiler/src/output/value_util.ts +++ b/modules/@angular/compiler/src/output/value_util.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 + */ + import {CompileIdentifierMetadata} from '../compile_metadata'; import {StringMapWrapper} from '../facade/collection'; import {BaseException} from '../facade/exceptions'; diff --git a/scripts/ci-lite/test_e2e.sh b/scripts/ci-lite/test_e2e.sh index 6e2f7e290d..5652cbeb8f 100755 --- a/scripts/ci-lite/test_e2e.sh +++ b/scripts/ci-lite/test_e2e.sh @@ -26,6 +26,8 @@ echo 'travis_fold:end:test.buildPackages' ./tools/typings-test/test.sh $(npm bin)/gulp public-api:enforce +$(npm bin)/gulp check-cycle + echo 'travis_fold:start:test.e2e.localChrome' cd dist/ $(npm bin)/gulp serve &