Skip to content

chore(deps): remove leek. #3688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"json-loader": "^0.5.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"leek": "0.0.21",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"loader-utils": "^0.2.16",
Expand Down
12 changes: 1 addition & 11 deletions packages/angular-cli/bin/ng
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ process.title = 'angular-cli';

const resolve = require('resolve');
const packageJson = require('../package.json');
const Leek = require('leek');
const Version = require('../upgrade/version').Version;


Expand Down Expand Up @@ -35,18 +34,9 @@ resolve('angular-cli', { basedir: process.cwd() },
cli({
cliArgs: process.argv.slice(2),
inputStream: process.stdin,
outputStream: process.stdout,
Leek: CustomLeek
outputStream: process.stdout
}).then(function (result) {
var exitCode = typeof result === 'object' ? result.exitCode : result;
process.exit(exitCode);
});

function CustomLeek(options) {
options.trackingCode = packageJson.trackingCode;
options.globalName = packageJson.name;
options.name = packageJson.name;
options.version = packageJson.version;
return new Leek(options);
}
});
1 change: 0 additions & 1 deletion packages/angular-cli/commands/doc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const DocCommand = Command.extend({

const docTask = new DocTask({
ui: this.ui,
analytics: this.analytics,
project: this.project
});

Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/commands/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const E2eCommand = Command.extend({

const e2eTask = new E2eTask({
ui: this.ui,
analytics: this.analytics,
project: this.project
});

Expand Down
2 changes: 0 additions & 2 deletions packages/angular-cli/commands/github-pages-deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ const githubPagesDeployCommand = Command.extend({

const buildTask = new WebpackBuild({
ui: this.ui,
analytics: this.analytics,
cliProject: this.project,
target: options.target,
environment: options.environment,
Expand All @@ -133,7 +132,6 @@ const githubPagesDeployCommand = Command.extend({

const createGithubRepoTask = new CreateGithubRepo({
ui: this.ui,
analytics: this.analytics,
project: this.project
});

Expand Down
3 changes: 0 additions & 3 deletions packages/angular-cli/commands/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const InitCommand: any = Command.extend({

const installBlueprint = new this.tasks.InstallBlueprint({
ui: this.ui,
analytics: this.analytics,
project: this.project
});

Expand All @@ -57,7 +56,6 @@ const InitCommand: any = Command.extend({
if (!commandOptions.skipNpm) {
npmInstall = new NpmInstall({
ui: this.ui,
analytics: this.analytics,
project: this.project
});
}
Expand All @@ -66,7 +64,6 @@ const InitCommand: any = Command.extend({
if (commandOptions.linkCli) {
linkCli = new LinkCli({
ui: this.ui,
analytics: this.analytics,
project: this.project
});
}
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/commands/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export default Command.extend({
run: function () {
const lintTask = new LintTask({
ui: this.ui,
analytics: this.analytics,
project: this.project
});

Expand Down
3 changes: 1 addition & 2 deletions packages/angular-cli/commands/new.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ const NewCommand = Command.extend({
}

const createAndStepIntoDirectory =
new this.tasks.CreateAndStepIntoDirectory({ ui: this.ui, analytics: this.analytics });
new this.tasks.CreateAndStepIntoDirectory({ ui: this.ui });

const initCommand = new InitCommand({
ui: this.ui,
analytics: this.analytics,
tasks: this.tasks,
project: Project.nullProject(this.ui, this.cli)
});
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/commands/serve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ const ServeCommand = Command.extend({

const serve = new ServeWebpackTask({
ui: this.ui,
analytics: this.analytics,
project: this.project,
});

Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/commands/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const NgCliTestCommand = TestCommand.extend({

const testTask = new TestTask({
ui: this.ui,
analytics: this.analytics,
project: this.project
});

Expand Down
3 changes: 0 additions & 3 deletions packages/angular-cli/ember-cli/lib/cli/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ var InstallationChecker = require('../models/installation-checker');
function CLI(options) {
this.name = options.name;
this.ui = options.ui;
this.analytics = options.analytics;
this.testing = options.testing;
this.disableDependencyChecker = options.disableDependencyChecker;
this.root = options.root;
Expand Down Expand Up @@ -47,7 +46,6 @@ CLI.prototype.run = function(environment) {

var command = new CurrentCommand({
ui: this.ui,
analytics: this.analytics,
commands: environment.commands,
tasks: environment.tasks,
project: environment.project,
Expand Down Expand Up @@ -134,7 +132,6 @@ CLI.prototype.callHelp = function(options) {

var help = new HelpCommand({
ui: this.ui,
analytics: this.analytics,
commands: environment.commands,
tasks: environment.tasks,
project: environment.project,
Expand Down
28 changes: 0 additions & 28 deletions packages/angular-cli/ember-cli/lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ function clientId() {
// Options: Array cliArgs, Stream inputStream, Stream outputStream
module.exports = function(options) {
var UI = options.UI || require('../ui');
var Leek = options.Leek || require('leek');
var Yam = options.Yam || require('yam');

// TODO: one UI (lib/models/project.js also has one for now...)
Expand All @@ -48,39 +47,12 @@ module.exports = function(options) {
primary: Project.getProjectRoot()
});

var leekOptions;

var disableAnalytics = options.cliArgs &&
(options.cliArgs.indexOf('--disable-analytics') > -1 ||
options.cliArgs.indexOf('-v') > -1 ||
options.cliArgs.indexOf('--version') > -1) ||
config.get('disableAnalytics');

var defaultLeekOptions = {
trackingCode: trackingCode,
globalName: name,
name: clientId(),
version: version,
silent: disableAnalytics
};

var defaultUpdateCheckerOptions = {
checkForUpdates: false
};

if (config.get('leekOptions')) {
leekOptions = merge(defaultLeekOptions, config.get('leekOptions'));
} else {
leekOptions = defaultLeekOptions;
}

debug('leek: %o', leekOptions);

var leek = new Leek(leekOptions);

var cli = new CLI({
ui: ui,
analytics: leek,
testing: options.testing,
name: options.cli ? options.cli.name : 'ember',
disableDependencyChecker: options.disableDependencyChecker,
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/ember-cli/lib/commands/generate.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = Command.extend({
var Task = this.tasks.GenerateFromBlueprint;
var task = new Task({
ui: this.ui,
analytics: this.analytics,
project: this.project,
testing: this.testing,
settings: this.settings
Expand Down
3 changes: 1 addition & 2 deletions packages/angular-cli/ember-cli/lib/models/blueprint.js
Original file line number Diff line number Diff line change
Expand Up @@ -1000,8 +1000,7 @@ Blueprint.prototype.taskFor = function(dasherizedName) {

return new Task({
ui: this.ui,
project: this.project,
analytics: this.analytics
project: this.project
});
};

Expand Down
7 changes: 1 addition & 6 deletions packages/angular-cli/ember-cli/lib/models/command.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ Command.prototype.validateAndRun = function(args) {
return Promise.resolve('callHelp');
}

this.analytics.track({
name: 'ember ',
message: this.name
});

if (commandOptions === null) {
return Promise.resolve();
}
Expand Down Expand Up @@ -430,7 +425,7 @@ Command.prototype.printBasicHelp = function() {
if (this.isRoot) {
output = 'Usage: ' + this.name;
} else {
output = 'ember ' + this.name;
output = 'ng ' + this.name;
}

output += this._printCommand();
Expand Down
15 changes: 0 additions & 15 deletions packages/angular-cli/ember-cli/lib/models/watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ var Watcher = Task.extend({
didError: function(error) {
debug('didError %o', error);
this.ui.writeError(error);
this.analytics.trackError({
description: error && error.message
});
},

then: function() {
Expand All @@ -34,18 +31,6 @@ var Watcher = Task.extend({

this.ui.writeLine('');
this.ui.writeLine(chalk.green('Build successful - ' + Math.round(totalTime) + 'ms.'));

this.analytics.track({
name: 'ember rebuild',
message: 'broccoli rebuild time: ' + totalTime + 'ms'
});

this.analytics.trackTiming({
category: 'rebuild',
variable: 'rebuild time',
label: 'broccoli rebuild time',
value: parseInt(totalTime, 10)
});
},

on: function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ module.exports = Task.extend({
target: this.project.root,
entity: entity,
ui: this.ui,
analytics: this.analytics,
project: this.project,
settings: this.settings,
testing: this.testing,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ module.exports = Task.extend({
target: target,
entity: { name: name },
ui: this.ui,
analytics: this.analytics,
project: this.project,
dryRun: options.dryRun,
targetFiles: options.targetFiles,
Expand Down
1 change: 0 additions & 1 deletion packages/angular-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
"json-loader": "^0.5.4",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^1.8.0",
"leek": "0.0.21",
"less": "^2.7.1",
"less-loader": "^2.2.3",
"lodash": "^4.11.1",
Expand Down
23 changes: 0 additions & 23 deletions tests/helpers/mock-analytics.js

This file was deleted.

2 changes: 0 additions & 2 deletions tests/helpers/ng.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

var MockUI = require('./mock-ui');
var MockAnalytics = require('./mock-analytics');
var Cli = require('angular-cli/lib/cli');

module.exports = function ng(args) {
Expand All @@ -13,7 +12,6 @@ module.exports = function ng(args) {
inputStream: [],
outputStream: [],
cliArgs: args,
Leek: MockAnalytics,
UI: MockUI,
testing: true
});
Expand Down
9 changes: 0 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3158,15 +3158,6 @@ lcid@^1.0.0:
dependencies:
invert-kv "^1.0.0"

[email protected]:
version "0.0.21"
resolved "https://registry.yarnpkg.com/leek/-/leek-0.0.21.tgz#09804bf70f8aefbba745f5d56d2a4debf22711ff"
dependencies:
debug "^2.1.0"
lodash.assign "^3.2.0"
request "^2.27.0"
rsvp "^3.0.21"

less-loader@^2.2.3:
version "2.2.3"
resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-2.2.3.tgz#b6d8f8139c8493df09d992a93a00734b08f84528"
Expand Down