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

rollup-plugin-worker-factory

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-worker-factory - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

7

CHANGELOG.md

@@ -0,1 +1,8 @@

<a name="0.4.1"></a>
## [0.4.1](https://github.com/brandonocasey/rollup-plugin-worker-factory/compare/v0.4.0...v0.4.1) (2021-01-25)
### Bug Fixes
* do not eval mock workers, prevents break point issues ([63fe865](https://github.com/brandonocasey/rollup-plugin-worker-factory/commit/63fe865))
<a name="0.4.0"></a>

@@ -2,0 +9,0 @@ # [0.4.0](https://github.com/brandonocasey/rollup-plugin-worker-factory/compare/v0.3.0...v0.4.0) (2021-01-25)

2

package.json
{
"name": "rollup-plugin-worker-factory",
"version": "0.4.0",
"version": "0.4.1",
"description": "Bundle web workers that work in nodejs and the browser, without a separate build target.",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -69,5 +69,7 @@ const rollup = require('rollup');

// we make self the first argument even though it will almost always
// be a global so that mockFactory doesn't have to "eval" code
return Promise.resolve(`import workerFactory from "${factoryPath}";\n` +
`/* rollup-plugin-worker-factory start for ${id} */\n` +
'const workerFunction = function() {\n' +
'const workerFunction = function(self) {\n' +
code +

@@ -74,0 +76,0 @@ '}\n' +

@@ -1,3 +0,1 @@

import getWorkerString from './get-worker-string.js';
class FakeWorker {

@@ -52,5 +50,2 @@ constructor() {

const workerFactory = function(workerFunction) {
// eslint-disable-next-line
const fn = new Function('self', getWorkerString(workerFunction));
return () => {

@@ -63,3 +58,3 @@ const client = new FakeWorker();

fn(worker);
workerFunction(worker);

@@ -66,0 +61,0 @@ return client;

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