bare-thread 1.1.2 → 1.1.4
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.
- package/index.js +3 -2
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -2,14 +2,14 @@ const Bundle = require('bare-bundle')
|
|
|
2
2
|
const traverse = require('bare-module-traverse')
|
|
3
3
|
const { startsWithWindowsDriveLetter } = require('bare-module-resolve')
|
|
4
4
|
|
|
5
|
-
const { imports, resolutions
|
|
5
|
+
const { protocol, conditions, imports, resolutions } = module
|
|
6
6
|
|
|
7
7
|
module.exports = exports = class Thread {
|
|
8
8
|
constructor(entry, opts = {}) {
|
|
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
|
}
|
|
@@ -61,6 +61,7 @@ exports.prepare = function prepare(entry, opts) {
|
|
|
61
61
|
for (const dependency of traverse(
|
|
62
62
|
entry,
|
|
63
63
|
{
|
|
64
|
+
conditions,
|
|
64
65
|
imports,
|
|
65
66
|
resolutions,
|
|
66
67
|
resolve: traverse.resolve.bare
|