Socket
Socket
Sign inDemoInstall

source-map-support

Package Overview
Dependencies
2
Maintainers
3
Versions
66
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.16 to 0.5.17

9

browser-source-map-support.js

@@ -11,3 +11,3 @@ /*

*/
(this.define||function(G,J){this.sourceMapSupport=J()})("browser-source-map-support",function(G){(function b(p,u,m){function e(d,a){if(!u[d]){if(!p[d]){var l="function"==typeof require&&require;if(!a&&l)return l(d,!0);if(g)return g(d,!0);throw Error("Cannot find module '"+d+"'");}l=u[d]={exports:{}};p[d][0].call(l.exports,function(a){var b=p[d][1][a];return e(b?b:a)},l,l.exports,b,p,u,m)}return u[d].exports}for(var g="function"==typeof require&&require,h=0;h<m.length;h++)e(m[h]);return e})({1:[function(p,
(this.define||function(G,K){this.sourceMapSupport=K()})("browser-source-map-support",function(G){(function b(p,u,m){function e(d,a){if(!u[d]){if(!p[d]){var l="function"==typeof require&&require;if(!a&&l)return l(d,!0);if(g)return g(d,!0);throw Error("Cannot find module '"+d+"'");}l=u[d]={exports:{}};p[d][0].call(l.exports,function(a){var b=p[d][1][a];return e(b?b:a)},l,l.exports,b,p,u,m)}return u[d].exports}for(var g="function"==typeof require&&require,h=0;h<m.length;h++)e(m[h]);return e})({1:[function(p,
u,m){G=p("./source-map-support")},{"./source-map-support":21}],2:[function(p,u,m){(function(b){function e(b){b=b.charCodeAt(0);if(43===b)return 62;if(47===b)return 63;if(48>b)return-1;if(58>b)return b-48+52;if(91>b)return b-65;if(123>b)return b-97+26}var g="undefined"!==typeof Uint8Array?Uint8Array:Array;b.toByteArray=function(b){function d(a){r[w++]=a}if(0<b.length%4)throw Error("Invalid string. Length must be a multiple of 4");var a=b.length;var l="="===b.charAt(a-2)?2:"="===b.charAt(a-1)?1:0;var r=

@@ -111,5 +111,6 @@ new g(3*b.length/4-l);var q=0<l?b.length-4:b.length;var w=0;for(a=0;a<q;a+=4){var h=e(b.charAt(a))<<18|e(b.charAt(a+1))<<12|e(b.charAt(a+2))<<6|e(b.charAt(a+3));d((h&16711680)>>16);d((h&65280)>>8);d(h&255)}2===l?(h=e(b.charAt(a))<<2|e(b.charAt(a+1))>>4,d(h&255)):1===l&&(h=e(b.charAt(a))<<10|e(b.charAt(a+1))<<4|e(b.charAt(a+2))>>2,d(h>>8&255),d(h&255));return r};b.fromByteArray=function(b){var d=b.length%3,a="",l;var e=0;for(l=b.length-d;e<l;e+=3){var g=(b[e]<<16)+(b[e+1]<<8)+b[e+2];g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(g>>

c){var d=arguments[1]&&arguments[1].stack,e=0<this.listeners(c).length;if(d&&!e){d=arguments[1];e=v(d);b.stderr._handle&&b.stderr._handle.setBlocking&&b.stderr._handle.setBlocking(!0);e&&(console.error(),console.error(e));console.error(d.stack);b.exit(1);return}}return a.apply(this,arguments)}}var k=p("source-map").SourceMapConsumer,x=p("path");try{var u=p("fs");u.existsSync&&u.readFileSync||(u=null)}catch(M){}var F=p("buffer-from"),D=!1,t=!1,H=!1,f="auto",n={},C={},G=/^data:application\/json[^,]+base64,/,
y=[],B=[],A=g(y);y.push(function(a){a=a.trim();/^file:/.test(a)&&(a=a.replace(/file:\/\/\/(\w:)?/,function(a,b){return b?"":"/"}));if(a in n)return n[a];var b="";try{if(u)u.existsSync(a)&&(b=u.readFileSync(a,"utf8"));else{var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);4===c.readyState&&200===c.status&&(b=c.responseText)}}catch(K){}return n[a]=b});var E=g(B);B.push(function(a){a:{if(e())try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=b.getResponseHeader("SourceMap")||b.getResponseHeader("X-SourceMap");
y=[],B=[],A=g(y);y.push(function(a){a=a.trim();/^file:/.test(a)&&(a=a.replace(/file:\/\/\/(\w:)?/,function(a,b){return b?"":"/"}));if(a in n)return n[a];var b="";try{if(u)u.existsSync(a)&&(b=u.readFileSync(a,"utf8"));else{var c=new XMLHttpRequest;c.open("GET",a,!1);c.send(null);4===c.readyState&&200===c.status&&(b=c.responseText)}}catch(J){}return n[a]=b});var E=g(B);B.push(function(a){a:{if(e())try{var b=new XMLHttpRequest;b.open("GET",a,!1);b.send(null);var c=b.getResponseHeader("SourceMap")||b.getResponseHeader("X-SourceMap");
if(c){var d=c;break a}}catch(O){}d=A(a);b=/(?:\/\/[@#][\s]*sourceMappingURL=([^\s'"]+)[\s]*$)|(?:\/\*[@#][\s]*sourceMappingURL=([^\s*'"]+)[\s]*(?:\*\/)[\s]*$)/mg;for(var f;c=b.exec(d);)f=c;d=f?f[1]:null}if(!d)return null;G.test(d)?(f=d.slice(d.indexOf(",")+1),f=F(f,"base64").toString(),d=a):(d=h(a,d),f=A(d));return f?{url:d,map:f}:null});var I=y.slice(0),L=B.slice(0);m.wrapCallSite=q;m.getErrorSource=v;m.mapSourcePosition=d;m.retrieveSourceMap=E;m.install=function(a){a=a||{};if(a.environment&&(f=
a.environment,-1===["node","browser","auto"].indexOf(f)))throw Error("environment "+f+" was unknown. Available options are {auto, browser, node}");a.retrieveFile&&(a.overrideRetrieveFile&&(y.length=0),y.unshift(a.retrieveFile));a.retrieveSourceMap&&(a.overrideRetrieveSourceMap&&(B.length=0),B.unshift(a.retrieveSourceMap));if(a.hookRequire&&!e()){try{var d=p("module")}catch(K){}var g=d.prototype._compile;g.__sourceMapSupport||(d.prototype._compile=function(a,b){n[b]=a;C[b]=void 0;return g.call(this,
a,b)},d.prototype._compile.__sourceMapSupport=!0)}H||(H="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1);D||(D=!0,Error.prepareStackTrace=w);!t&&("handleUncaughtExceptions"in a?a.handleUncaughtExceptions:1)&&"object"===typeof b&&null!==b&&"function"===typeof b.on&&(t=!0,c())};m.resetRetrieveHandlers=function(){y.length=0;B.length=0;y=I.slice(0);B=L.slice(0);E=g(B);A=g(y)}}).call(this,p("g5I+bs"))},{"buffer-from":4,fs:3,"g5I+bs":9,module:3,path:8,"source-map":20}]},{},[1]);return G});
a.environment,-1===["node","browser","auto"].indexOf(f)))throw Error("environment "+f+" was unknown. Available options are {auto, browser, node}");a.retrieveFile&&(a.overrideRetrieveFile&&(y.length=0),y.unshift(a.retrieveFile));a.retrieveSourceMap&&(a.overrideRetrieveSourceMap&&(B.length=0),B.unshift(a.retrieveSourceMap));if(a.hookRequire&&!e()){try{var d=p("module")}catch(J){}var g=d.prototype._compile;g.__sourceMapSupport||(d.prototype._compile=function(a,b){n[b]=a;C[b]=void 0;return g.call(this,
a,b)},d.prototype._compile.__sourceMapSupport=!0)}H||(H="emptyCacheBetweenOperations"in a?a.emptyCacheBetweenOperations:!1);D||(D=!0,Error.prepareStackTrace=w);if(!t){a="handleUncaughtExceptions"in a?a.handleUncaughtExceptions:!0;try{!1===p("worker_threads").isMainThread&&(a=!1)}catch(J){}a&&"object"===typeof b&&null!==b&&"function"===typeof b.on&&(t=!0,c())}};m.resetRetrieveHandlers=function(){y.length=0;B.length=0;y=I.slice(0);B=L.slice(0);E=g(B);A=g(y)}}).call(this,p("g5I+bs"))},{"buffer-from":4,
fs:3,"g5I+bs":9,module:3,path:8,"source-map":20}]},{},[1]);return G});
{
"name": "source-map-support",
"description": "Fixes stack traces for files with source maps",
"version": "0.5.16",
"version": "0.5.17",
"main": "./source-map-support.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -564,2 +564,14 @@ var SourceMapConsumer = require('source-map').SourceMapConsumer;

// Do not override 'uncaughtException' with our own handler in Node.js
// Worker threads. Workers pass the error to the main thread as an event,
// rather than printing something to stderr and exiting.
try {
// Don't let browserify try to resolve this require(), it's pointless
// and breaks the build process.
var worker_threads = require('worker_' + 'threads');
if (worker_threads.isMainThread === false) {
installHandler = false;
}
} catch(e) {}
// Provide the option to not install the uncaught exception handler. This is

@@ -566,0 +578,0 @@ // to support other uncaught exception handlers (in test frameworks, for

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc