Skip to content

Commit

Permalink
Bump version to 1.0.0, update CHANGELOG and package for distribution
Browse files Browse the repository at this point in the history
  • Loading branch information
eriwen committed Sep 20, 2015
1 parent 21569ca commit ecfe3bb
Show file tree
Hide file tree
Showing 9 changed files with 82 additions and 10 deletions.
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,40 @@
## v1.0.0

### stacktrace.js is reborn

stacktrace.js is now modularized into 5 projects:

* [stacktrace-gps](https://github.com/stacktracejs/stacktrace-gps) - turn partial code location into precise code location
* [error-stack-parser](https://github.com/stacktracejs/error-stack-parser) - extract meaning from JS Errors
* [stack-generator](https://github.com/stacktracejs/stack-generator) - generate artificial backtrace in old browsers
* [stackframe](https://github.com/stacktracejs/stackframe) - JS Object representation of a stack frame

... and putting it all together: [stacktrace.js](stacktracejs/stacktrace.js) for instrumenting your code and generating stack traces!

### Key Features

* Fully asynchronous API, using [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). Use your own polyfill or use [our distribution with polyfills included](https://github.com/stacktracejs/stacktrace.js/blob/master/dist/stacktrace-with-polyfills.min.js). See the [Migration Guide](http://www.stacktracejs.com/docs/v0-migration-guide)
* [Source Maps](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) support
* Forward-compatible: stacktrace.js no longer assumes a given browser formats Error stacks in a given way. This prevents new browser versions from breaking error parsing
* Stack entries are now fully parsed and returned as [StackFrame objects](https://github.com/stacktracejs/stackframe). Prefer the old format? - just call `.toString()`!
* Use only what you need. All 5 projects work independently as well as together!
* iOS 8+ Safari support

### Available everywhere

```
npm install stacktrace-js
bower install stacktrace-js
component install stacktracejs/stacktrace.js
https://cdnjs.cloudflare.com/ajax/libs/stacktrace.js/1.0.0/stacktrace.min.js
```

### Better for contributors

* gulp build
* TravisCI + Sauce for testing a bunch of browsers
* EditorConfig for style adherence

## v0.6.2

* Ignore test/ dir in bower
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"homepage": "https://github.com/stacktracejs/stacktrace.js",
"authors": [
"Eric Wendelin <me@eriwen.com> (http://www.eriwen.com)",
"Victor Homyakov <vkhomyackov@gmail.com> (https://github.com/victor-homyakov)"
"Victor Homyakov <vkhomyackov@gmail.com> (https://github.com/victor-homyakov)",
"Oliver Salzburg (https://github.com/oliversalzburg)"
],
"description": "Turns partial code location into precise code location",
"moduleType": [
Expand Down
2 changes: 1 addition & 1 deletion component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "stacktrace.js",
"repository": "stacktracejs/stacktrace.js",
"description": "Framework-agnostic, micro-library for getting stack traces in all environments",
"version": "0.6.4",
"version": "1.0.0",
"keywords": [
"stacktrace",
"error",
Expand Down
3 changes: 2 additions & 1 deletion dist/stacktrace-with-polyfills.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stacktrace-with-polyfills.min.js.map

Large diffs are not rendered by default.

25 changes: 25 additions & 0 deletions dist/stacktrace.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,31 @@
// Function not instrumented, return original
return fn;
}
},

/**
* Given an Array of StackFrames, serialize and POST to given URL.
*
* @param stackframes - Array[StackFrame]
* @param url - URL as String
*/
report: function StackTrace$$report(stackframes, url) {
return new Promise(function (resolve, reject) {
var req = new XMLHttpRequest();
req.onerror = reject;
req.onreadystatechange = function onreadystatechange() {
if (req.readyState === 4) {
if (req.status >= 200 && req.status < 400) {
resolve(req.responseText);
} else {
reject(new Error('POST to ' + url + ' failed with status: ' + req.status));
}
}
};
req.open('post', url);
req.setRequestHeader('Content-Type', 'application/json');
req.send({stack: stackframes});
});
}
};
}));
2 changes: 1 addition & 1 deletion dist/stacktrace.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/stacktrace.min.js.map

Large diffs are not rendered by default.

16 changes: 12 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"Victor Homyakov <vkhomyackov@gmail.com> (https://github.com/victor-homyakov)",
"Oliver Salzburg (https://github.com/oliversalzburg)"
],
"version": "0.6.4",
"version": "1.0.0",
"license": "SEE LICENSE IN LICENSE",
"keywords": [
"stacktrace",
Expand Down Expand Up @@ -34,12 +34,12 @@
"gulp-coveralls": "^0.1.4",
"gulp-jshint": "^1.11.2",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.2.0",
"gulp-uglify": "^1.4.1",
"jasmine-node": "~1.14",
"jasmine-sinon": "^0.4.0",
"karma": "^0.13.9",
"karma-chrome-launcher": "^0.2.0",
"karma-coverage": "^0.5.0",
"karma-coverage": "^0.5.2",
"karma-firefox-launcher": "^0.1.6",
"karma-ie-launcher": "^0.2.0",
"karma-jasmine": "^0.1.5",
Expand All @@ -48,12 +48,20 @@
"karma-safari-launcher": "^0.1.1",
"karma-sauce-launcher": "^0.2.14",
"karma-sinon": "^1.0.4",
"run-sequence": "^1.1.2"
"run-sequence": "^1.1.2",
"sinon": "^1.16.1"
},
"bugs": {
"url": "https://github.com/stacktracejs/stacktrace.js/issues"
},
"main": "./stacktrace.js",
"files": [
"LICENSE",
"CHANGELOG.md",
"README.md",
"stacktrace.js",
"dist/"
],
"scripts": {
"test": "gulp test"
}
Expand Down

0 comments on commit ecfe3bb

Please sign in to comment.