bare-thread 1.1.0 → 1.1.2
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 +5 -2
- package/package.json +2 -1
package/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
const Bundle = require('bare-bundle')
|
|
2
2
|
const traverse = require('bare-module-traverse')
|
|
3
|
+
const { startsWithWindowsDriveLetter } = require('bare-module-resolve')
|
|
3
4
|
|
|
4
5
|
const { imports, resolutions, protocol } = module
|
|
5
6
|
|
|
@@ -50,7 +51,9 @@ exports.isMainThread = Bare.Thread.isMainThread
|
|
|
50
51
|
|
|
51
52
|
exports.self = Bare.Thread.self
|
|
52
53
|
|
|
53
|
-
exports.prepare = function prepare(entry) {
|
|
54
|
+
exports.prepare = function prepare(entry, opts) {
|
|
55
|
+
if (startsWithWindowsDriveLetter(entry)) entry = '/' + entry
|
|
56
|
+
|
|
54
57
|
entry = new URL(entry, module.url)
|
|
55
58
|
|
|
56
59
|
const bundle = new Bundle()
|
|
@@ -72,7 +75,7 @@ exports.prepare = function prepare(entry) {
|
|
|
72
75
|
})
|
|
73
76
|
}
|
|
74
77
|
|
|
75
|
-
return bundle.toBuffer()
|
|
78
|
+
return bundle.toBuffer(opts)
|
|
76
79
|
}
|
|
77
80
|
|
|
78
81
|
function readModule(url) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-thread",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.2",
|
|
4
4
|
"description": "Thread support for Bare",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package": "./package.json",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"homepage": "https://github.com/holepunchto/bare-thread#readme",
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"bare-bundle": "^1.9.0",
|
|
27
|
+
"bare-module-resolve": "^1.11.2",
|
|
27
28
|
"bare-module-traverse": "^1.7.2"
|
|
28
29
|
},
|
|
29
30
|
"devDependencies": {
|