bare-thread 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +3 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -9,7 +9,7 @@ module.exports = exports = class Thread {
9
9
  let source
10
10
 
11
11
  if (Buffer.isBuffer(entry)) source = entry
12
- else source = Thread.prepare(entry)
12
+ else source = Thread.prepare(entry, { shared: true })
13
13
 
14
14
  this._thread = new Bare.Thread('bare:/thread.bundle', { ...opts, source })
15
15
  }
@@ -51,7 +51,7 @@ exports.isMainThread = Bare.Thread.isMainThread
51
51
 
52
52
  exports.self = Bare.Thread.self
53
53
 
54
- exports.prepare = function prepare(entry) {
54
+ exports.prepare = function prepare(entry, opts) {
55
55
  if (startsWithWindowsDriveLetter(entry)) entry = '/' + entry
56
56
 
57
57
  entry = new URL(entry, module.url)
@@ -75,7 +75,7 @@ exports.prepare = function prepare(entry) {
75
75
  })
76
76
  }
77
77
 
78
- return bundle.toBuffer()
78
+ return bundle.toBuffer(opts)
79
79
  }
80
80
 
81
81
  function readModule(url) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-thread",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Thread support for Bare",
5
5
  "exports": {
6
6
  "./package": "./package.json",