bare-module 7.5.0 → 7.5.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/lib/loader.js +2 -1
- package/lib/module/addon.js +1 -1
- package/lib/module.js +4 -3
- package/lib/wasm/unavailable.js +5 -0
- package/package.json +8 -1
- package/prebuilds/android-arm/bare-module.bare +0 -0
- package/prebuilds/android-arm64/bare-module.bare +0 -0
- package/prebuilds/android-ia32/bare-module.bare +0 -0
- package/prebuilds/android-x64/bare-module.bare +0 -0
- package/prebuilds/darwin-arm64/bare-module.bare +0 -0
- package/prebuilds/darwin-x64/bare-module.bare +0 -0
- package/prebuilds/ios-arm64/bare-module.bare +0 -0
- package/prebuilds/ios-arm64-simulator/bare-module.bare +0 -0
- package/prebuilds/ios-x64-simulator/bare-module.bare +0 -0
- package/prebuilds/linux-arm64/bare-module.bare +0 -0
- package/prebuilds/linux-x64/bare-module.bare +0 -0
- package/prebuilds/win32-arm64/bare-module.bare +0 -0
- package/prebuilds/win32-x64/bare-module.bare +0 -0
package/lib/loader.js
CHANGED
|
@@ -2,6 +2,7 @@ const Semaphore = require('promaphore')
|
|
|
2
2
|
const traverse = require('bare-module-traverse')
|
|
3
3
|
const { startsWithWindowsDriveLetter } = require('bare-module-resolve')
|
|
4
4
|
const lex = require('bare-module-lexer')
|
|
5
|
+
const hostParser = require('bare-host-parser')
|
|
5
6
|
const { isURL, pathToFileURL } = require('bare-url')
|
|
6
7
|
const { urlToPath } = require('./url')
|
|
7
8
|
const ModuleProtocol = require('./protocol')
|
|
@@ -973,7 +974,7 @@ module.exports = class ModuleLoader {
|
|
|
973
974
|
const opts = { resolutions: this._resolutions, engines: Bare.versions }
|
|
974
975
|
|
|
975
976
|
if (host !== null) {
|
|
976
|
-
opts.conditions =
|
|
977
|
+
opts.conditions = hostParser.conditions(host)
|
|
977
978
|
|
|
978
979
|
if (condition === 'addon') opts.hosts = [host]
|
|
979
980
|
}
|
package/lib/module/addon.js
CHANGED
package/lib/module.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const lex = require('bare-module-lexer')
|
|
2
2
|
const { conditionMatches } = require('bare-module-resolve')
|
|
3
3
|
const strip = require('bare-type-stripper')
|
|
4
|
+
const hostParser = require('bare-host-parser')
|
|
4
5
|
const binding = require('../binding')
|
|
5
6
|
const { urlToPath, urlToDirname } = require('./url')
|
|
6
7
|
const errors = require('./errors')
|
|
@@ -9,7 +10,7 @@ const { REEXPORT, ADDON, ASSET } = lex.constants
|
|
|
9
10
|
|
|
10
11
|
const DEFERRED_PROTOCOL = 'deferred:'
|
|
11
12
|
|
|
12
|
-
const nativeConditions = Bare.Addon.host
|
|
13
|
+
const nativeConditions = hostParser.conditions(Bare.Addon.host)
|
|
13
14
|
|
|
14
15
|
const UNLINKED = 0
|
|
15
16
|
const LINKED = 1
|
|
@@ -378,9 +379,9 @@ function conditionsFor(condition, host) {
|
|
|
378
379
|
]
|
|
379
380
|
}
|
|
380
381
|
|
|
381
|
-
if (condition === 'addon') return [[...base, ...
|
|
382
|
+
if (condition === 'addon') return [[...base, ...hostParser.conditions(host)]]
|
|
382
383
|
|
|
383
|
-
return [[...base, ...nativeConditions, ...
|
|
384
|
+
return [[...base, ...nativeConditions, ...hostParser.conditions(host)]]
|
|
384
385
|
}
|
|
385
386
|
|
|
386
387
|
function pickCondition(entry, conditions) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bare-module",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.2",
|
|
4
4
|
"description": "The module system that powers Bare",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./package": "./package.json",
|
|
@@ -17,6 +17,12 @@
|
|
|
17
17
|
"default": "./lib/loader.js"
|
|
18
18
|
}
|
|
19
19
|
},
|
|
20
|
+
"imports": {
|
|
21
|
+
"#wasm": {
|
|
22
|
+
"freertos": "./lib/wasm/unavailable.js",
|
|
23
|
+
"default": "bare-wasm-abi"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
20
26
|
"files": [
|
|
21
27
|
"index.js",
|
|
22
28
|
"index.d.ts",
|
|
@@ -47,6 +53,7 @@
|
|
|
47
53
|
},
|
|
48
54
|
"dependencies": {
|
|
49
55
|
"bare-bundle": "^1.11.0",
|
|
56
|
+
"bare-host-parser": "^1.0.0",
|
|
50
57
|
"bare-module-lexer": "^1.7.0",
|
|
51
58
|
"bare-module-resolve": "^1.12.6",
|
|
52
59
|
"bare-module-traverse": "~2.7.0",
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|