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

thread-loader

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

thread-loader - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

10

CHANGELOG.md

@@ -5,2 +5,12 @@ # Change Log

<a name="1.0.3"></a>
## [1.0.3](https://github.com/webpack-contrib/thread-loader/compare/v1.0.2...v1.0.3) (2017-05-27)
### Bug Fixes
* **resolve:** fix passing error to worker ([6561f57](https://github.com/webpack-contrib/thread-loader/commit/6561f57))
<a name="1.0.2"></a>

@@ -7,0 +17,0 @@ ## [1.0.2](https://github.com/webpack-contrib/thread-loader/compare/v1.0.1...v1.0.2) (2017-05-27)

16

dist/worker.js

@@ -47,2 +47,10 @@ 'use strict';

function toNativeError(obj) {
if (!obj) return null;
var err = new Error(obj.message);
err.details = obj.details;
err.missing = obj.missing;
return err;
}
function writeJson(data) {

@@ -68,2 +76,3 @@ var lengthBuffer = new Buffer(4);

resolve: function resolve(context, request, callback) {
callbackMap[nextQuestionId] = callback;
writeJson({

@@ -76,3 +85,2 @@ type: 'resolve',

});
callbackMap[nextQuestionId] = callback;
nextQuestionId += 1;

@@ -184,4 +192,8 @@ },

if (callback) {
callback(error, result);
var nativeError = toNativeError(error);
callback(nativeError, result);
} else {
console.error(`Worker got unexpected result id ${id}`);
}
delete callbackMap[id];
break;

@@ -188,0 +200,0 @@ }

@@ -191,6 +191,11 @@ 'use strict';

id: questionId,
error,
error: error ? {
message: error.message,
details: error.details,
missing: error.missing
} : null,
result
});
});
finalCallback();
break;

@@ -197,0 +202,0 @@ }

2

package.json
{
"name": "thread-loader",
"version": "1.0.2",
"version": "1.0.3",
"description": "Runs the following loaders in a worker pool.",

@@ -5,0 +5,0 @@ "main": "dist/cjs.js",

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