Skip to content

Commit a4b7422

Browse files
Replace Makefile with gulp build
1 parent 2299cb0 commit a4b7422

File tree

9 files changed

+82
-54
lines changed

9 files changed

+82
-54
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
3-
- 0.10
4-
script: make test-ci
3+
- 0.12
4+
script: gulp test-ci
55
install:
66
- npm install
77
- npm install bower -g

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Want to be listed as a *Contributor*? Make a pull request with:
2222
* Run `npm install` from the project directory
2323

2424
## Testing
25-
* (Local) Run `make test`. Make sure [Karma Local Config](karma.conf.js) has the browsers you want.
26-
* (Any browser, remotely) If you have a [Sauce Labs](https://saucelabs.com) account, you can run `make ci`.
25+
* (Local) Run `gulp test`. Make sure [Karma Local Config](karma.conf.js) has the browsers you want.
26+
* (Any browser, remotely) If you have a [Sauce Labs](https://saucelabs.com) account, you can run `gulp test-ci`.
2727
Make sure the target browser is enabled in [Karma CI Config](karma.conf.ci.js).
2828
Otherwise, Travis will run all browsers if you submit a Pull Request.

Makefile

Lines changed: 0 additions & 38 deletions
This file was deleted.

dist/error-stack-parser.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@
3838
* @return Array[String]
3939
*/
4040
extractLocation: function ErrorStackParser$$extractLocation(urlLike) {
41-
var locationParts = urlLike.split(':');
41+
// Fail-fast but return locations like "(native)"
42+
if (urlLike.indexOf(':') === -1) {
43+
return [urlLike];
44+
}
45+
46+
var locationParts = urlLike.replace(/[\(\)\s]/g, '').split(':');
4247
var lastNumber = locationParts.pop();
4348
var possibleNumber = locationParts[locationParts.length - 1];
4449
if (!isNaN(parseFloat(possibleNumber)) && isFinite(possibleNumber)) {
@@ -50,11 +55,13 @@
5055
},
5156

5257
parseV8OrIE: function ErrorStackParser$$parseV8OrIE(error) {
53-
return error.stack.split('\n').slice(1).map(function (line) {
58+
return error.stack.split('\n').filter(function (line) {
59+
return !!line.match(CHROME_IE_STACK_REGEXP);
60+
}, this).map(function (line) {
5461
var tokens = line.replace(/^\s+/, '').split(/\s+/).slice(1);
55-
var locationParts = this.extractLocation(tokens.pop().replace(/[\(\)\s]/g, ''));
62+
var locationParts = this.extractLocation(tokens.pop());
5663
var functionName = (!tokens[0] || tokens[0] === 'Anonymous') ? undefined : tokens[0];
57-
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2]);
64+
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);
5865
}, this);
5966
},
6067

@@ -65,7 +72,7 @@
6572
var tokens = line.split('@');
6673
var locationParts = this.extractLocation(tokens.pop());
6774
var functionName = tokens.shift() || undefined;
68-
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2]);
75+
return new StackFrame(functionName, undefined, locationParts[0], locationParts[1], locationParts[2], line);
6976
}, this);
7077
},
7178

@@ -88,7 +95,7 @@
8895
for (var i = 2, len = lines.length; i < len; i += 2) {
8996
var match = lineRE.exec(lines[i]);
9097
if (match) {
91-
result.push(new StackFrame(undefined, undefined, match[2], match[1]));
98+
result.push(new StackFrame(undefined, undefined, match[2], match[1], lines[i]));
9299
}
93100
}
94101

@@ -103,7 +110,7 @@
103110
for (var i = 0, len = lines.length; i < len; i += 2) {
104111
var match = lineRE.exec(lines[i]);
105112
if (match) {
106-
result.push(new StackFrame(match[3] || undefined, undefined, match[2], match[1]));
113+
result.push(new StackFrame(match[3] || undefined, undefined, match[2], match[1], lines[i]));
107114
}
108115
}
109116

@@ -127,7 +134,7 @@
127134
argsRaw = functionCall.replace(/^[^\(]+\(([^\)]*)\)$/, '$1');
128135
}
129136
var args = (argsRaw === undefined || argsRaw === '[arguments not available]') ? undefined : argsRaw.split(',');
130-
return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2]);
137+
return new StackFrame(functionName, args, locationParts[0], locationParts[1], locationParts[2], line);
131138
}, this);
132139
}
133140
};

dist/error-stack-parser.js.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)