build(npm): upgrade to npm v3

Closes #3193
This commit is contained in:
Brian Ford
2015-12-21 14:50:56 -08:00
committed by Igor Minar
parent 47a3b4d56b
commit 6cfc6f5bb2
12 changed files with 5162 additions and 5122 deletions
+7 -3
View File
@@ -40,9 +40,13 @@ switch (eventType) {
fs.writeFileSync(startTimestampFilePath, Date.now(), 'utf-8');
break;
case 'success':
var startTime = fs.readFileSync(startTimestampFilePath, 'utf-8');
analytics[actionCategory + 'Success'](actionName, Date.now() - startTime);
fs.unlinkSync(startTimestampFilePath);
try {
var startTime = fs.readFileSync(startTimestampFilePath, 'utf-8');
analytics[actionCategory + 'Success'](actionName, Date.now() - startTime);
fs.unlinkSync(startTimestampFilePath);
} catch(e) {
console.log('No start timestamp file "' + startTimestampFilePath + '" found, skipping analytics.');
}
break;
case 'error':
var startTime = fs.readFileSync(startTimestampFilePath, 'utf-8');
+5 -2
View File
@@ -2,6 +2,9 @@
var checkNpm = require('./check-node-modules.js');
var purgeIfStale = (process.argv.indexOf('--purge') !== -1)
var purgeIfStale = (process.argv.indexOf('--purge') !== -1);
// check-node-modules will exit(1) if we don't need to install to short-circuit `npm install`
// see .travis.yml's `install` block to see the reason for this
process.exit(checkNpm(true, purgeIfStale) ? 1 : 0);
checkNpm(true, purgeIfStale);
+1 -1
View File
@@ -4,7 +4,7 @@ var fs = require('fs');
var path = require('path');
var NPM_SHRINKWRAP_FILE = 'npm-shrinkwrap.json';
var NPM_SHRINKWRAP_CACHED_FILE = 'node_modules/npm-shrinkwrap.cached.json';
var NPM_SHRINKWRAP_CACHED_FILE = 'node_modules/.npm-shrinkwrap.cached.json';
var FS_OPTS = {encoding: 'utf-8'};
var PROJECT_ROOT = path.join(__dirname, '../../');
+1 -1
View File
@@ -4,7 +4,7 @@ var fse = require('fs-extra');
var path = require('path');
var NPM_SHRINKWRAP_FILE = 'npm-shrinkwrap.json';
var NPM_SHRINKWRAP_CACHED_FILE = 'node_modules/npm-shrinkwrap.cached.json';
var NPM_SHRINKWRAP_CACHED_FILE = 'node_modules/.npm-shrinkwrap.cached.json';
var PROJECT_ROOT = path.join(__dirname, '../../');
process.chdir(PROJECT_ROOT);
@@ -1,7 +1,7 @@
import {RuleFailure} from 'tslint/lib/lint';
import {AbstractRule} from 'tslint/lib/rules';
import {RuleWalker} from 'tslint/lib/language/walker';
import * as ts from 'tslint/node_modules/typescript';
import * as ts from 'typescript';
export class Rule extends AbstractRule {
public apply(sourceFile: ts.SourceFile): RuleFailure[] {
+1 -1
View File
@@ -1,7 +1,7 @@
import {RuleFailure} from 'tslint/lib/lint';
import {AbstractRule} from 'tslint/lib/rules';
import {RuleWalker} from 'tslint/lib/language/walker';
import * as ts from 'tslint/node_modules/typescript';
import * as ts from 'typescript';
export class Rule extends AbstractRule {
public static FAILURE_STRING = "missing type declaration";
+1 -1
View File
@@ -1,7 +1,7 @@
import {RuleFailure} from 'tslint/lib/lint';
import {AbstractRule} from 'tslint/lib/rules';
import {RuleWalker} from 'tslint/lib/language/walker';
import * as ts from 'tslint/node_modules/typescript';
import * as ts from 'typescript';
export class Rule extends AbstractRule {
public static FAILURE_STRING = "missing type declaration";