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

stack-generator

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stack-generator - npm Package Compare versions

Comparing version 1.0.7 to 1.1.0

6

bower.json
{
"name": "stack-generator",
"main": "./stack-generator.js",
"main": "./dist/stack-generator.js",
"homepage": "https://github.com/stacktracejs/stack-generator.js",

@@ -11,3 +11,3 @@ "authors": [

"dependencies": {
"stackframe": "~0"
"stackframe": "~1.0.2"
},

@@ -28,3 +28,3 @@ "moduleType": [

],
"license": "Public Domain",
"license": "Unlicense",
"ignore": [

@@ -31,0 +31,0 @@ "**/.*",

@@ -5,3 +5,3 @@ {

"description": "Generate artificial backtrace by walking arguments.callee.caller chain",
"version": "1.0.5",
"version": "1.1.0",
"keywords": [

@@ -16,4 +16,4 @@ "stacktrace",

"dependencies": {
"stacktracejs/stackframe": "0.3.1"
"stacktracejs/stackframe": "1.0.2"
}
}

@@ -31,5 +31,5 @@ (function (root, factory) {

if (/function(?:\s+([\w$]+))+\s*\(/.test(curr.toString())) {
stack.push(new StackFrame(RegExp.$1 || undefined, args));
stack.push(new StackFrame({functionName: RegExp.$1 || undefined, args: args}));
} else {
stack.push(new StackFrame(undefined, args));
stack.push(new StackFrame({args: args}));
}

@@ -36,0 +36,0 @@

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

!function(e,t){"use strict";"function"==typeof define&&define.amd?define("stackframe",[],t):"object"==typeof exports?module.exports=t():e.StackFrame=t()}(this,function(){"use strict";function e(e){return!isNaN(parseFloat(e))&&isFinite(e)}function t(e,t,n,r,i,u){void 0!==e&&this.setFunctionName(e),void 0!==t&&this.setArgs(t),void 0!==n&&this.setFileName(n),void 0!==r&&this.setLineNumber(r),void 0!==i&&this.setColumnNumber(i),void 0!==u&&this.setSource(u)}return t.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(e){this.functionName=String(e)},getArgs:function(){return this.args},setArgs:function(e){if("[object Array]"!==Object.prototype.toString.call(e))throw new TypeError("Args must be an Array");this.args=e},getFileName:function(){return this.fileName},setFileName:function(e){this.fileName=String(e)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(t){if(!e(t))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(t)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(t){if(!e(t))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(t)},getSource:function(){return this.source},setSource:function(e){this.source=String(e)},toString:function(){var t=this.getFunctionName()||"{anonymous}",n="("+(this.getArgs()||[]).join(",")+")",r=this.getFileName()?"@"+this.getFileName():"",i=e(this.getLineNumber())?":"+this.getLineNumber():"",u=e(this.getColumnNumber())?":"+this.getColumnNumber():"";return t+n+r+i+u}},t}),function(e,t){"use strict";"function"==typeof define&&define.amd?define("stack-generator",["stackframe"],t):"object"==typeof exports?module.exports=t(require("stackframe")):e.StackGenerator=t(e.StackFrame)}(this,function(e){return{backtrace:function(t){var n=[],r=10;"object"==typeof t&&"number"==typeof t.maxStackSize&&(r=t.maxStackSize);for(var i=arguments.callee;i&&n.length<r;){for(var u=new Array(i.arguments.length),o=0;o<u.length;++o)u[o]=i.arguments[o];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?n.push(new e(RegExp.$1||void 0,u)):n.push(new e(void 0,u));try{i=i.caller}catch(s){break}}return n}}});
//# sourceMappingURL=stack-generator.min.js.map
!function(t,e){"use strict";"function"==typeof define&&define.amd?define("stackframe",[],e):"object"==typeof exports?module.exports=e():t.StackFrame=e()}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t){return t[0].toUpperCase()+t.substring(1)}function r(t){return function(){return this[t]}}function n(t){if(t instanceof Object)for(var r=i.concat(o.concat(a.concat(s))),n=0;n<r.length;n++)t.hasOwnProperty(r[n])&&void 0!==t[r[n]]&&this["set"+e(r[n])](t[r[n]])}var i=["isConstructor","isEval","isNative","isToplevel"],o=["columnNumber","lineNumber"],a=["fileName","functionName","source"],s=["args"];n.prototype={getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getEvalOrigin:function(){return this.evalOrigin},setEvalOrigin:function(t){if(t instanceof n)this.evalOrigin=t;else{if(!(t instanceof Object))throw new TypeError("Eval Origin must be an Object or StackFrame");this.evalOrigin=new n(t)}},toString:function(){var e=this.getFunctionName()||"{anonymous}",r="("+(this.getArgs()||[]).join(",")+")",n=this.getFileName()?"@"+this.getFileName():"",i=t(this.getLineNumber())?":"+this.getLineNumber():"",o=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+r+n+i+o}};for(var u=0;u<i.length;u++)n.prototype["get"+e(i[u])]=r(i[u]),n.prototype["set"+e(i[u])]=function(t){return function(e){this[t]=Boolean(e)}}(i[u]);for(var c=0;c<o.length;c++)n.prototype["get"+e(o[c])]=r(o[c]),n.prototype["set"+e(o[c])]=function(e){return function(r){if(!t(r))throw new TypeError(e+" must be a Number");this[e]=Number(r)}}(o[c]);for(var f=0;f<a.length;f++)n.prototype["get"+e(a[f])]=r(a[f]),n.prototype["set"+e(a[f])]=function(t){return function(e){this[t]=String(e)}}(a[f]);return n}),function(t,e){"use strict";"function"==typeof define&&define.amd?define("stack-generator",["stackframe"],e):"object"==typeof exports?module.exports=e(require("stackframe")):t.StackGenerator=e(t.StackFrame)}(this,function(t){return{backtrace:function(e){var r=[],n=10;"object"==typeof e&&"number"==typeof e.maxStackSize&&(n=e.maxStackSize);for(var i=arguments.callee;i&&r.length<n;){for(var o=new Array(i.arguments.length),a=0;a<o.length;++a)o[a]=i.arguments[a];/function(?:\s+([\w$]+))+\s*\(/.test(i.toString())?r.push(new t({functionName:RegExp.$1||void 0,args:o})):r.push(new t({args:o}));try{i=i.caller}catch(s){break}}return r}}});
//# sourceMappingURL=stack-generator.min.js.map

@@ -6,3 +6,3 @@ var concat = require('gulp-concat');

var jshint = require('gulp-jshint');
var karma = require('karma').server;
var karma = require('karma');
var runSequence = require('run-sequence');

@@ -23,15 +23,22 @@ var sourcemaps = require('gulp-sourcemaps');

gulp.task('test', function (done) {
karma.start({
new karma.Server({
configFile: __dirname + '/karma.conf.js',
singleRun: true
}, done);
}, done).start();
});
gulp.task('test-ci', ['dist'], function (done) {
karma.start({
configFile: __dirname + '/karma.conf.ci.js',
gulp.task('test-pr', ['copy', 'dist'], function (done) {
new karma.Server({
configFile: __dirname + '/karma.conf.js',
browsers: ['Firefox', 'Chrome'],
singleRun: true
}, done);
}, done).start();
});
gulp.task('test-ci', ['dist'], function (done) {
new karma.Server({
configFile: __dirname + '/karma.conf.ci.js'
}, done).start();
});
gulp.task('copy', function () {

@@ -53,2 +60,4 @@ return gulp.src(source)

gulp.task('pr', ['lint', 'test-pr']);
gulp.task('ci', ['lint', 'test-ci'], function () {

@@ -55,0 +64,0 @@ gulp.src('./coverage/**/lcov.info')

@@ -7,23 +7,28 @@ module.exports = function (config) {

// Commented some of these out just so CI doesn't take forever.
// Check out https://saucelabs.com/platforms for all browser/platform combos
var customLaunchers = {
//slIOS7: {
// base: 'SauceLabs',
// browserName: 'iPhone',
// platform: 'OS X 10.9',
// version: '7.1'
//},
slIOS8: {
base: 'SauceLabs',
browserName: 'iPhone',
platform: 'OS X 10.9',
version: '8.1'
platform: 'OS X 10.10',
version: '8.4'
},
//slAndroid4: {
// base: 'SauceLabs',
// browserName: 'Android',
// platform: 'Linux',
// version: '4.0'
//},
slIOS9: {
base: 'SauceLabs',
browserName: 'iPhone',
platform: 'OS X 10.11',
version: '9.2'
},
slAndroid4: {
base: 'SauceLabs',
browserName: 'Android',
platform: 'Linux',
version: '4.4'
},
slAndroid5: {
base: 'SauceLabs',
browserName: 'Android',
platform: 'Linux',
version: '5.1'
},
slChrome: {

@@ -33,24 +38,35 @@ base: 'SauceLabs',

},
slFirefox: {
slChromeBeta: {
base: 'SauceLabs',
browserName: 'firefox'
browserName: 'chrome',
version: 'beta'
},
//slSafari6: {
// base: 'SauceLabs',
// browserName: 'safari',
// platform: 'OS X 10.8',
// version: '6'
//},
//slSafari7: {
// base: 'SauceLabs',
// browserName: 'safari',
// platform: 'OS X 10.9',
// version: '7'
//},
//slSafari8: {
// base: 'SauceLabs',
// browserName: 'safari',
// platform: 'OS X 10.10',
// version: '8'
//}
slChromeCanary: {
base: 'SauceLabs',
browserName: 'chrome',
version: 'dev'
},
slFirefox42: {
base: 'SauceLabs',
browserName: 'firefox',
platform: 'Windows 8.1',
version: '42.0'
},
slFirefoxDev: {
base: 'SauceLabs',
browserName: 'firefox',
version: 'dev'
},
slSafari8: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.10',
version: '8'
},
slSafari9: {
base: 'SauceLabs',
browserName: 'safari',
platform: 'OS X 10.11',
version: '9'
},
slOpera: {

@@ -60,2 +76,8 @@ base: 'SauceLabs',

},
slEdge20: {
base: 'SauceLabs',
browserName: 'microsoftedge',
platform: 'Windows 10',
version: '20.10240'
},
slIE11: {

@@ -67,14 +89,14 @@ base: 'SauceLabs',

},
//slIE10: {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// platform: 'Windows 8',
// version: '10'
//},
//slIE9: {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// platform: 'Windows 7',
// version: '9'
//}
slIE10: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 8',
version: '10'
},
slIE9: {
base: 'SauceLabs',
browserName: 'internet explorer',
platform: 'Windows 7',
version: '9'
},
slIE8: {

@@ -86,2 +108,3 @@ base: 'SauceLabs',

}
// Too unreliable on Sauce :(
//slIE7: {

@@ -93,8 +116,2 @@ // base: 'SauceLabs',

//}
//slIE6: {
// base: 'SauceLabs',
// browserName: 'internet explorer',
// platform: 'Windows XP',
// version: '6'
//}
};

@@ -130,3 +147,3 @@

browsers: Object.keys(customLaunchers),
reporters: ['progress', 'saucelabs', 'coverage'],
reporters: ['dots', 'saucelabs', 'coverage'],
preprocessors: {

@@ -133,0 +150,0 @@ 'stack-generator.js': 'coverage'

@@ -11,10 +11,3 @@ module.exports = function (config) {

],
reporters: ['progress', 'coverage'],
preprocessors: {
'stack-generator.js': 'coverage'
},
coverageReporter: {
type: 'lcov',
dir: 'coverage'
},
reporters: ['spec'],
port: 9876,

@@ -24,3 +17,2 @@ colors: true,

autoWatch: true,
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
//browsers: ['Firefox', 'ChromeCanary', 'Opera', 'Safari'],

@@ -27,0 +19,0 @@ browsers: ['PhantomJS2'],

@@ -9,4 +9,4 @@ {

],
"version": "1.0.7",
"license": "SEE LICENSE IN LICENSE",
"version": "1.1.0",
"license": "Unlicense",
"keywords": [

@@ -16,3 +16,3 @@ "stacktrace",

],
"homepage": "http://www.stacktracejs.com",
"homepage": "https://www.stacktracejs.com",
"repository": {

@@ -23,25 +23,29 @@ "type": "git",

"dependencies": {
"stackframe": "^0.3.1"
"stackframe": "^1.0.2"
},
"devDependencies": {
"colors": "~1.0.3",
"del": "^1.2.1",
"colors": "^1.1.2",
"del": "^2.2.0",
"gulp": "^3.9.0",
"gulp-concat": "^2.6.0",
"gulp-coveralls": "^0.1.4",
"gulp-jshint": "^1.11.2",
"gulp-sourcemaps": "^1.5.2",
"gulp-uglify": "^1.4.1",
"jasmine-node": "~1.14",
"karma": "^0.12.37",
"gulp-jshint": "^2.0.0",
"gulp-rename": "^1.2.2",
"gulp-sourcemaps": "^1.6.0",
"gulp-uglify": "^1.5.1",
"jasmine": "^2.4.1",
"jasmine-core": "^2.4.1",
"jshint": "^2.8.0",
"karma": "^0.13.15",
"karma-chrome-launcher": "^0.1.12",
"karma-coverage": "^0.2.6",
"karma-firefox-launcher": "^0.1.6",
"karma-ie-launcher": "^0.1.5",
"karma-jasmine": "^0.1.6",
"karma-opera-launcher": "^0.1.0",
"karma-phantomjs2-launcher": "^0.3.2",
"karma-firefox-launcher": "^0.1.7",
"karma-ie-launcher": "^0.2.0",
"karma-jasmine": "^0.3.6",
"karma-opera-launcher": "^0.3.0",
"karma-phantomjs2-launcher": "^0.4.0",
"karma-safari-launcher": "^0.1.1",
"karma-sauce-launcher": "^0.2.14",
"run-sequence": "^1.1.2"
"karma-spec-reporter": "0.0.23",
"run-sequence": "^1.1.5"
},

@@ -48,0 +52,0 @@ "bugs": {

@@ -11,3 +11,3 @@ stack-generator

=> [StackFrame('funName1', []), StackFrame(..), StackFrame(..)]
=> [StackFrame({functionName: 'foo', args: []}), StackFrame(..), StackFrame(..)]
```

@@ -23,12 +23,4 @@

## Browser Support
*(See [Karma Config](karma.conf.ci.js) for list of browsers tested by CI)*
[![Sauce Test Status](https://saucelabs.com/browser-matrix/stacktracejs.svg)](https://saucelabs.com/u/stacktracejs)
* Chrome 1+
* Firefox 3+
* Safari 6+
* Opera 9+
* IE 6+
* iOS 6+
* Android 4.0+
## Contributing

@@ -35,0 +27,0 @@ Want to be listed as a *Contributor*? Start with the [Contributing Guide](CONTRIBUTING.md)!

@@ -31,5 +31,5 @@ (function (root, factory) {

if (/function(?:\s+([\w$]+))+\s*\(/.test(curr.toString())) {
stack.push(new StackFrame(RegExp.$1 || undefined, args));
stack.push(new StackFrame({functionName: RegExp.$1 || undefined, args: args}));
} else {
stack.push(new StackFrame(undefined, args));
stack.push(new StackFrame({args: args}));
}

@@ -36,0 +36,0 @@

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