build: update npm dependencies

This commit is contained in:
Olivier Combe
2017-09-25 10:43:45 +02:00
committed by Alex Rickabaugh
parent 2d5ef15e08
commit df91fd032d
79 changed files with 1259 additions and 1222 deletions

View File

@ -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');
}
}
}
}

View File

@ -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);
}

View File

@ -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));

View File

@ -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());
}
}

View File

@ -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

View File

@ -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')

View File

@ -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');

View File

@ -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}',

View File

@ -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}));

View File

@ -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) {

View File

@ -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',

View File

@ -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

View File

@ -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');

View File

@ -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');

View File

@ -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'];

View File

@ -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',

View File

@ -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));
}
};
};

View File

@ -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); });
});
});
});