Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

karma

Package Overview
Dependencies
Maintainers
1
Versions
213
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

karma - npm Package Compare versions

Comparing version 0.11.11 to 0.11.12

lib/cli.js.orig

15

CHANGELOG.md

@@ -0,1 +1,16 @@

<a name="v0.11.12"></a>
### v0.11.12 (2013-12-25)
#### Bug Fixes
* **client:** show error if an adapter is removed ([a8b250cf](http://github.com/karma-runner/karma/commit/a8b250cf6a89cf064f67ecb1e2c040cc224d91e9))
#### Features
* **deps:** update all deps ([355a762c](http://github.com/karma-runner/karma/commit/355a762c0fd709261ff1403213bb10db6aa0a396), closes [#794](http://github.com/karma-runner/karma/issues/794))
* **reporter:** support source maps (rewrite stack traces) ([70e4abd9](http://github.com/karma-runner/karma/commit/70e4abd9b8db6b05de557ca6e9204339a21be06b), closes [#594](http://github.com/karma-runner/karma/issues/594))
* **watcher:** use polling on Mac ([66f50d7e](http://github.com/karma-runner/karma/commit/66f50d7e584d4cbde820e70746be3f3378440fa8))
<a name="v0.11.11"></a>

@@ -2,0 +17,0 @@ ### v0.11.11 (2013-12-23)

10

client/karma.js

@@ -173,2 +173,6 @@ var stringify = require('./stringify');

var UNIMPLEMENTED_START = function() {
this.error('You need to include some adapter that implements __karma__.start method!');
};
// all files loaded, let's start the execution

@@ -182,3 +186,3 @@ this.loaded = function() {

// remove reference to child iframe
this.start = null;
this.start = UNIMPLEMENTED_START;
};

@@ -204,5 +208,3 @@

// TODO(vojta): support multiple callbacks (queue)
this.start = function() {
this.error('You need to include some adapter that implements __karma__.start method!');
};
this.start = UNIMPLEMENTED_START;

@@ -209,0 +211,0 @@ socket.on('execute', function(cfg) {

2

lib/config.js

@@ -199,3 +199,3 @@ var path = require('path');

this.autoWatchBatchDelay = 250;
this.usePolling = false;
this.usePolling = process.platform === 'darwin';
this.reporters = ['progress'];

@@ -202,0 +202,0 @@ this.singleRun = false;

@@ -0,18 +1,56 @@

var util = require('util');
var log = require('./logger').create('reporter');
var MultiReporter = require('./reporters/multi');
var baseReporterDecoratorFactory = require('./reporters/base').decoratorFactory;
var SourceMapConsumer = require('source-map').SourceMapConsumer;
var createErrorFormatter = function(basePath) {
var URL_REGEXP = new RegExp('http:\\/\\/[^\\/]*' +
'\\/(base|absolute)([^\\?\\s\\:]*)(\\?\\w*)?', 'g');
var createErrorFormatter = function(basePath, emitter, SourceMapConsumer) {
var lastServedFiles = [];
emitter.on('file_list_modified', function(filesPromise) {
filesPromise.then(function(files) {
lastServedFiles = files.served;
});
});
var findFile = function(path) {
for (var i = 0; i < lastServedFiles.length; i++) {
if (lastServedFiles[i].path === path) {
return lastServedFiles[i];
}
}
return null;
};
var URL_REGEXP = new RegExp('http:\\/\\/[^\\/]*\\/' +
'(base|absolute)' + // prefix
'([^\\?\\s\\:]*)' + // path
'(\\?\\w*)?' + // sha
'(\\:(\\d+))?' + // line
'(\\:(\\d+))?' + // column
'', 'g');
return function(msg, indentation) {
// remove domain and timestamp from source files
// and resolve base path / absolute path urls into absolute path
msg = (msg || '').replace(URL_REGEXP, function(full, prefix, path) {
msg = (msg || '').replace(URL_REGEXP, function(_, prefix, path, __, ___, line, ____, column) {
if (prefix === 'base') {
return basePath + path;
} else if (prefix === 'absolute') {
return path;
path = basePath + path;
}
var file = findFile(path);
if (file && file.sourceMap) {
line = parseInt(line || '0', 10);
column = parseInt(column || '0', 10);
var smc = new SourceMapConsumer(file.sourceMap);
var original = smc.originalPositionFor({line: line, column: column});
return util.format('%s:%d:%d <- %s:%d:%d', path, line, column, original.source,
original.line, original.column);
}
return path + (line ? ':' + line : '') + (column ? ':' + column : '');
});

@@ -29,7 +67,5 @@

createErrorFormatter.$inject = ['config.basePath'];
var createReporters = function(names, config, emitter, injector) {
var errorFormatter = createErrorFormatter(config.basePath, config.urlRoot);
var errorFormatter = createErrorFormatter(config.basePath, emitter, SourceMapConsumer);
var reporters = [];

@@ -46,3 +82,3 @@

baseReporterDecorator: ['factory', baseReporterDecoratorFactory],
formatError: ['factory', createErrorFormatter]
formatError: ['value', errorFormatter]
};

@@ -49,0 +85,0 @@

@@ -81,2 +81,3 @@ {

"Nick Payne <nick@kurai.co.uk>",
"Nick Williams <mr.nicksta@gmail.com>",
"Nicolas Ferrero <ferrero.nicolas@gmail.com>",

@@ -110,16 +111,17 @@ "Nish <nishantpatel611@gmail.com>",

"chokidar": "~0.8.0",
"glob": "~3.1.21",
"glob": "~3.2.7",
"minimatch": "~0.2",
"http-proxy": "~0.10",
"optimist": "~0.3",
"optimist": "~0.6.0",
"coffee-script": "~1.6",
"rimraf": "~2.1",
"q": "~0.9",
"colors": "0.6.0-1",
"lodash": "~1.1",
"mime": "~1.2",
"rimraf": "~2.2.5",
"q": "~0.9.7",
"colors": "~0.6.2",
"lodash": "~2.4.1",
"mime": "~1.2.11",
"log4js": "~0.6.3",
"useragent": "~2.0.4",
"graceful-fs": "~1.2.1",
"connect": "~2.8.4"
"graceful-fs": "~2.0.1",
"connect": "~2.12.0",
"source-map": "~0.1.31"
},

@@ -129,3 +131,4 @@ "devDependencies": {

"grunt-simple-mocha": "*",
"grunt-contrib-jshint": "~0.3",
"grunt-contrib-jshint": "~0.7.2",
"grunt-contrib-watch": "~0.5.0",
"grunt-coffeelint": "~0.0.6",

@@ -136,11 +139,11 @@ "grunt-npm": "~0.0.1",

"grunt-auto-release": "~0.0.3",
"grunt-browserify": "~1.3.0",
"mocks": "~0.0.10",
"which": "~1.0",
"sinon-chai": "~2.3",
"chai": "~1.5",
"mocha": "~1.8",
"sinon": "~1.6",
"timer-shim": "~0.2",
"chai-as-promised": "~3.2",
"qq": "~0.3",
"mocha": "~1.16.2",
"chai": "~1.8.1",
"chai-as-promised": "~4.1.0",
"sinon": "~1.7.3",
"sinon-chai": "~2.4.0",
"timer-shim": "~0.3.0",
"karma-jasmine": "*",

@@ -161,6 +164,3 @@ "karma-mocha": "*",

"karma-html2js-preprocessor": "*",
"karma-browserstack-launcher": "*",
"semver": "~1.1.4",
"grunt-contrib-watch": "~0.5.0",
"grunt-browserify": "~1.2.4"
"karma-browserstack-launcher": "*"
},

@@ -172,4 +172,4 @@ "main": "./lib/index",

},
"version": "0.11.11",
"version": "0.11.12",
"license": "MIT"
}

@@ -1,2 +0,2 @@

;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
module.exports = {

@@ -181,2 +181,6 @@ VERSION: '%KARMA_VERSION%',

var UNIMPLEMENTED_START = function() {
this.error('You need to include some adapter that implements __karma__.start method!');
};
// all files loaded, let's start the execution

@@ -190,3 +194,3 @@ this.loaded = function() {

// remove reference to child iframe
this.start = null;
this.start = UNIMPLEMENTED_START;
};

@@ -212,5 +216,3 @@

// TODO(vojta): support multiple callbacks (queue)
this.start = function() {
this.error('You need to include some adapter that implements __karma__.start method!');
};
this.start = UNIMPLEMENTED_START;

@@ -405,3 +407,2 @@ socket.on('execute', function(cfg) {

},{}]},{},[3])
;
},{}]},{},[3])

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc