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

@jymfony/exceptions

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@jymfony/exceptions - npm Package Compare versions

Comparing version 0.1.0-alpha.17 to 0.1.0-alpha.18

3

lib/Exception.js

@@ -101,3 +101,3 @@ const UNKNOWN_FUNCTION = '?';

static parseStackTrace(error) {
const regex = /^\s*at (?:async )?(?:((?:\[object object])?\S+(?: \[as \S+])?) )?\(?(.*?):(\d+)(?::(\d+))?\)?\s*$/i,
const regex = /^\s*at (?:async )?(?:((?:\[object object])?\S+(?: \[as \S+])?) )?\(?(.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,
lines = error.stack.split('\n'),

@@ -134,2 +134,3 @@ stack = [];

Error.prepareStackTrace = Exception.prepareStackTrace;
global.Exception = Exception;
{
"name": "@jymfony/exceptions",
"version": "0.1.0-alpha.17",
"version": "0.1.0-alpha.18",
"description": "Jymfony exception (core package)",

@@ -21,4 +21,4 @@ "main": "index.js",

"devDependencies": {
"chai": "^3.5.0",
"mocha": "^5.0"
"chai": "^4.2",
"mocha": "^6.0"
},

@@ -25,0 +25,0 @@ "config": {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -3,0 +3,0 @@ describe('[Exceptions] BadMethodCallException', function () {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -3,0 +3,0 @@ describe('[Exceptions] DomainException', function () {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -23,2 +23,15 @@ class TestException extends Exception {}

it('should parse stack traces without line', () => {
const stack = `
at CallCenter.makeCall (/var/jymfony/src/Component/Testing/src/Call/CallCenter.js)
at ObjectProphecy.makeProphecyMethodCall (/var/jymfony/src/Component/Testing/src/Prophecy/ObjectProphecy.js)
at /var/jymfony/src/Component/EventDispatcher/src/Debug/TraceableEventDispatcher.js`;
expect(Exception.parseStackTrace({ stack })).to.be.deep.equal([
{ file: '/var/jymfony/src/Component/Testing/src/Call/CallCenter.js', function: 'CallCenter.makeCall', line: 0 },
{ file: '/var/jymfony/src/Component/Testing/src/Prophecy/ObjectProphecy.js', function: 'ObjectProphecy.makeProphecyMethodCall', line: 0 },
{ file: '/var/jymfony/src/Component/EventDispatcher/src/Debug/TraceableEventDispatcher.js', function: '?', line: 0 },
]);
});
const [ major, minor ] = process.versions.v8.split('.', 3);

@@ -25,0 +38,0 @@ it('should parse async stack traces', 7 < ~~major || (7 === ~~major && 3 <= ~~minor) ? () => {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -3,0 +3,0 @@ describe('[Exceptions] InvalidArgumentException', function () {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -3,0 +3,0 @@ describe('[Exceptions] LogicException', function () {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -3,0 +3,0 @@ describe('[Exceptions] OutOfBoundsException', function () {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -3,0 +3,0 @@ describe('[Exceptions] RuntimeException', function () {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -3,0 +3,0 @@ describe('[Exceptions] UnderflowException', function () {

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

const expect = require('chai').expect;
const { expect } = require('chai');

@@ -3,0 +3,0 @@ describe('[Exceptions] UnexpectedValueException', function () {

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